Continue execution of foo with a GUI []DQ created by thread

General APL language issues

Continue execution of foo with a GUI []DQ created by thread

Postby norbertjurkiewicz84 on Tue Jan 30, 2018 5:02 pm

I want to test some GUI functions and make sure they create the appropriate objects.

Say I have these two functions

      ∇ menu X;r
[1] 'M'⎕WC'Menu'
[2] 'M.m1'⎕WC'MenuItem' 'one'
[3] 'M.m2'⎕WC'MenuItem' 'two'
[4] r←⎕DQ'M'


∇ test;r;tid
[1] tid←menu&''
[2] ⎕DL 0.25
[3] ⎕←'menu exists: ',⍕9=⎕NC'#.M'



When I execute 'test', the menu is created in a thread, the execution of test stops until the menu is no longer DQ'd.

What is the best workaround for this?
User avatar
norbertjurkiewicz84
 
Posts: 61
Joined: Mon Nov 01, 2010 7:26 pm

Re: Continue execution of foo with a GUI []DQ created by thr

Postby Vince|Dyalog on Wed Jan 31, 2018 1:05 pm

Hi Norbert,

The popup menu is modal. We do not think that there is any way that you can workaround this.

Regards,

Vince
Vince|Dyalog
 
Posts: 348
Joined: Wed Oct 01, 2008 9:39 am

Re: Continue execution of foo with a GUI []DQ created by thr

Postby ray on Thu Feb 01, 2018 5:50 pm

Just a thought.....

"The popup menu is modal. We do not think that there is any way that you can workaround this."

I believe this is true, but I have had a lot of success by, rather than running code is a separate thread, running the code is a separate APL session and passing the results back via files.

The separate session, does not need even to be on the same machine.

I have not ever tried using futures and isolates, but think that might also be worth looking into.

Hope this helps.

Ray
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 181
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest