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:[EMAIL PROTECTED]
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

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to