Page 1 of 1

DCREAD / AUTORESIZE kills POSTEVENT

Posted: Fri Nov 12, 2010 8:11 am
by Tom
Hi, Roger.

If a resize option (like AUTORESIZE) is used with DCGET OPTIONS, this kills the POSTEVENT option of DCREAD.

This does not work:

Code: Select all

DCUSEREVENT xbeP_User+200 ACTION {||MsgBox('Hello')}
DCGET OTIONS AUTORESIZE 
DCREAD GUI FIT OPTIONS GetOptions POSTEVENT xbeP_User+200
It works if AUTORESIZE is not set in DCGET OPTIONS. This seems to be related to what you do in _DCGETBX.PRG, around line 766:

Code: Select all

  IF ::isAutoResize
    ::parentDlg:resize := {|a,b,o,x|x := SetAppFocus(), ;
                                    o:drawingArea:hide(), ;
                                    DC_AutoReSize(a,b,o,aGetList), ;
                                    o:drawingArea:show(), ;
                                    SetAppFocus(x), ;
                                    DC_CompleteEvents() }
I believe DC_CompleteEvents() prevents the user event from getting fired.

This is nothing urgent or somehow very important. I found another solution for what I tried to do there.

Re: DCREAD / AUTORESIZE kills POSTEVENT

Posted: Sun Nov 14, 2010 11:12 am
by rdonnay
Tom -

I have been working on the eXpress++ resizing system this week while in Terry Wolfe's office. I agree that the DC_CompleteEvents() call can interfere with your user event.

I have removed DC_CompleteEvents() from the code block in the upcoming build 255.

Roger