updating a drop list
[1/6] from: fergus4::bellatlantic::net at: 20-Dec-2005 14:15
I'm want to be able to update the data in a drop list on the fly but I'm
having trouble.
Basically my code looks like this:
Names: ["Bob" "Jack" "Sue"]
name_list: name_list
display-face: layout [
txts "names:" nam: choi data name_list
]
If I change the name_list block by adding a name:
name_list: []
names: ["Bob" "Jack" "Sue" "Mary"]
name_list: names
and refresh the face:
show display_face
It does not update.
I've played around with the "Copy" and I've gotten the list to append to
it's self so my list is double in size but just repeats but any added
elements are not present.
I know the face is being refreshed so my problem is were "name_list" does
not seem to be coping the new block.
[2/6] from: SunandaDH:aol at: 20-Dec-2005 19:38
Fergus:
> I know the face is being refreshed so my problem is were "name_list" does
> not seem to be coping the new block.
Try this -- note the magic step is to update nam/texts
Names: ["Bob" "Jack" "Sue"]
name_list: copy names
display-face: layout [
label "names:" nam: choice data name_list
button "update" [
name_list: copy ["Bob" "Jack" "Sue" "Mary"]
nam/texts: copy name_list
show nam
]
]
view display-face
Sunanda
[3/6] from: fergus4:bellatlantic at: 20-Dec-2005 23:01
Got it to work Thanks.
I knew to update a field or area etc you use the /text modifier but I did
not know about /texts with an "s".
-Alan
[4/6] from: SunandaDH:aol at: 21-Dec-2005 4:14
Fergus:
> I knew to update a field or area etc you use the /text modifier but I did
> not know about /texts with an "s".
It's a mess.
Some fields you update /text, some you update /texts. And the rules changed
between versions. And there's /data too just to add to the confusion.
With a bit of luck, the logic is stable now.
Sunanda.
[5/6] from: th72:dds:nl at: 21-Dec-2005 11:16
Hello,
This is something new for me. What is nam??
Thanks Tim
Alan Macleod wrote:
[6/6] from: SunandaDH::aol::com at: 21-Dec-2005 7:03
Tim:
> This is something new for me. What is nam??
nam is the word Fergus used to hold his choice face:
nam: choice data name_list
Sunanda