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

[REBOL] Re: patching an object

From: dhsunanda:gmai:l at: 7-Jul-2007 12:09

> Sunanda; I'm probably 'not getting it', but > > my-api: make my-api [b: 12 f1: [a - b]]
Thanks for the reply. The differences in your code are: If I put those characteristics back, and then try your make trick (rather than my original construct/with approach), I get.... my-api: make object! [ a: 1 b: 2 f1: func [] [print a + b] ] patch: make object! [b: 12 f1: func [][print a - b]] my-api: make my-api third patch ** Script Error: a has no value ** Near: print a - b .... which is the original issue, restated. This will work with your approach: my-api: make my-api load mold third patch But it hardly seems elegant to my mind. Any other approaches out there? Thanks, Sunanda