tags:

views:

40

answers:

2

Taken from http://www.rebol.com/docs/view-system.html#section-4:

In some cases you may want to view a window but continue evaluating code after the window is open. You can do that by specifying the new refinement. Here is an example:

print "opening window..."
view/new make face [
    offset: 100x100
    color: papaya
    text: "Example"
]
print "continuing..."

The problem is if I run the code from Rebol's Console, the console is blocked until I close the Windows, whereas I would like to continue what I want in Console.

So how do I unblock the Console ?

A: 

Works for me.

Are you running this as a script or just typing into the console?

Graham Chiu
in console, I don't want to run it as script.
Rebol Tutorial
+1  A: 

Revised answer as a possible way forward regarding your wish for an always opened windows during the console session while continuing to work in console.

One way to get close is to have a console input field within your GUI page itself:

print "opening window..."
unview/all
view/new layout [
        label "console"
        console: field 300x300 [
                    print console/text attempt [do console/text]
                    ]
        ]

print "continuing..." do-events

That way, you can type into that box, and see the response in the console window.

I use the technique as a way of debugging view applications....you can have some code that adds a debug console or not according to a start-up option, so it is only there when you need it.

Sunanda
Yes it prints but can you type anything else in console before closing the above window ? That's what I want: an always opened windows during the console session while continuing to work in console.
Rebol Tutorial