[REBOL] Re: arguments from/to request-font
From: d4marcus:dtek:chalmers:se at: 27-Dec-2000 22:33
On Fri, 22 Dec 2000, Andrew Martin wrote:
> Why not a refinement to specify a existing style? Like:
> request-font: func [/font font-object [object!]] [ ; etcetera.
> Then in the function set up the display so that it matches passed in
> font-object. If there's no changes, 'request-font returns 'none, if the user
> changes, the new font-object is returned.
I've added this behaviour now. Unfortunately, it can only be called from
the console. If called from another face the face is closed, and the
request-font tries to return a value that isn't set yet. It's a little
hard to explain, so here's the code (the important parts):
req: func [
/font font-object [object!] "Existing font-object to modify"
...
view reqface
return result]
'reqface is the face where it all happens. 'result is set by functions
called by buttons in 'reqface, OK or None.
Why doesn't the 'req function wait until "view reqface" is finished? And
how do you call view so that an existing face isn't closed, without using
the 'new refinement (which would make it return immediately)?
Marcus
------------------------------------
If you find that life spits on you
calm down and pretend it's raining