Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-14 Thread Ivanko B
Looks fixed :)

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-14 Thread Martin Schreiber
On Thursday 14 November 2013 10:28:55 Ivanko B wrote:
 Looks fixed :)

You probably accidentally set ow1_canclosenil in your form, therefore the 
suggestion to remove that flag or to check the amodalresult parameter in 
onclosequery for mr_canclose. Both would solve the problem.

Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-14 Thread Ivanko B
You probably accidentally set ow1_canclosenil
==
Most probably me misunderstood the meaning of this option - smth like
alowing NULL DB-values on checking edit widgets in OnCloseQuery :)

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Martin Schreiber
On Tuesday 12 November 2013 14:50:42 Ivanko B wrote:

 --
 procedure twidget.enabledchanged;
 var
  int1: integer;
  bo1: boolean;
 begin
  bo1:= isenabled; // = FALSE
  if not bo1 then begin
   if focused then begin
window.setfocusedwidget(nil); //  HERE
   end;
  end;
  if fframe  nil then begin
   if bo1 or not (frl_nodisable in fframe.flocalprops) then begin
fframe.setdisabled(not bo1);
   end;
  end;
  for int1:= 0 to widgetcount - 1 do begin
   widgets[int1].enabledchanged;
  end;
  statechanged;
 end;
 --
 Don't we have an wrong (to widget of same form) detection of form
 focus change here ?

It seems that you set enabled:= false of the widget which currently has input 
focus?

procedure twidget.setenabled(const Value: boolean);
begin
 if value  getenabled then begin
  if value then begin
   include(fwidgetstate,ws_enabled);
  end
  else begin
   exclude(fwidgetstate,ws_enabled);
   if window.focusedwidget = self then begin
nextfocus; --
   end;
  end;
  if not (csloading in componentstate) then begin
   enabledchanged;
  end;
 end;
end;

nextfocus() does not find another focusable widget. Why?

Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Martin Schreiber
On Tuesday 12 November 2013 14:50:42 Ivanko B wrote:

 Don't we have an wrong (to widget of same form) detection of form
 focus change here ?

Disable ow1_canclosenil in receditfo.optionswidget1.

Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Ivanko B
It seems that you set enabled:= false of the widget which currently has input
==
The code doesn't enter here whan the issue occurs  (looks for HERE below):
--
procedure twidget.enabledchanged;
var
 int1: integer;
 bo1: boolean;
begin
 bo1:= isenabled;
 if not bo1 then begin
  if focused then begin
   window.setfocusedwidget(nil); //  HERE
  end;
 end;
 if fframe  nil then begin
  if bo1 or not (frl_nodisable in fframe.flocalprops) then begin
   fframe.setdisabled(not bo1);
  end;
 end;
 for int1:= 0 to widgetcount - 1 do begin
  widgets[int1].enabledchanged;
 end;
 statechanged;
end;
---
What else to look in the Watches window at this source line ?

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Martin Schreiber
On Wednesday 13 November 2013 12:26:18 Ivanko B wrote:
 It seems that you set enabled:= false of the widget which currently has
 input ==
 The code doesn't enter here whan the issue occurs  (looks for HERE below):
 --
 procedure twidget.enabledchanged;
 var
  int1: integer;
  bo1: boolean;
 begin
  bo1:= isenabled;
  if not bo1 then begin
   if focused then begin
window.setfocusedwidget(nil); //  HERE
   end;
  end;
  if fframe  nil then begin
   if bo1 or not (frl_nodisable in fframe.flocalprops) then begin
fframe.setdisabled(not bo1);
   end;
  end;
  for int1:= 0 to widgetcount - 1 do begin
   widgets[int1].enabledchanged;
  end;
  statechanged;
 end;

See the stack:

And how it gets in CanClose :
===
#0  00602846 receditform.pas:222
TRECEDITFO__CLOSEQUERY(SENDER=0x6755a08, AMODALRESULT=MR_CANCLOSE,
this=error reading variable)
#1  00435CB6 mseforms.pas:1085 TCUSTOMMSEFORM__CANCLOSE(NEWFOCUS=0x0,
this=error reading variable)
#2  004229FE msegui.pas:9800 TWIDGET__INTERNALDOEXIT(this=error
reading variable)

   if (ow1_canclosenil in foptionswidget1) then begin
if not canclose(nil) then begin
 exit;
end;
   end;

#3  0042B2E7 msegui.pas:13706 TWINDOW__SETFOCUSEDWIDGET(WIDGET=0x0,
this=error reading variable)
#4  0041DB87 msegui.pas:7611 TWIDGET__ENABLEDCHANGED(this=error
reading variable)

  if focused then begin
   window.setfocusedwidget(nil);
  end;

#5  004D0071 msewidgets.pas:4971
TACTIONWIDGET__ENABLEDCHANGED(this=error reading variable)
#6  0041DC0C msegui.pas:7620 TWIDGET__ENABLEDCHANGED(this=error
reading variable)
#7  004D0071 msewidgets.pas:4971
TACTIONWIDGET__ENABLEDCHANGED(this=error reading variable)
#8  00424B8F msegui.pas:10820 TWIDGET__SETENABLED(VALUE=false,
this=error reading variable)
#9  0060259B receditform.pas:150
TRECEDITFO__WIDGETSDISABLE(ENABLED_TAG=1, this=error reading
variable)

if widgets[i].tag  enabled_tag then begin
  widgets[i].enabled:= false; // widgets with tag=1 
will stay enabled
end;  


 ---
 What else to look in the Watches window at this source line ?

Nothing, I know what happens. Defocusing is reported to the form because 
ow1_canclosenil is set.

Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Ivanko B
onclosequery does not fire if it looses input focus.
==
Is it possible on modal forms ?

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Martin Schreiber
On Wednesday 13 November 2013 15:09:46 Ivanko B wrote:
 onclosequery does not fire if it looses input focus.
 ==
 Is it possible on modal forms ?

I don't know. Why the question?

Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Ivanko B
Too few persons involved in discussions  proposals  agitating 
taking decisions for a public project :)

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Ivanko B
s it possible on modal forms ?

I don't know. Why the question?

 Its' impossible for a modal form to loose its focus, correct ?

PS: anyway,it's starnge with the PODPISKA that the modal form appears
loosing its focus on disabling its internal widgets.

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Martin Schreiber
On Wednesday 13 November 2013 21:04:01 Ivanko B wrote:
 s it possible on modal forms ?
 
 I don't know. Why the question?

  Its' impossible for a modal form to loose its focus, correct ?

I hope so. :-)
There are several levels of modality:

 modallevelty = (ml_none,ml_application, //call eventloop
 ml_window); //reflect window focus

 PS: anyway,it's starnge with the PODPISKA that the modal form appears
 loosing its focus on disabling its internal widgets.

It was because gbMonths will be disabled while a child is focused. 
twidget.nextfocus() was not called in this case. Changed meanwhile.

procedure twidget.setenabled(const Value: boolean);
begin
 if value  getenabled then begin
  if value then begin
   include(fwidgetstate,ws_enabled);
  end
  else begin
   exclude(fwidgetstate,ws_enabled);
//   if window.focusedwidget = self then begin 
   if checkdescendent(window.focusedwidget) then begin 
nextfocus;
   end;
  end;
  if not (csloading in componentstate) then begin
   enabledchanged;
  end;
 end;
end;


Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Martin Schreiber
On Wednesday 13 November 2013 20:30:47 Ivanko B wrote:
 Too few persons involved in discussions  proposals  agitating 
 taking decisions for a public project :)

I don't understand. You mean the MSElang discussions?
I do the work, I decide. If not more people are interested I can't help and I 
don't care much. They had the chance. :-)

Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Ivanko B
It was because gbMonths will be disabled while a child is focused.
===
Another widget (dbseName) has taboder=0 (focused by default, correct
?) on this form . But gbMonths of this form also has a widget with
taborder=0 (dbbeM01) on disabling which we have the unexpected
OnCloseQuery. May be we have wrong distinction between widgets with
taborder=0 ?

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-13 Thread Martin Schreiber
On Thursday 14 November 2013 07:59:08 Ivanko B wrote:
 It was because gbMonths will be disabled while a child is focused.
 ===
 Another widget (dbseName) has taboder=0 (focused by default, correct
 ?) on this form . But gbMonths of this form also has a widget with
 taborder=0 (dbbeM01) on disabling which we have the unexpected
 OnCloseQuery. May be we have wrong distinction between widgets with
 taborder=0 ?

The whole paragraph is:
Martin wrote:
 It was because gbMonths will be disabled while a child is focused.
 twidget.nextfocus() was not called in this case. Changed meanwhile.
 
 procedure twidget.setenabled(const Value: boolean);
 begin
  if value  getenabled then begin
   if value then begin
    include(fwidgetstate,ws_enabled);
   end
   else begin
    exclude(fwidgetstate,ws_enabled);
 //   if window.focusedwidget = self then begin 
    if checkdescendent(window.focusedwidget) then begin 
     nextfocus;
    end;
   end;
   if not (csloading in componentstate) then begin
    enabledchanged;
   end;
  end;
 end;
 

Martin

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-12 Thread Martin Schreiber
On Tuesday 12 November 2013 08:55:38 Ivanko B wrote:
 Is it called because the form looses input focus?
 ==
 There's no user interaction (where the form may loss input focus)
 between OnEventLoopStarted and disabling widget in code. And why does
 it only happens on disabling groupboxes ?

Can you provide a simple testcase?

 Check amodalresult for  mr_canclose in treceditfo.closequery()
 ==
 in which place ?

procedure treceditfo.closequery(const sender: tcustommseform;
 var amodalresult: modalresultty);
begin
 if amodalresult  mr_canclose then begin
...
 end;
end;


--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-12 Thread Ivanko B
Works OK in a simple project.
Should me prepare the PODPISKA full testcase instead ?

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-12 Thread Ivanko B
Did you model the showmodal call?
==
Is it it ?
-
procedure tmainfo.goexec(const sender: TObject);
begin
  try
application.createform(tworkfo, workfo);
workfo.show(true); //  HERE
  finally
freeandnil(workfo);
  end;
end;

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-12 Thread Martin Schreiber
On Tuesday 12 November 2013 13:58:59 Ivanko B wrote:
 Did you model the showmodal call?
 ==
 Is it it ?
 -
 procedure tmainfo.goexec(const sender: TObject);
 begin
   try
 application.createform(tworkfo, workfo);
 workfo.show(true); //  HERE
   finally
 freeandnil(workfo);
   end;
 end;

Yes.

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-12 Thread Ivanko B
It seems that me couldn't catch this problem because stepped debugging
breaks the form modality sequence. With changing BP placement to
traverse this sequece w/o stepping, it's found that the focus loss
happened when disabling the below widget, before calling
window.setfocusedwidget(nil):

twidget(twidget(this).fparentwidget).fname = 'gbMonths'

twidget(twidget(this).fparentwidget).fwidgetstate = [WS_VISIBLE,
WS_ACTIVE..WS_ENTERED, WS_MOUSEINCLIENT..WS_OPAQUE, WS_ISVISIBLE]

twidget(this).fname = 'dbbeM01' (belongs to groupbox 'gbMonths')

twidget(this).fwidgetstate = [WS_VISIBLE..WS_ENTERED, WS_FOCUSED,
WS_ISWIDGET..WS_OPAQUE, WS_ISVISIBLE]

twidget(twindow(twidget(this).fwindow).ffocusedwidget).fname = 'dbbeM01'

--
procedure twidget.enabledchanged;
var
 int1: integer;
 bo1: boolean;
begin
 bo1:= isenabled; // = FALSE
 if not bo1 then begin
  if focused then begin
   window.setfocusedwidget(nil); //  HERE
  end;
 end;
 if fframe  nil then begin
  if bo1 or not (frl_nodisable in fframe.flocalprops) then begin
   fframe.setdisabled(not bo1);
  end;
 end;
 for int1:= 0 to widgetcount - 1 do begin
  widgets[int1].enabledchanged;
 end;
 statechanged;
end;
--
Don't we have an wrong (to widget of same form) detection of form
focus change here ?

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-11 Thread Ivanko B
Hmm, it only happens with forms having tgroupbox widget(s) on them on
disabling these groupboxes. 100% reproducible in the PODPISKA.

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-11 Thread Martin Schreiber
On Tuesday 12 November 2013 07:17:13 Ivanko B wrote:
 The unexpected code :
 ==
 procedure treceditfo.closequery(const sender: tcustommseform;
  var amodalresult: modalresultty);
 begin
 with viewform.getdataset do begin
 if (state  dsBrowse) {and (changecount   0)} then begin
   if (amodalresult = mr_cancel) then begin
 cancelupdate; // don't write unconfirmed data to the DB
 showmessage('Изменения к последней записи сброшены','Информация');
   end else begin
 showmessage('Запишите или отмените незаписанные изменения перед
 закрытием этой формы!','НЕЗАПИСАННЫЕ ИЗМЕНЕНИЯ');//  HERE
 amodalresult:= mr_none;
   end;
 end;


 And how it gets in CanClose :
 ===
 #0  00602846 receditform.pas:222
 TRECEDITFO__CLOSEQUERY(SENDER=0x6755a08, AMODALRESULT=MR_CANCLOSE,
 this=error reading variable)

Is it called because the form looses input focus? This is intended. Check 
amodalresult for  mr_canclose in treceditfo.closequery().

Martin

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Unexpected firing Form.OnCloseQuery on disabling TGroupBox placed on the form

2013-11-11 Thread Ivanko B
Is it called because the form looses input focus?
==
There's no user interaction (where the form may loss input focus)
between OnEventLoopStarted and disabling widget in code. And why does
it only happens on disabling groupboxes ?

Check amodalresult for  mr_canclose in treceditfo.closequery()
==
in which place ?

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk