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

World: r3wp

[View] discuss view related issues

Anton
6-Oct-2006
[5724]
That's true, Ladislav, I was just about to write that it is possible 
to write higher-level functions.
Pekr
6-Oct-2006
[5725]
yes, it seems so ... print: :probe is known only in a newly created 
context, or so it seems ...
Ladislav
6-Oct-2006
[5726]
right, Pekr
Pekr
6-Oct-2006
[5727]
'bind offers whole level of interesting low level (or high level, 
it depends how you look at it :-) magic ...
Ladislav
6-Oct-2006
[5728]
right again
Pekr
6-Oct-2006
[5729]
you can "borrow" your values here or there ...
Ladislav
6-Oct-2006
[5730x2]
actually, you "borrow" variables, when using BIND
(which is almost the same in many cases)
Pekr
6-Oct-2006
[5732]
and when such variable "points to" some other context, you get there 
too with newly binded word? Well, that is interesting also from security 
pov - we have powerfull instrument on one hand, but we have to be 
carefull on the other hand ...
Ladislav
6-Oct-2006
[5733]
yes, that is why REBOL modules are hard to implement
Pekr
6-Oct-2006
[5734]
one question - can we save and send some context, with all its bindings, 
to some other machine, load it there, and theoretically expect that 
such rebol got all identical environment?
Ladislav
6-Oct-2006
[5735]
no
Pekr
6-Oct-2006
[5736]
that could easily mean copying all internal state of particular rebol 
process, right? :-) I wonder is some language makes such a "reflectivity" 
(probably improper word) possible ...
Anton
6-Oct-2006
[5737]
Of course, enter Jaime...
Pekr
6-Oct-2006
[5738]
ah, so Scheme?
Ladislav
6-Oct-2006
[5739x2]
Confusion for Pekr:

    f: func [x] [x]
    g: func [x] [x]
    var1: first second :f
    var2: first second :g
    bind second :f var2
    bind second :g var1
    f 1
    g 2
    f 3
    g 4
what a mess, isn't it?
Pekr
6-Oct-2006
[5741]
yes, it is :-)
Anton
6-Oct-2006
[5742]
Let me guess output: none, none, 1, 2  ?
Ladislav
6-Oct-2006
[5743]
wrong
Anton
6-Oct-2006
[5744]
Oops.
Ladislav
6-Oct-2006
[5745]
#[unset!] 1 2 3
Anton
6-Oct-2006
[5746]
Ok makes sense.
Pekr
6-Oct-2006
[5747]
fuctnion words remember their values? g 2 results in 1, which is 
there because there was first call to f 1
Anton
6-Oct-2006
[5748]
All words remember their values, unless you rebind the words to a 
different context. Whether a word is in a function body block or 
not doesn't matter.
Ladislav
6-Oct-2006
[5749]
warning! according to the documentation it is possible that in the 
future REBOL function words will be set to #[none!] or something 
else when the function returns
Henrik
8-Oct-2006
[5750x2]
Anyone have an idea on how INFORM stops the event system and returns 
to the console after pressing a button, allowing it to return a value? 
I've been studying the source of SHOW-POPUP, HIDE-POPUP, INFORM and 
the various POPFACE-FEEL objects, but I can't figure out how it's 
done.
pressing a button = pressing a button in an INFORM
Gabriele
9-Oct-2006
[5752x2]
check the wake-event function
basically, inform does a new wait []
Anton
9-Oct-2006
[5754]
Starting at the top:
system/view/event-port/awake --->  system/view/wake-event
Gabriele
9-Oct-2006
[5755x2]
wake-event behaves differently when there is a popup open
it returns true (which makes wait [] return) when hide-popup has 
been called
Anton
9-Oct-2006
[5757x2]
Yes, wake-event calls system/view/popface/feel
inform calls show-popup which creates your new pop-face.
Rebolek
12-Oct-2006
[5759]
simple and almost useless tool :)

do http://bolek.techno.cz/reb/webtext.r
Anton
12-Oct-2006
[5760]
Hmm not bad.
Gregg
12-Oct-2006
[5761]
Very cool bolek! With a few more fields for control of color and 
gradients, and the ability to save as an image, I would suggest it 
for inclusion as a Desktop entry with things like Font-lab and such.
Rebolek
12-Oct-2006
[5762]
Good idea, Gregg, I'll look into it! Hm, guess I should finish Texture-lab 
also... :)
Gregg
12-Oct-2006
[5763]
Yes! That was a way cool app.
Rebolek
12-Oct-2006
[5764]
Updated version of TextureLab - do http://bolek.techno.cz/reb/texture-lab.r
Louis
14-Oct-2006
[5765x6]
What could be causing this error. I get it whither I encap or not.

** Script Error: trans-date has no value
** Where: switch
** Near: forall args [
    val: first args
    switch/default type?/word val [
        pair! [append pairs val]
        integer...


So far as I know I haven't touched this part of the script this is 
found in.
Is there anything wrong with this:


style dater txt bold right [trans-date/text: copy (to-string now/date)] 
48x24
or this:


        dater "T-Date:" trans-date: field 80x24 (to-string now/date) feel 
        [
            engage: func [face action event][
                if action = 'up [

                    lv-dat: request-date/date/offset (now/date) 315x30
                    if lv-dat <> none [
                        trans-date/text: copy to string! lv-dat
                        show trans-date
                    ]
                ]
            ]
            ;trans-date/text: copy (to-string now/date)
            show trans-date
        ]
I really have trouble debugging view scripts, especially long complicated 
ones.  Usually, I make only one of two changes, then run the script. 
That way I know what part of the code is actually causing the error. 
This time, however, after making some changes I had to take care 
of an unrelated problem before I had opportunity to test the script. 
Now several months later, I finally have time to test, but ... I 
can't remember what the last changes were.
Has anyone written a "How to debug REBOL/View" doc?
Are there any debug tools?
Graham
14-Oct-2006
[5771x3]
Your error says 'trans-date is not defined.
trans-date is defined in your layout .. so therefore must be reference 
before the layout is created if you have that error.
without seeing the relevant part it may be that the problem is that 
your style references a field which has not been defined yet.