[REBOL] Re: Stylize/deep
From: petr:krenzelok:trz:cz at: 26-Dec-2001 6:22
Petr Krenzelok wrote:
> Ammon Johnson wrote:
>
>> I see where you are coming from, sld happens to be a slider, but it
>> is not
>> defined until init happens so... One thing you might like to try at the
>> console is,
>>
>>>> probe get-style 'text-list
>>>>
>>
>> That will return the actually text-list style, which may give you
>> awonderful
>> insight. Something that you will notice is that 'sld is defined in
>> the 'init
>> function so you will need to redefine it something like:
>>
> or just use layout post-processing capability, something like:
>
> view layout [t: text-list "ABCD" do [t/sld/edge/color: 0.0.0]]
>
> ... the 'do block will be called just once, after the 't is already
> defined .... or so it seems ....
>
> -pekr-
>
while we are at it, you can even do following:
view layout [t: text-list "ABCD" do [t/sld/dragger/image: load
%/C/Rebol/View/bay.jpg t/sld/dragger/effect: [tile-view] show t]]
however - there is some problem with such aproach:
1) it doesn't show the image when running for the first time, even if
'show t is explicitly being done
2) it hardcodes above values into system structure, so all your further
dragger usage will show an image, and it is not what we intended to do ....
I think that while it is fine we have some stylize, get-styles and other
helper functions, layout should always copy system styles, to save us
from typical rebol object headache - shared subobjects. Is there any
reason why subobjects are shared other than possible memory saving? I
think that if something causes global confusion, it should be removed.
Calls to make/deep are not fullfilled, so typical View novice annoyance
is - how's that changing something on one place in one time influences
its further usage?
-pekr-