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

[REBOL] Re: private methods ? override ?

From: santilli::gabriele::gmail::com at: 6-Jun-2007 23:16

2007/6/6, Arnaud Garcia <arngar-gmail.com>:
> 2/ Is it possible to call the parent function, then override it,
A simple way to ovverride a function is (does not need to be inside an object): do-something: does [print "something"] use [super] [ super: :do-something do-something: does [ super print "something else" ] ] You can easily create an OVERRIDE function that does that, or you can create your own object constructor that overrides the functions that way istead of replacing them. HTH, Gabriele.