Home   Archive   Permalink



Wondering about example results in tutorial example....

I am working mu thru Nick Antonoccio's fabulous tutorial....I try this function call in the console: request-pass/offset/title 10x100 "title" alert "Processing"
I notice that the console results after responding to the 2nd function (alert) is simply 'true'. I'm wondering what happens to the user name and password I entered in the text dialog box in response to the first function in this case. Unlike using request-pass etc. without the 2nd call (alert) which returned the user name and password entered in a block.

posted by:   John F Dutcher     10-Apr-2014/10:48:35-7:00



I note this example executes the 2nd function first (which seems more rational)....then the first function....but even though I selected 'false' in response to the 'Choose one' call...the end result reported back in the console was 'true'....
alert ( rejoin ( ["You chose: " ( request "Choose one:" ) ] ) )

posted by:   John...again     10-Apr-2014/11:48:37-7:00



The true result in each case is the result of the 'alert function. Try this, and you'll see that each of the functions is returning a value:
    
z: alert ( y: rejoin ( ["You chose: " ( x: request "Choose one:" ) ] ) )
probe x probe y probe z
    
x: request-pass/offset/title 10x100 "title" y: alert "Processing"
probe x probe y
    
It should make even more sense if you just put each function on a separate line:
    
request-pass/offset/title 10x100 "title"    
alert "Processing"
    
x: request "Choose one:"
y: rejoin ["You chose: " x]
alert y

posted by:   Nick     11-Apr-2014/7:43:59-7:00