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

[REBOL] Private Object Function

From: coussement::c::itc::mil::be at: 15-Jan-2001 10:52

Hi REBOLS, I would like to make an object function private to this object. That is:
>> o: make object! [
[ value: make integer! 1 [ ; some privatization code ... [ add-one: does [value: value + 1] [ get-value: does [add-one [ print value] [ ]
>> o/get-value
2
>> o/add-one
here I should get something like... ** Script Error: Invalid path value: add-one. ** Where: o/add-one Any idea ? Of course the principle could be extended to the privatization of variables... Thx a lot, Best Regards, chr==