Hi Volker,

no, the behaviour is correct. Try this:


unset 'b
a: make object! [b: none unset 'b if not value? 'b [b: "a bee!"]]
a/b

>
>
> [rebol[author: "Volker"]
>
> {seems 'make does no deep binding? without bug this
> should set 'b in object-context too (hopefully)?}
>
> unset 'b
> a: make object! [if not value? 'b [b: "a bee!"]]
> b
> a/b
> ]
>
> >> unset 'b
> >> a: make object! [if not value? 'b [b: "a bee!"]]
> >> b
> == "a bee!"
> >> a/b
> ** Script Error: Invalid path value: b.
> ** Where: a/b
>
>
> > That looks like a bug.  -Carl
> >
> > >Anyway, I can prove that there is no context hierarchy:
> > >
> > >>> a: 1 b: 1 c: 1
> > >== 1
> > >>> obj1: make object! [
> > >[    a: 2
> > >[    obj2: make object! [
> > >[        b: 2
> > >[        obj3: make object! [
> > >[            c: 2
> > >[            ]
> > >[        ]
> > >[    ]
> > >>> blk: [a b c]
> > >== [a b c]
> > >>> print blk
> > >1 1 1
> > >>> print bind blk in obj1/obj2/obj3 'self
> > >1 1 2
> > >
> > >If contexts where organized hierarchycally the output would
have
> > >been "2 2 2".
> >
> >
> >
> >
>
>

Reply via email to