formEXdesktop.dll and threading.dll

Byak@

Active Member
Licensed User
if i'm use

formex.new1("main")
formex.run

, threading.firethreadevent doesnot work.
but if im use

main.show

all work right.why?:confused:

im use formexdesktop 1.1
 

Cableguy

Expert
Licensed User
Longtime User
I may be off on this, but if I understand correctly, the RUN method is for forms, created using the new2 method...
for using an already existing form, created in the basic4ppc designer, you need to use the show method from the controlsex lib....
But then again, I may be a bit of...

NeverTheLess, do remember that Agraham states in is overview of the threading dll, that you should not use threading while interacting with screen objects like controls...
 

Byak@

Active Member
Licensed User
thread doesn't use controls, i'm know it.

no,run metod used in new1 and new2 metods.
i'm use new1 metod.

with and without formex thread work but with formex doesnot work threading.firethreadevent metod.

help!
 

agraham

Expert
Licensed User
Longtime User
threading.firethreadevent does not work.
You are correct, neither does the firedebugevent work.:sign0013:

The thread is in fact running fine but B4ppc is not processing the events. B4ppc events run on the thread of the the main GUI form so that they can safely manipulate GUI controls. To safely process events the B4ppc code needs to know the Form that owns the GUI. Unfortunately I cannot at the moment tell the B4ppc code that a FormEx is that form as the .NET typing system won't allow it. This is because the B4ppc code expects a form that is higher in the inheritance chain than the normal Form that a FormEx uses. You are allowed to assign down the chain but not up so I cannot assign a FormEx as the main form and so get cross-thread events to work.

There is at least one way to arrange for this necessary cross thread marshalling but I need to think about it to get the most elegant and consistent solution.
 

Byak@

Active Member
Licensed User
good work!!!
 
Top