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

[REBOL] Re: Object lesson, please?

From: g:santilli:tiscalinet:it at: 23-Oct-2003 17:53

Hi SunandaDH, On Thursday, October 23, 2003, 5:19:47 PM, you wrote: Sac> I need a function that expands an object to add extra fields. Just some quick notes... 1. you can do this:
>> original: context [a: 1 b: 2] >> template: context [a: b: c: none] >> probe changed: make template original
make object! [ a: 1 b: 2 c: none ] to update the original object based on a template. 2. you could just recursively apply this function to all the sub-objects... this way you get a copy of all the objects so you won't need the mold anymore. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/