[REBOL] Re: dirty editor
From: ingo:2b1 at: 30-Jun-2002 23:51
Hi Gerard,
Gerard Cote wrote:
<...>
> Just one more thing.
>
> The last time I asked VIEW to "print block? ctx-edit" the answer was not "true". ?
> Can it really be so or did I goofed my VIEW somewhere ? For which situation can ctx-edit
not be a BLOCK if this is possible?
>
> I think it must effectively be possible for "ctx-edit" to not be a BLOCK because of
the test the EDITOR function is doing about it.
> But whatever is the reason for doing so this doesn't answer my question either.
Look at this fresh Rebol/View Session:
>> type? ctx-edit
== block!
>> editor %/tmp/x
>> type? ctx-edit
== object!
On Rebol startup, ctx-edit is a block containing the the blueprint for
the "real" ctx-edit object!.
It's done this way mainly because a block needs much less memory than an
object! created from it (especially if it contains 'view elements).
To not waste this memory, the object! is only created when it is really
needed.
I hope that sheds a little light on that one.
Kind regards,
Ingo