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=63469471&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to