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

Newbie: some questions about VID

 [1/7] from: apwing::zonnet::nl at: 27-Sep-2003 13:01


Hello, in the following trial program I have a few difficulties using VID. Question 1: how can I fill out the text-list. The results never show up Question 2: I tried the "hide"attribute on the pwd field; if I print the pwd field, I don't see the actual value, but only the *******. How to get (and print) the real value ? Kind regards, Arie van Wingerden ================ The program: ================== REBOL [ ] lay: layout [ style lab label 100 right across vh2 "Provide your e-mail account information" return lab "Userid" uid: field return lab "Password" pwd: field return lab "POP3 server" pop: field return lab button "Fetch e-mails" [fill] return lab "E-mails" emails: text-list 600x200 return ] fill: does [ clear emails/data count: 0 mails: read/lines to-url rejoin [ "pop://" uid/text ":" pwd/text "@" pop/text ] foreach mail mails [ count: count + 1 insert emails/data rejoin [ "===== mail #" count " =====" ] parse mail [ thru "From:" copy from to "^/" ] insert emails/data rejoin [ "From :" from ] parse mail [ thru "Date:" copy date to "^/" ] insert emails/data rejoin [ "Date :" date ] parse mail [ thru "Subject:" copy subject to "^/" ] insert emails/data rejoin [ "Subject:" subject ] ] if count = 0 [ insert emails/data " --- no e-mails found ---" show emails ] ] focus uid view lay

 [2/7] from: philb:upnaway at: 27-Sep-2003 22:28


Hi Arie, Q1 You need to move "show emails" down 1 line outside the if count = 0 block. Q2 Use the pwd/data with the hide attribute. A couple of suggestions : 1. You could use compose to compose the user:[password--server-name] something like .... mb: compose [scheme: 'pop host: (pop-server) user: (user) pass: (password)] 2. You can use import-email to parse the email for you. help import-email USAGE: IMPORT-EMAIL data DESCRIPTION: Constructs an email object from an email message. IMPORT-EMAIL is a function value. ARGUMENTS: data -- The email message (Type: string) The email object returned has all the fields you want To/From/Subject Cheers Phil === Original Message === Hello, in the following trial program I have a few difficulties using VID. Question 1: how can I fill out the text-list. The results never show up Question 2: I tried the "hide"attribute on the pwd field; if I print the pwd field, I don't see the actual value, but only the *******. How to get (and print) the real value ? Kind regards, Arie van Wingerden ================ The program: ================== REBOL [ ] lay: layout [ style lab label 100 right across vh2 "Provide your e-mail account information" return lab "Userid" uid: field return lab "Password" pwd: field return lab "POP3 server" pop: field return lab button "Fetch e-mails" [fill] return lab "E-mails" emails: text-list 600x200 return ] fill: does [ clear emails/data count: 0 mails: read/lines to-url rejoin [ "pop://" uid/text ":" pwd/text "@" pop/text ] foreach mail mails [ count: count + 1 insert emails/data rejoin [ "===== mail #" count " =====" ] parse mail [ thru "From:" copy from to "^/" ] insert emails/data rejoin [ "From :" from ] parse mail [ thru "Date:" copy date to "^/" ] insert emails/data rejoin [ "Date :" date ] parse mail [ thru "Subject:" copy subject to "^/" ] insert emails/data rejoin [ "Subject:" subject ] ] if count = 0 [ insert emails/data " --- no e-mails found ---" show emails ] ] focus uid view lay

 [3/7] from: apwing:zonnet:nl at: 28-Sep-2003 13:25


Hi Phil, thanks for your help and suggestions! Program has improved significantly now and I learnt a lot. Q1 I really overlooked that one. Dumb :-( Concerning "compose": is there some good documentation on that subject? Thanx again, Arie

 [4/7] from: SunandaDH:aol at: 28-Sep-2003 8:03


Arie:
> Concerning "compose": is there some good documentation on that subject?
Two references from REBOL.com: www.rebol.com/docs/words/wcompose.html www.rebol.com/docs/core23/rebolcore-7.html and one from Allen's much-missed 'zine: http://www.rebolforces.com/zine/rzine-1-03/ Sunanda

 [5/7] from: apwing:zonnet:nl at: 28-Sep-2003 16:17


Hi Sunanda, thanks! The Zines docs are indeed nice. Perhaps you or somebody else can help me with something else. I've got this pop-up layout: popup: layout/offset [ across backcolor red errtxt: info 500 return button "OK" [ hide-popup ] return ] 200x200 When I've showed the pop-up (SHOW-POPUP POPUP) from within my main window layout and have pressed the OK button, the whole program seems to end instead of returning to my main window. I tried to use UNVIEW instead of HIDE-POPUP. But in that case the main window is there, but seems to "hang". Any ideas? Of course I am sorry for the kind of questions. They ARE real beginners questions, since it is my very first REBOL program ever ... ;-) The more grateful I am for the help in this list ! Kind regards, Arie

 [6/7] from: philb:upnaway at: 28-Sep-2003 23:15


Hi Arie, I have never used show-popup ..... seems like you are displaying an error message. You may like to use inform .... USAGE: INFORM panel /offset where /title ttl /timeout time DESCRIPTION: Display an exclusive focus panel for alerts, dialogs, and requestors. INFORM is a function value. .... Using this with hide-popup may be a solution. Cheers Phil === Original Message === Hi Sunanda, thanks! The Zines docs are indeed nice. Perhaps you or somebody else can help me with something else. I've got this pop-up layout: popup: layout/offset [ across backcolor red errtxt: info 500 return button "OK" [ hide-popup ] return ] 200x200 When I've showed the pop-up (SHOW-POPUP POPUP) from within my main window layout and have pressed the OK button, the whole program seems to end instead of returning to my main window. I tried to use UNVIEW instead of HIDE-POPUP. But in that case the main window is there, but seems to "hang". Any ideas? Of course I am sorry for the kind of questions. They ARE real beginners questions, since it is my very first REBOL program ever ... ;-) The more grateful I am for the help in this list ! Kind regards, Arie

 [7/7] from: apwing:zonnet:nl at: 28-Sep-2003 18:13


Hi Phil, that works fine! Thanx, Arie