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

[REBOL] Re: newbie question (and some frustration)

From: nitsch-lists:netcologne at: 2-Mar-2004 2:34

Am Dienstag, 2. M=E4rz 2004 00:39 schrieben Sie:
> The code below fails with the error listed. The /custom refinement expects > a block '[post <string>]'. However, it doesn't like a word that's value is > a string. What gives? Anyone please help! I've wasted a good hour trying > to make this work. reduce['post txt-search] note the <'> before the post, and the reduce. the trick here is that rebol does not know which word you want to fetch, and which to keep. surely you dont want the 'post to be evaluated, it shall stay a word. while the 'txt-search shall be fetched. rebol is confused here and instead of guessing it prefers to reclaim. What it wants is [post "txtLastname=brondo&txtFirstname=greg"], and that does the reduce. which fetches everything in a block. And the <'> before post tells reduce not to fetch, but to keep it as word. More correctly reduce does not fetch, but evaluate. this means fetch for normal words and "remove the <'>" for ticked words. Its an important thing to know, because rebol does not manage this behavior completely consistentely, some functions are smart and reduce themself, some are not. so when passing a block, check how the function handles the reduce-thing.
> fld_lastname: "brondo" > fld_firstname: "greg" > txt-search: rejoin [txtLastname=" fld_lastname "&txtFirstname=" > fld_firstname] web-data: read/custom > [post txt-search] > print web-data > > Any ideas?
(Btw, somewhere is a <"> missing, do you find it? and the link did not work for me. Not a big problem, but checking the posting in console first saves a minute to the testers. ;) HTH -Volker