Home   Archive   Permalink



Update gui doesn't work

Well I thought I had figured out my problem below re: How to update a field with a form variable but NO, more problems. This has taken hours to do something so simple. Here is my command line, why does the gui not update when I select a new value from the drop-down list --
    
variable: [--crf 20 --preset faster]
drop-down 100 data ["20" "18" "19" "21" "25"] [replace variable select variable '--crf 'value show gui]

posted by:   tony     7-Jan-2012/1:23:16-8:00



Which GUI system are you using?
    
For VID a field can update its contents this way:
    
view layout [
    
f: field
b: button [set-face f mold now/precise]
    
]
    
Common for all the GUI systems is that you can't change VARIABLE and expect the field to understand it. For VID, SET-FACE is used directly on the field to update it. For RebGUI, you can use SHOW-TEXT for the same.

posted by:   Henrik     7-Jan-2012/2:47:03-8:00



Here is a more fully written script -
    
settings: [--crf 20 --preset faster]
gui: layout [
size 900x500
     across
label black "Select crf:" crf1: drop-down 100 data ["20" "18" "19" "21" "25"] [replace settings select settings '--crf 'value show gui]
label black "Com Line:" tab f5: field 600 form settings return
view center-face gui
    
I know the 'value is changing because I can replace the "show gui" with "alert value" and I see the new selection but it does not update the f5 field. I had to use the form command to change the "settings" block to text so it would appear in the f5 field

posted by:   tony     7-Jan-2012/13:48:11-8:00



This seems to work thanks to your suggestion -
    
set-face f5 form replace settings select settings '--crf value

posted by:   tony     7-Jan-2012/14:57:30-8:00



As said above I would like one document to search when I'm stuck like here. I guess I want one document of the following page and all it's links -
    
http://www.rebol.com/docs/docs.html
    
Anyone suggest how to create one for myself if one does not exist now??

posted by:   Is there ONE document for all Rebol commands     7-Jan-2012/15:02:16-8:00



There is no such a document I think, you should search on the docs page or better use AltMe.
Additionally, these are useful pages:
    
http://www.rebol.com/how-to.html
http://www.rebol.com/docs/dictionary.html
http://re-bol.com/rebol.html
http://www.rebol.net/wiki/View


posted by:   Endo     9-Jan-2012/5:15:45-8:00



I prefer to look at code, more than reading explanations. My most used personal reference is http://re-bol.com/examples.txt . It contains all the code examples from my re-bol.com tutorial (and a bunch more). I put it together as a reminder and quick reference for many of the useful bits of code I've used, and solutions I've found for common patterns and cases in different types of programs. If you need more explanation, most of the code and thinking for each example is covered in the tutorial. If you get to know the above examples, you should find answers to many of the most common situations you'll come across. HTH

posted by:   Nick     15-Jan-2012/12:02:56-8:00



Thanks Nick!

posted by:   tony     15-Jan-2012/13:00:04-8:00