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

[REBOL] Re: auto id's for vid objects

From: inetw3:mindspring at: 16-Feb-2004 22:30

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 ] ]