Hi all,

I have some issues when running a UI application from terminal listener.
The code is from the fuel presentation found at http://blip.tv/file/1658806 :

USING: ui ui.gadgets.labels ;
IN: ui-test

: ui-test ( -- )
   [
       "Hello world" <label>
       "Hi" open-window
   ] with-ui ;

MAIN: ui-test

I started the listener:

factor.com -run=listener
( scratchpad )

And then:

( scratchpad ) "ui-test" run
Loading resource:work/ui-test/ui-test.factor

The windows shows correctly. I closed the window and then:
( scratchpad ) USE: threads
( scratchpad ) [ "ui-test" run ] in-thread
The window is not displayed, then running
( scratchpad ) "ui-test" run
displays both windows as expected. After I closed them I tried
( scratchpad ) [ "ui-tools" run ] in-thread
and nothing is displayed. Then again:
( scratchpad ) "ui-test" run
brings up the following:
Error in thread 21 (Thread, [ ~array~ set-datastack ~quotation~ call ]):

Generic word layout-state>> does not define a method for the POSTPONE: f class.
Dispatching on object: f

( callback )
[ init-catchstack [ 2 setenv call ] keep -> wait-to-return ]
[ over [ call ] dip -> ]
[ 4dup handle-wm-paint -> DefWindowProc ]
handle-wm-paint
relayout-1
M\ object layout-state>>
no-method
M\ object throw
[
   63 getenv error-thread set-global
   continuation -> error-continuation set-global rethrow
]
The die word was called by the library. Unless you called it yourself,
you have triggered a bug in Factor. Please report.
Starting low level debugger...
 Basic commands:
q                -- continue executing Factor - NOT SAFE
im               -- save image to fep.image
x                -- exit Factor
 Advanced commands:
d <addr> <count> -- dump memory
u <addr>         -- dump object at tagged <addr>
. <addr>         -- print object at tagged <addr>
t                -- toggle output trimming
s r              -- dump data, retain stacks
.s .r .c         -- print data, retain, call stacks
e                -- dump environment
g                -- dump generations
data             -- data heap dump
words            -- words dump
tuples           -- tuples dump
refs <addr>      -- find data heap references to object
push <addr>      -- push object on data stack - NOT SAFE
code             -- code heap dump
READY

Any ideas as how to the start a UI app but still be able to use the terminal?

I am using Windows XP SP3, factor build factor-winnt-x86-32-2010-01-08-01-07.

Thank you for your time,
Stefan


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to