bmistiaen
2010-08-24 10:10:03 UTC
Hello,
I have a mouseDblClick method on a Tree object in a form (A).
When I doubleclick, the called form (B) is opened, but since there's still
code left to be executed in the caller (A), the caller (A) gets focus again.
The result of this is that the called form (B) is opened BEHIND the calling
form (A).
public int mouseDblClick(int _x, int _y, int _button, boolean _Ctrl, boolean
_Shift)
{
int ret;
Args parameters = new Args();
FormRun formRun;
;
ret = super(_x, _y, _button, _Ctrl, _Shift);
parameters.name(formstr(SalesTable));
formRun = ClassFactory::formRunClassOnClient(parameters);
formRun.init();
formRun.run();
//formRun.wait();
formRun.detach();
return ret;
}
When I use wait() instead of detach(), then the called form (B) stays in
front of the calling form (A).
The drawback is then, that the user CANNOT CLOSE calling form (A), before
the called form (B) is closed.
So, the question is if there's a solution to have (B) open in front of (A)
in a mouseDblClick method,
whith the user still being able to close (A) before (B)?
I have a mouseDblClick method on a Tree object in a form (A).
When I doubleclick, the called form (B) is opened, but since there's still
code left to be executed in the caller (A), the caller (A) gets focus again.
The result of this is that the called form (B) is opened BEHIND the calling
form (A).
public int mouseDblClick(int _x, int _y, int _button, boolean _Ctrl, boolean
_Shift)
{
int ret;
Args parameters = new Args();
FormRun formRun;
;
ret = super(_x, _y, _button, _Ctrl, _Shift);
parameters.name(formstr(SalesTable));
formRun = ClassFactory::formRunClassOnClient(parameters);
formRun.init();
formRun.run();
//formRun.wait();
formRun.detach();
return ret;
}
When I use wait() instead of detach(), then the called form (B) stays in
front of the calling form (A).
The drawback is then, that the user CANNOT CLOSE calling form (A), before
the called form (B) is closed.
So, the question is if there's a solution to have (B) open in front of (A)
in a mouseDblClick method,
whith the user still being able to close (A) before (B)?