r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

Allen
17-Mar-2009
[12031x2]
stunnel not really an option since the tools will end up in the hands 
of sales people on window machines... I don't think I need to explain 
that. :-)
But I should try for my own testing. thanks for the idea.
BrianH
17-Mar-2009
[12033]
sales people
, got it :) Otherwise you could use stunnel on Windows machines.
Maarten
18-Mar-2009
[12034]
ssl:// updated and working 100% correctly. My vote too!
Pekr
19-Mar-2009
[12035]
Those wanting to influence VID resizing model  - http://www.rebol.net/wiki/GUI_Face_Sizing
Ammon
19-Mar-2009
[12036]
----  Cross-posting from DevBase -----

window: view [t: text ""]


window is set to a gob which is useless to me.  t is totally lost 
and I can't modify it.  What to do?!?
Henrik
19-Mar-2009
[12037]
you can't modify 't outside the layout. binding stuff.
Ammon
19-Mar-2009
[12038]
That doesn't make sense.  Code that is not specifically *in* the 
layout can't modify faces/gobs/etc???
Anton
19-Mar-2009
[12039]
Don't be ridiculous. 't exists somewhere - so find out where.
Henrik
19-Mar-2009
[12040]
Ammon, you can pass 't to a function used inside the layout, if you 
want. I'm genuinely not sure where in the system the face would be 
stored as I've not encountered a situation yet where that would be 
needed.
Anton
19-Mar-2009
[12041x3]
Oh yes, looks like Ammon's right, actually. Each Face has a reference 
to its associated Gob, but the Gob does not have a reference to the 
Face. So if you only have the gob, you can't get to the face, where 
the variables like 't can be found.
Just reading the source - correct me if I'm wrong.
Yep, I remember I came across this before, and I didn't like this 
behaviour either.
It makes debugging and learning the system more difficult.
Henrik
19-Mar-2009
[12044]
I'm not sure it does. It's not meant to be poked and hacked like 
VID can be. You go through proper channels, because the proper channels 
are actually there now. :-) Also the built in debugging functions 
can provide a lot of information.
Anton
19-Mar-2009
[12045]
not meant to be poked and hacked
 ===> yeah right !   :-)
Henrik
19-Mar-2009
[12046]
Anton, the style actors, reactors SET-FACE, GET-FACE, SET-FACET and 
GET-FACET are there to affect the given face in the way it is intended 
to be, encapsulating the functionality in the right places, so no 
hacking is needed. You just create a new style with altered functionality, 
if you need it.
Anton
19-Mar-2009
[12047]
no hacking is needed
 - this just seems naiive.
Henrik
19-Mar-2009
[12048]
I guess you haven't tried working with VID3.4 then.
Anton
19-Mar-2009
[12049x2]
You've obviously worked with it much more than me.
(It's obvious to me, anyway. I haven't done that much except a few 
experiments and reading here and there.)
Henrik
19-Mar-2009
[12051]
I have, and the actors provide everything you need and you can be 
as elaborate as you need to be, process any events anywhere you like. 
There are even specific functions to override actors, in case you 
need to make a small addition to a big actor, when creating a derivative 
style. You can also create new actors. This is not much different 
from what VID3 had, except it's easier to program.
Anton
19-Mar-2009
[12052]
Ok, so how would you modify Ammon's example so the text facet/gob 
can be inspected ?
Henrik
19-Mar-2009
[12053x2]
the question is why he wants to inspect it.
(in that, there may be a different, but just as good a method to 
do it)
Anton
19-Mar-2009
[12055]
Can you do it, or not ?
Henrik
19-Mar-2009
[12056x2]
but other than that, enabling debugging lets you see the inner workings 
of a face
http://rebol.net/wiki/GUI_howto_debug
Anton
19-Mar-2009
[12058]
So Ammon's example could be modified to:

	view [t: text "" debug]
Henrik
19-Mar-2009
[12059]
yes
Anton
19-Mar-2009
[12060]
which dumps the face contents.
Henrik
19-Mar-2009
[12061]
also:

view [t: text do [probe face]]

dumps the gob as well.
Anton
19-Mar-2009
[12062]
No, it doesn't (?)  The gob is usually returned by VIEW and molded 
by the console..
Pekr
19-Mar-2009
[12063]
there is also whole instrumentation for debugging purposes, so ...
Henrik
19-Mar-2009
[12064]
Anton, ah, it can't do that from a text label with nothing in it, 
of course. Try something like BUTTON instead.
Anton
19-Mar-2009
[12065x3]
Custom debugging print outs.

What if you just want to print the size of the TEXT face, for instance?
How would you do that? (Not dump the whole face.)
Say, on init.
Henrik
19-Mar-2009
[12068x4]
Go to the style code and add the print there.
(note that more debug outputs can be added, if some are needed)
I have a style that displays its current size inside the View window 
at all times. Perhaps this can be added as a debugging feature.
http://rebol.hmkdesign.dk/files/r3/gui/061.png
Pekr
19-Mar-2009
[12072x2]
debug: [style make] ?
http://rebol.net/wiki/GUI_howto_debug#Runtime_Debug
Anton
19-Mar-2009
[12074]
Modifying the style code could be quite uncomfortable, when you just 
want some information quickly. I don't want to have to mess with 
files just to print a bit of custom debug info.
More debug outputs could alleviate this discomfort somewhat.
Henrik
19-Mar-2009
[12075]
I think it's possible to create a debug function that returns a facet 
for a given face when a given event happens, like:

get-debug 'my-face 'text-body 'on-make
Anton
19-Mar-2009
[12076]
Yes, you can use DO with BUTTON:

	view [t: text "hello" button do [dump-face t ]]

dumps the TEXT face when the button is clicked.
Pekr
19-Mar-2009
[12077]
Henrik - why don't you release your DocBase resizing doc? :-)
Henrik
19-Mar-2009
[12078]
Pekr, because I know Carl will ignore it. In fact he just posted 
something like that on rebdev.
Pekr
19-Mar-2009
[12079]
I think that nothing is set in stone, ne? It all started with the 
lack of decomposition from gob to face, no? Maybe the system could 
keep the list of references somewhere, no? Or simply face could be 
extended with the list of gobs it is composed from?
BrianH
19-Mar-2009
[12080]
Gobs that are the top gob for a face have a reference to the face 
in something like gob/data, as I recall.