[REBOL] Re: VID, layout, DO, init, hide, show === ISSUE + BYPASS THE ISSUE
From: nitsch-lists:netcologne at: 27-May-2003 15:09
Marc Meurrens wrote:
> Hi,
>
> Thanks Jaime & Gregg.
>
> I didn' t know the existence of the show? attribute for faces.
> Is it documented somewhere???
> I did not find it in the view-guide..
> Any URL ???
>
> Seems to have strange properties demonstrated by this small script
> that you may run on your REBOL/VIEW machine
> More info on show? ???
[REBOL [
Comment: {
Hi Marc,
Some other ways to do the hiding stuff and a bit explanation.
Why does changing /show? not work in your demo?
Changing face-facets is deferred until the face is redrawn.
that happens when you move the mouse over the button,
or when you call 'show on the face.
You discovered the post-view-processing trick based on rate.
Another way to do it is shown below.
system/view/screen-face/pane holds all windows,
if we have exactly one after view/new there is only ours,
so we start the event-loop ('view makes a similar decision).
But instead of hiding unused buttons, i prefer to gray it.
see the "inactive" -toggle.
(for effects try "rebol/demos/effect-lab" from the rebtop)
}
Author: "Volker"
]
;print "console.." ; for debugging immediate..
lay: layout [
text "the demo-button"
tx: button "click me" [alert "click"]
text "do stuff with it"
across
check [either face/data [show tx] [hide tx]] text "show" return
check true [either face/data [
tx/pane: none
] [
tx/pane: make-face/size/spec 'image tx/size [
effect: [merge blur cross]
]
]
show tx
] text "active"
below button "quit" #"^q" [quit]
]
view/new center-face lay
wait 0.01 ;process initial events, window open etc.
hide tx ;now this works
if 1 = length? system/view/screen-face/pane [do-events]
]