AltME: R3-GUI

Messages

Cyphre
yes, once new 'experimental' version is out, R3-GUI will be updated as well to reflect the funct/clos changes etc.
Andreas
Good that I didn't spend more time yesterday on this module thingie. Could have tried until old age, I guess.
Stupid :)
Cyphre
Unfortunately, the last Saphir Linux build was done at time when no Linux View port existed yet. Who would guess we'll have it couple months later? :)

GrahamC
view [
    title "Main Window"
    button "Open" on-action [
        cmd: none
        view/modal [
            title "Child Window"
            hpanel [
                label "Cmd:" field on-action [
                    set 'cmd get-face face
                    print cmd
                    close-window face
                ]
            ]
        ]
        print "this is not evaluated, and how do I set cmd in this context from the modal window"
    ]
]
looks like code after the view/modal is ignored ...
yoffset
view [
    title "Main Window"
    button "Open" on-action [
        cmd: none
        view/modal [
            title "Child Window"
            hpanel [
                label "Cmd:" f: field
                button "set command" on-action [
                    set 'cmd get-face f
                    print cmd
                    close-window face
                ]
            ]
        ]
        print "this is not evaluated, and how do I set cmd in this context from the modal window"
    ]
]

GrahamC
looks like a bug
doesn't load in in r3-gui ...
GrahamC
but using decode 'GIF read url works
yoffset
I misunderstood your original aim.  
You are correct.  Works with a regular nested view, but not with a nested view/modal.
yoffset
view is type gob!
but view/modal is type none
re-   but using decode 'GIF read url works
cool !  thanks !
Cyphre
GrahamC: the view/modal should work now...get the latest version either from github or use LOAD-GUI
Cyphre
regarding the GIF loading...this is a bug in LOAD...I suspect it parses the URL for the image suffix at the end only so:
;this is not recognized filetype
LOAD http://i.stack.imgur.com/XgLe7.gif?s=128&g=1&g&s=32
;but this will be recognized as GIF filetype
LOAD http://i.stack.imgur.com/XgLe7.gif?s=128&g=1&g&s=32&.gif
Someone needs to fix LOAD parser or even add file type signature recognition to LOAD...

yoffset
This code doesn't call the draw dialect, and works.
Bck: make image! 500x500    
View/no-wait [image Bck]
    Draw Bck to-draw [
line-width 1 fixed
pen white
fill-pen blue
box 120x20 220x120
skew 15x15
fill-pen red
box 120x125 220x225
reset-matrix
skew -15x-15
fill-pen yellow
box 120x230 220x330
    ]
    copy []
    
Do-events
This code does call the draw dialect, and doesn't work, for some unknown reason.
ar: [
line-width 1 fixed
pen white
fill-pen blue
box 120x20 220x120
;skew 15x15
skew .15
fill-pen red
box 120x125 220x225
reset-matrix
;skew -15x-15
skew -.15
fill-pen yellow
box 120x230 220x330
    ]
view/options [
    tight [
    drawing ar
    ]
] [
init-hint: 600x650
]

yoffset
So I'm trying to figure a way to activate a break in a loop, to stop, from an exterior button press.  Seems a bit trivial but I'm not getting it.  Any suggestions?
GrahamC
yoffset
The toggle suggests another approach I hadn't thought about.  Thanks.
However, it doesn't solve my original problem.
Here is some obvious pseudo-code that doesn't work.  Any ideas/
num: 3
view [
    when [enter] on-action [
        while [num = 3] [
        print num wait 1
        ]
    ]
    button on-action [ num: 2 ]
]

Last message posted 108 weeks ago.