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

[REBOL] Re: HTML Dialect?

From: tim:johnsons-web at: 12-Jan-2003 8:33

* Ed Dana <[EDanaII--Cox--net]> [030112 06:24]:
> > > >Just put the variables inside parenthesis, like: > > > > > > > >>>Fred: Make Object! [ File: %Fred.html Text: "Meet Fred Flintstone" ] > >>>ML Compose/Deep [ a/href (Fred/File) (Fred/Text)] > >>> > >>> > >== {<a href="Fred.html">Meet Fred Flintstone</a>} > > > > > > > > Ya know, I swear I tried it with different combinations, including > parenthesis. Sigh... > > It's gotta be my computer. It just hates me, I know it does... :)
Hi Ed: I (think!) that Andrew and I have both given you good information, but they need to be combined. Here is a console session from my machine:
>> Fred: Make Object! [ File: %Fred.html Text: "Meet Fred Flintstone" ] >> ml [ a/href (Fred/File) [(Fred/Text)]]
== {<a href="Fred.html">Meet Fred Flintstone</a>} placing the object members in parens insures that rebol will evaluate them both before 'ml itself is evaluated. Placing the braces around (Fred/Text) insures that the evaluation of Fred's 'Text member will be placed inside of a proper combination of opening and closing "anchor" tags so that it will be a "clickable" link, which I believe that you are after. Just to see the difference, try this:
>> ml [ a/href (Fred/File) (Fred/Text)]
== {<a href="Fred.html" /> Meet Fred Flintstone} ; which you *don't* want If you still having problems, send your code *and* the output from a console session. HTH -- Tim Johnson <[tim--johnsons-web--com]>