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

[REBOL] Re: How do I dynamically modify an object?

From: tim::johnsons-web::com at: 14-Jan-2003 12:31

* Ed Dana <[EDanaII--Cox--net]> [030114 11:50]:
> Using the examples from the REBOL On-line dictionary: > >> Example: Make Object! [ Name: "Fred" Age: 5000000 ] > >> Get in Example 'Name > == "Fred" > >> Set in Example 'Name "Fred Flintstone" > == "Fred Flintstone" > > How do I dynamically add to example, after it has been created, Address: > "123 Bedrock Path". > > I tried using 'Set, 'Make and a couple other functions, but they didn't > work. I was probably using them wrong. :)
Hi Ed: Below are a couple of examples. I'm also hoping others will chime in about the subtle differences in 'get and 'set, as they still elude me also. =t
>> t1: make example[address: "here"] >> probe t1
make object! [ Name: "Fred" Age: 5000000 address: "here" ]
>> append t1/address " there"
== "here there"
>> probe t1
make object! [ Name: "Fred" Age: 5000000 address: "here there" ]
>> t1/address: "Anywhere"
== "Anywhere"
>> probe t1
make object! [ Name: "Fred" Age: 5000000 address: "Anywhere" ]
> -- > Sincerely, | For long you live and high you fly. > Ed Dana | And smiles you'll give and tears you'll cry > Software Developer | And all you touch and all you see, > 1Ghz Athlon Amiga | Is all your life will ever be. > | -- Pink Floyd, Breathe. > =========== http://members.cox.net/edanaii/Home/Default.html > > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com