Re: [Factor-talk] Listener in a Different Context

2016-11-09 Thread Björn Lindqvist
Your original code works for me on Linux. Might be the Windows UI
backend doing something incorrect.

2016-11-09 20:30 GMT+01:00 Alexander Ilin :
> Thank you, John!
>
> I can now try to make it work for my real use case:
> "d:/" [ [ listener-window ] with-my-db ] with-directory
>
> : )) with-db is a bit trickier, I believe, than set-current-directory.
> with-disposal, in particular : )
>
> 09.11.2016, 22:00, "John Benediktsson" :
>
> Everything is possible, with varying amounts of work.
>
> This as it turns out is fairly easy but maybe requires defining a new word
> to make it easy.  Here is one way:
>
> : run-in-new-listener ( quot -- )
> '[
> _ \ run-in-new-listener listener-window*
> dup wait-for-listener (call-listener)
> ] with-ui ;
>
> Using it:
>
> [ "d:\" set-current-directory ] run-in-new-listener
>
>
>
> ---=---
> Александр
>
>
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>



-- 
mvh/best regards Björn Lindqvist

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Listener in a Different Context

2016-11-09 Thread Alexander Ilin
Thank you, John! I can now try to make it work for my real use case:"d:/" [ [ listener-window ] with-my-db ] with-directory : )) with-db is a bit trickier, I believe, than set-current-directory. with-disposal, in particular : ) 09.11.2016, 22:00, "John Benediktsson" :Everything is possible, with varying amounts of work. This as it turns out is fairly easy but maybe requires defining a new word to make it easy.  Here is one way:     : run-in-new-listener ( quot -- )        '[            _ \ run-in-new-listener listener-window*            dup wait-for-listener (call-listener)        ] with-ui ; Using it:     [ "d:\" set-current-directory ] run-in-new-listener  ---=---Александр --
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Listener in a Different Context

2016-11-09 Thread John Benediktsson
Everything is possible, with varying amounts of work.

This as it turns out is fairly easy but maybe requires defining a new word
to make it easy.  Here is one way:

: run-in-new-listener ( quot -- )
'[
_ \ run-in-new-listener listener-window*
dup wait-for-listener (call-listener)
] with-ui ;

Using it:

[ "d:\" set-current-directory ] run-in-new-listener






On Wed, Nov 9, 2016 at 10:48 AM, Alexander Ilin  wrote:

> Hello!
>
>   Is it possible to run a new instance of the listener in a different
> environment? I tried the following, and it didn't work as I expected:
>
>   "d:/" [ listener-window ] with-directory
>
>   I expected that running `current-directory get` in the new listener
> window would return "d:/", but I was wrong. Is this kind of thing possible
> at all?
>
> ---=---
>  Александр
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk