Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Updating a drop list

 [1/12] from: fergus4::bellatlantic::net at: 11-Dec-2007 9:56


I'm having trouble updating a drop-down list. The drop list is populated by reading a database and storing names in a variable (data_list): data_picked: drop-down data data_list If I update the data base and re-read the updated db I see that the variable holds the correctly updated info but I can not get the drop list to display it. Show does not seem to work as it does on other widgets. Alan Macleod

 [2/12] from: fergus4:bellatlantic at: 11-Dec-2007 13:05


I'm having trouble updating a drop-down list. The drop list is populated by reading a database and storing names in a variable (data_list): data_picked: drop-down data data_list If I update the data base and re-read the updated db I see that the variable holds the correctly updated info but I can not get the drop list to display it. Show does not seem to work as it does on other widgets. (2nd time sent. Sorry if it duplicates but I waited a few hours without seeing the original post turn up in the ML) Alan Macleod

 [3/12] from: kpeters:otaksoft at: 11-Dec-2007 10:59


On Tue, 11 Dec 2007 13:05:14 -0500, Alan wrote:
> I'm having trouble updating a drop-down list. > The drop list is populated by reading a database and storing names in a variable (data_list):
<<quoted lines omitted: 5>>
> turn up in the ML) > Alan Macleod
Alan ~ something like below (if I understand you correctly)? Kai form: layout [ sel: choice 50 "A" "B" "C" btn "Change" [ sel/texts: [ "D" "E" "F" ] show sel ] ] inform form

 [4/12] from: fergus4:bellatlantic at: 11-Dec-2007 14:42


Kai, That is the sort of what I'm trying to do but I'm using a drop-down widget not a choice widget and them seem to behave differently. I tried to adapt what you suggest to the drop-down but it does not update. Alan Macleod Cell# 347--886-7055 Xpeditus inc. 26 Railroad Avenue, #330 Babylon, NY 11702 631-649-4200

 [5/12] from: gregg::pointillistic::com at: 11-Dec-2007 13:02


Hi Alan, Try the /list-data facet, rather than /texts. form: layout [ sel: drop-down 50 "A" "B" "C" btn "Change" [ sel/list-data: [ "D" "E" "F" ] show sel ] ] inform form -- Gregg

 [6/12] from: fergus4:bellatlantic at: 11-Dec-2007 15:27


Gregg, I tried your example and it does not work for me. I had tried /list-data but to no avail. When I probe sel/list-data I see it is updated with the change but it will not display in the drop-down. Alan Macleod

 [7/12] from: gregg:pointillistic at: 11-Dec-2007 13:45


Hi Alan, A> I tried your example and it does not work for me. I had tried /list-data but A> to no avail. When I probe sel/list-data I see it is updated with the change A> but it will not display in the drop-down. What version of View and what OS? I tested what I sent on 1.3.2 under XP. -- Gregg

 [8/12] from: kpeters:otaksoft at: 11-Dec-2007 12:55


REBOL/View 1.3.2.3.1 under XP also not working for me Kai PS: Aren't there also multiple versions out there - like Ammon Johnsom's etc.? On Tue, 11 Dec 2007 13:45:26 -0700, Gregg Irwin wrote:

 [9/12] from: fergus4:bellatlantic at: 11-Dec-2007 16:13


Version 1.3.2 on XP... I noticed that if I press the change button before using the drop-down it will change but if I click to view the drop-list first I can not get it to update the change. Alan Macleod

 [10/12] from: gregg:pointillistic at: 11-Dec-2007 14:24


Hi Alan, A> I noticed that if I press the change button before using the drop-down it A> will change but if I click to view the drop-list first I can not get it to A> update the change. Aha! I can dupe that here. I obviously didn't drop it down first when I tested it. If you probe the code for the style, you'll see that it creates then reuses the list-lay sub-layout. That seems to be the culprit. form: layout [ sel: drop-down 50 "A" "B" "C" btn "Change" [ sel/list-data: [ "D" "E" "F" ] sel/list-lay: none show sel ] ] inform form -- Gregg

 [11/12] from: fergus4:bellatlantic at: 11-Dec-2007 16:47


Bingo! Adding the /list-lay: none fixed it... Here is problem with rebol...undocumented features. This was a thing I assume many people would need to know but a search produces nothing... How do I probe the source again? Thanks a lot gregg1 Alan Macleod

 [12/12] from: gregg::pointillistic::com at: 11-Dec-2007 14:55


A> Here is problem with rebol...undocumented features. It's not just that, but lack of standard interfaces to styles. The face accessors helped a lot when they were added, but it doesn't cover many other details you need to know when working with styles. A> How do I probe the source again? probe get-style 'drop-down -- Gregg

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted