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

[REBOL] Re: object/property1: "new value"

From: gjones05:mail:orion at: 29-Jan-2001 14:27

Hi Helmut, Elan seems to have answered your first question that pertains to protecting attributes in objects. I am not sure that I fully understand what you are asking in your second question: ...
> > 2) how can I get an event, when an object variable is changed?
... Maybe an example will help. Here is an object with attributes and functions taken from: account: make object! [ name: "Flintstone" balance: $100 ss-number: #1234-XX-4321 deposit: func [amount] [balance: balance + amount] withdraw: func [amount] [balance: balance - amount] ] Are you asking how to "fire" an event if an attribute, such as 'balance, is changed? Or are you asking how to get and set the attribute? Or are you asking something else entirely? --Scott