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

[REBOL] Re: Passing arguments to a function in another script

From: gregg:pointillistic at: 7-Feb-2008 13:17

Hi Bob, BW> (a) I have more or less come to the conclusion that such "action" blocks BW> need to contain FUNCTIONS of some sort, but even so I am still hesitant BW> about making such a sweeping generalisation. Action blocks will contain whatever you need them to, just as event handler code in VB would. They can contain regular REBOL code. You don't normally *define* functions in action blocks, but you can certainly call them from there, and that is a common idiom. BW> (b) Normally, such example blocks do not show how to get values from BW> other faces. (And getting values from other faces is not always as BW> consistent as a noob would imagine.) BW> (c) Nor do such blocks usually demonstrate how to change other faces. Basically, you reference a face with a variable and use the get-face/set-face accessor funcs (there are also clear-face and reset-face funcs). view layout [ rad: radio-line "Hello World!" b: btn "Toggle" [set-face rad not get-face rad] ] I should point out that there is often more you need to do when it comes to some styles, and that's one of the biggest problems with VID; needing to know how some things work internally. You can see the source to all styles, but it takes time and effort to understand those things. BW> Hope you don't mind my 2 cents at this stage. Keep it coming. Input from people new to REBOL is vital. It reminds us of the holes we saw when we were new, but have now forgotten about. -- Gregg