maybe if this is not what you expect you could give examples of what
output you expect from your input.
this is the same rule as I sent yesterday with the resy of the program
wrapped around it.
rebol[]
x: {button "one" button "two" text "browser"}
y: {then try this: button "one" text "browser" button "two"}
button_count: 0
txt_count: 0
btn: to-string reduce [to-set-word 'id ": " to-set-word 'btn]
txt: to-string reduce [to-set-word 'id ": " to-set-word 'txt]
rule: [
any[
to "button" mark:
(insert :mark reduce [btn button_count: button_count + 1":"{ }]
mark: skip mark 16):mark
]
any[
to "text" mark:
(insert :mark reduce [txt txt_count: txt_count + 1":"{ }]
mark: skip mark 14) :mark
]
]
parse/all x rule
probe x
button_count: txt_count: 0
parse/all y rule
probe y
halt
On Mon, 16 Feb 2004, iNetW3 wrote:
> Hey ML,
>
> I spoke too soon.
>
> If any know how to make this code work,
> or demo some code that does the same thing,
> it would be well appreciated.
>
> code: -------------------------------------------
> x: {button "one" button "two" text "browser"}
> {then try this: button "one" text "browser" button "two"}
>
> button_count: 0
> txt_count: 0
>
> btn: to-string reduce [ to-set-word 'id ": " to-set-word 'btn]
> txt: to-string reduce [ to-set-word 'id ": " to-set-word 'txt]
>
> parse x [any [
> to "button" mark:(
> remove/part mark 6 insert mark reduce [btn button_count: button_count + 1
> ":"{ }"button"])
> :mark
>
> to "text" mark:(
> remove/part mark 4 insert mark reduce [txt txt_count: txt_count + 1
> ":"{ }"text"])
> :mark
>
> ]
> ]
>
>
>
>
> ----- Original Message -----
> From: iNetW3 <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 1:15 AM
> Subject: [REBOL] Re: auto id's for vid objects
>
>
>
>
> --
> 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.