From: | David McMinn |
Date: | 20 Jul 2001 at 18:39:03 |
Subject: | Re: MUICycle |
On 19 Jul 2001, at 10:03, Richard Brooklyn wrote:
> dim list cyclelist(3)
> cyclelist(0)="one"
^
\- Ack!
> It always throws up the error "Not currently used list item" or something
> along those lines. Using ResetList cyclist() does not help.
>
> Where am I going wrong?
You are confusing lists with arrays. When you do "Dim List" you are
creating a list structure, not an array. You therefore cannot access the
items in the list using an index value (the number in the brackets).
You can only access the current item in a list (although there are
obviously commands for moving between items in the list). You must also
use AddItem to create items in your list.
Apart from that, you were trying to assign a string value to a word type
list item (unless you done DEFTYPE.s at the top of your program, which
probably isn't a good idea).
Oh, and are you sure that's how MUICycles work? I'm sure someone asked a
similar question a few weeks ago, and you need to supply an array of
string pointers terminated with a NULL pointer, i.e.:
Dim strings.s(10)
strings(0)="blah"
strings(1)="balaaah"
strings(2)="foo"
...
strings(10)="bar"
Dim strptr.l(11) ; Notice -> 1 bigger than the string array
for i.w=0 to 10
strptr(i)=&strings(i)
next
strptr(11)=0
MUICycle #selector,&strptr(0)
|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie