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

[REBOL] Re: Objects, Inheritance and Barking Up Wrong Trees?

From: scott:dunlop:nextel at: 27-Apr-2001 0:22

My latest guess, found after digging around in the mailing lists and looking at information on how to create private object slots, is to use 'uses' to declare a local variable to hold the old value.. child-object: make parent-object [ uses [old-somefn] [ old-somefn: get 'somefn somefn: func [ .. ][ .. old-somefn .. ] ] ] It appears a lot less brittle, since old-somefn is now local to child-object, and objects derived from child-object can use the same pattern. Does anyone know of a special case that would break this? (Beyond redefining 'uses' in a parent.. ) --Scott.