AltME: R3-GUI

Messages

Andreas
(But in all fairness, R3/View for Linux is still rather young.)
I just run your (Graham) example:
https://gist.github.com/earl/fbbe993ddda2857347ae
With 32-bit and 64-bit R3/View from Atronix. Both require the mouse to be moved over the R3-GUI window (or some other cause of events) for the timer field to be visibly updated.

Rebolek
It seems there's some composition bug under Linux.
GrahamC
view layout [
    title "Main Window"
    button "Open New" [
        view/new/offset layout [
            title "Second Window"
        ] 200x200
    ]
]
view [
    vgroup [
        title "Original Window"
        text "What should happen on closing this window?"
        button "Open New" on-action [
            view [
                vgroup [
                    title "New Window"
                    text "This window closes when you close original"
                ]
            ]
        ]
    ]
]
Cyphre .. the first example under R2/VID .. the second window remains open.  In the second example, the child window remains open but the interpreter drops to the CLI.
There should be a 'halt at the end of that to show the console active
Without a halt, both windows close when you close the parent
Cyphre
Graham, I just updated the r3-gui sources at github and synced the LOAD-GUI version to reflect the changes. The issue you reported above should be fixed in this release. Please, give it a try and let me know.
GrahamC
Ok, will try
GrahamC
Has fixed this problem but has broken my other scripts
GrahamC
REBOL []
if not value? 'to-text [ load-gui ]
v: module [
    Version: 0.0.0
    type: module
    exports: [ test ]
][
    test: func [] [
        view [area]
    ]
]
import v
test
This worked before the new r3-gui from today
Now, the module doesn't know about view
Fetching GUI...
** Script error: layout word is not bound to a context
** Where: if view test do either either either -apply-
** Near: if block? window [
    window: layout/background window any ...
GrahamC
Seems it didn't work with old r3-gui.r3 either . must be another issue I'm having
yoffset
I concur the original problem is fixed on 32 bit, and G must have some other problem.

Cyphre
Graham, this is not a problem of R3GUI. If you want to access 'global' words of your script you need to provide the context to the module. Like:
REBOL []
if not value? 'to-text [ load-gui ]
v: module/mixin [
    Version: 0.0.0
    type: module
    exports: [ test ]
][
    test: func [] [
        view [area]
    ]
] self
import v
test
AFAIK By default, the module imports only words defined in LIB context.
R3-GUI is not yet converted to module but once it is done we'll be able to specify something like  needs: [r3gui] in the headers.
Andreas
Hmm, I tried the MODULE/mixin approach yesterday as well, and couldn't get it to work.
Cyphre
Andreas, that example above worked for me.
Andreas
Let me try again.

Last message posted 270 weeks ago.