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

View / User prompt help!!!

 [1/3] from: bkalef:sympatico:ca at: 6-Mar-2002 12:47


I am trying to use secondary views to retrieve user input. Is there a better way to do this than the way I am trying below. Simply, a main view window launches two separate view windows to retrieve user input. However, the two sub views return immediately and don't wait for user input. I've tried adding the 'do-event word after the 'layout of get-input but it only allows the retrieval of the first variable (this snippet isn't working perfectly either as it isn't returning the first variable). Anyway, any help/alternative approaches is appreciated. Brock Kalef __________ rebol[] sched-styles: stylize [ but: button 200x18 font-size 9 edge [size: 1x1] fld: field 100x18 font-size 9 edge [size: 1x1] txt: text font-size 9 ] test: layout [ button "Try" [data] ] get-input: func [message [string!] /local return-var input-view] [ print "Now in get-input function" input-view: layout [ styles sched-styles text :message return-var: fld button "OK" [unview input-view] ] print return-var/text focus return-var view input-view do-events ; stops execution until gui events have completed. :return-var/text ] data: does [ until [ fday: get-input "Enter FIRST day to schedule (MM-DD): " print "FDAY: " fday fday ] until [ lday: get-input "Enter last day to schedule ([YYYY-]MM-DD): " print "LDAY: " lday lday ] ] view test

 [2/3] from: rotenca::telvia::it at: 6-Mar-2002 20:28


Hi Brok, Give a look at the standard function request-date or at: request (function) request-color (function) request-date (function) request-download (function) request-file (function) request-list (function) request-pass (function) request-text (function) and at their code.
>> help request-date
USAGE: REQUEST-DATE /offset xy DESCRIPTION: Requests a date. REQUEST-DATE is a function value. REFINEMENTS: /offset xy -- (Type: any)
>> request-date
== 15-Mar-2002 --- Ciao Romano

 [3/3] from: bkalef:sympatico:ca at: 6-Mar-2002 22:19


Romano, Ah yes, these will do nicely. It's amazing how many times you look through the online docs you miss these great functions. I've seen request file but the others I have not - so thanks a million. Brock