[REBOL] Re: hard coded somewhere?
From: agem:crosswinds at: 29-May-2001 2:29
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 28.05.01, 10:35:39, schrieb "Ammon Cooke" <[ammoncooke--yahoo--com]> zum
Thema [REBOL] hard coded somewhere?:
> Hi,
> Using the foreach line example from Core.pdf I get this:
> jobfile: request-file/filter "*.jbs" /file "jobs.jbs"
> file-jobs: read/lines file jobfile
> foreach line file-jobs [
> append jobs/data copy line
> ]
> fix-slider jobs
> show jobs
> it always gives me the same data in 'jobs' (which happens to be a
text-list) no matter what file I tell it to open. Why??
;we check
probe
jobfile: request-file/filter/file "*.jbs" "jobs.jbs" ; (/file this
way)
request-file returns a block of files, so
jobfile: first request-file/filter/file "*.jbs" "jobs.jbs"
but then the result can be too
[] if file-fields is empty and window closed
none if cancel-button, so you should check that before
selection: request-file/filter/file "*.jbs" "jobs.jbs"
either all[not none? Selection not empty? Selection][
jobfile: first selection
;work with it
request/ok mold jobfile
][request/ok "oops, you didnt like my files?"]
bit complicated..
(all[selection selection/1] ;works too ;-)
> Thanks!!
> Ammon
have fun :)
-volker