[REBOL] Q on Array of Objects Re:(3)

1999-12-03 Thread lmecir

Hi, Blaz,

you wrote:

> Now a METHOD datatype would make things interesting since I've always
> had an interest in seeing if one can create a class heirarchy ala
> Smalltalk within Rebol.
>
> I suppose while you're at it adding a METHOD datatype, how about a
> CLASS datatype ;).
>
> Regards
> Blaz
>

you can create methods and classes even now, have a look at Objects:
Preventing  Code Duplication...

-Ladislav



[REBOL] Q on Array of Objects Re:(3)

1999-11-27 Thread icimjs

Hi wwink2, 

you wrote:
>print same? :xarr/1/myfun   :xarr/2/myfun
>** Script Error: xarr is missing its x argument.
>** Where: print same? :xarr/1/myfun :xarr/2/myfun

Try:
same? get in xarr/1 'myfun get in xarr/2 'myfun

You will find that same? returns falls.

Elan



[REBOL] Q on Array of Objects Re:(3)

1999-11-27 Thread Al . Bri

>> o!: make object! [
[s: "OneTwoThree"
[St: func [] [s]
[]
>> o1: make o! [
[o1: "O1"
[]
>> o2: make o! [
[o2: "O2"
[]
>> probe o2

make object! [
s: "OneTwoThree"
St: func [][s]
o2: "O2"
]
>> o2/St: "Hello"
== "Hello"
>> probe o2

make object! [
s: "OneTwoThree"
St: "Hello"
o2: "O2"
]
>> probe o1

make object! [
s: "OneTwoThree"
St: func [][s]
o1: "O1"
]

Words in objects which refer to functions are copied. Therefore the
object will be bigger than expected.

Andrew Martin
Who believes simplicity is a virtue...
[EMAIL PROTECTED]
http://members.xoom.com/AndrewMartin/
Online @ 33,600 Baud!
-><-