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

[REBOL] Re: Embedded Object and Scope - again...

From: coussement:c:itc:mil:be at: 10-May-2001 11:48

> I really don't know the answer. > I think we need a make/deep or something. > > I think the embedded-object words are still bound to > the ancestor-object context. That means global-obj-prop > is still bound to the ancestor-object. > > Does this modification help?: > > print-global-obj-prop: func [obj][ > print get in obj 'global-obj-prop > ] > > ; try it out > ancestor-object/init 10 ; == 10 > ancestor-object/embedded-object/print-global-obj-prop > ancestor-object ; == 10 - good > > ;try it out again > descendant-object/init 20 ; == 20 > descendant-object/embedded-object/print-global-obj-prop > descendant-object ; == 20 > > Anton.
[ Thanks for the reply Anton. Your proposal shouldn't work in the context I have to use it. I'm still wondering why RT choose such an implementation ... Thanks anyway, CU chr== ]