Chris et al,

Can I just summarise what I *think* is being done here, to make sure I actually 
understand the question?

So...

- I imagine that PS calls a function with a C API (and perhaps provides e.g. 
callbacks, also with C API, to allow the called function to interact with the 
PS instance.)

- The called function is used to pop-up some GUI written in fltk, which I 
assume calls Fl::run();

- When the pop-up closes, the function returns to PS.


Observed behaviours are...

- The first time this is invoked, the pop-up appears just fine and it all Just 
Works.

- On subsequent attempts, the GUI simply never appears...


We think that...

- PS does not unload the fltk DLL after the first pass

- Attempts to unload the DLL on purpose don't seem to help

- The OP (Chris) has made some attempts to "reset" the fltk static context 
between runs, but that doesn't seem to have helped

- Other stuff...?


Looking at Fl.cxx, I wondered about:

- the "Check" list (near line 342) - can we (should we? do we?) reset that 
between runs of the pop-up?

- the oleInitialized stuff, and win32_at_exit instance - can we (should we) 
trigger that manually when the pop-up expires to get things ready for the next 
time?

- Fl_X::first (near line 657) do we need to clean that up...?



Also: What does the Chris do in the pop-up function? 

I imagine that the first time in, this creates all the fltk windows and widgets 
that are needed.

Now, does it tear them down on pop-up exit, then re-create them on the next 
call?

Or, should it create them on the first call, but retain them and re-use them on 
subsequent calls? Would that be better? Would that perhaps avoid the re-init 
issues we seem to be seeing?


Thoughts?



SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to