1. EuGrid - Issue when opening a dialog

Phil,

Hope you're still around and supporting EuGrid.

I've run into a situation where EuGrid causes an error with Win32Lib.  Using the
following code, click the "Dialog" button at the bottom of the window.  The
dialog should be displayed.  Close the dialog and click the "..." button in the
grid.  The same dialog is displayed but errors out trying to capture mouse
movements.

--  code generated by Win32Lib IDE v1.0.0 Build May-23-2007

constant TheProgramType="exw" 
 
include Win32Lib.ew
without warning
atom gridvoid
include eugrid.ew

--------------------------------------------------------------------------------
--  Window Window1
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 537, 394,
0, 0 )
integer EuGrid2 EuGrid2 = EGW_CreateGrid( Window1, 16, 24, 480, 232, 1 )
gridvoid = EGW_SetGridProperty( EuGrid2, EGW_ROW_HEADER_DATACOL,EGW_ROWNUM )
gridvoid = EGW_SetGridProperty( EuGrid2, EGW_ROW_HEADER_WIDTH,23 )
gridvoid = EGW_SetGridProperty( EuGrid2, EGW_COL_HEADER_HEIGHT,20 )
gridvoid = EGW_SetGridProperty( EuGrid2, EGW_BACKGROUND_COLOR,16777215 )
gridvoid = EGW_SetGridProperty( EuGrid2, EGW_BACKGROUND_COLOR,16777215 )
integer EditText8 EditText8 = EGW_AddColumn( EuGrid2, "EditText8", 100,
EGW_LAST, EGW_EDIT, 1 )
gridvoid = EGW_SetColumnProperty( EuGrid2, EditText8, EGW_COL_WIDTH, 48 )
gridvoid = EGW_SetColumnProperty( EuGrid2, EditText8, EGW_COL_BACKGROUND_COLOR,
16777215)
integer EditText9 EditText9 = EGW_AddColumn( EuGrid2, "EditText9", 100,
EGW_LAST, EGW_EDIT, 2 )
gridvoid = EGW_SetColumnProperty( EuGrid2, EditText9, EGW_COL_WIDTH, 48 )
gridvoid = EGW_SetColumnProperty( EuGrid2, EditText9, EGW_COL_BACKGROUND_COLOR,
16777215)
integer EditText10 EditText10 = EGW_AddColumn( EuGrid2, "EditText10", 100,
EGW_LAST, EGW_EDIT, 3 )
gridvoid = EGW_SetColumnProperty( EuGrid2, EditText10, EGW_COL_WIDTH, 48 )
gridvoid = EGW_SetColumnProperty( EuGrid2, EditText10, EGW_COL_BACKGROUND_COLOR,
16777215)
constant DialogPB = createEx( PushButton, "Dialog", Window1, 24, 288, 88, 28, 0,
0 )
constant CancelPB = createEx( PushButton, "Cancel", Window1, 140, 288, 88, 28,
0, 0 )
---------------------------------------------------------
--------------------------------------------------------------------------------
--  Window Window2
constant Window2 = createEx( Window, "Window 2", 0, Default, Default, 400, 300,
0, 0 )
constant RichEdit6 = createEx( RichEdit, "RichEdit6", Window2, 20, 16, 348, 200,
w32or_all({ES_NOHIDESEL}), 0 )
constant DialogCancelPB = createEx( PushButton, "Cancel", Window2, 20, 228, 88,
28, 0, 0 )
---------------------------------------------------------
--------------------------------------------------------------------------------
atom void

void = EGW_SetColumnProperty(EuGrid2, EditText8, EGW_COL_SELECTBUTTON, EGW_True)
void = EGW_SetColumnProperty(EuGrid2, EditText8, EGW_COL_SELECTBUTTON_TEXT,
"...")
--------------------------------------------------------------------------------
procedure Window1_onOpen (integer self, integer event, sequence params)--params
is ()
        sequence grid_data
        
        grid_data = {{"","",""}}
        void = EGW_LoadData(EuGrid2,grid_data,EGW_REPLACE)
end procedure
setHandler( Window1, w32HOpen, routine_id("Window1_onOpen"))
--------------------------------------------------------------------------------
procedure EuGrid2_onEvent (integer self, integer event, sequence params)--params
is ( int iMsg, atom wParm, atom lParm )
        atom msg, wParam, lParam, row, col, color
        sequence click_pos, cell

        msg = params[1]
        wParam = params[2]
        lParam = params[3]

        -- Display pop-up menu on right button click
        if msg=EGW_RIGHTBUTTONUP then

           returnValue(1)

        -- a select button was pressed
        elsif msg=EGW_SELECTBUTTONUP then
                openDialog(Window2)
        end if
end procedure
setHandler( EuGrid2, w32HEvent, routine_id("EuGrid2_onEvent"))
--------------------------------------------------------------------------------
procedure DialogPB_onClick (integer self, integer event, sequence
params)--params is ()
        openDialog(Window2)
end procedure
setHandler( DialogPB, w32HClick, routine_id("DialogPB_onClick"))
--------------------------------------------------------------------------------
procedure CancelPB_onClick (integer self, integer event, sequence
params)--params is ()
        closeWindow(Window1)
end procedure
setHandler( CancelPB, w32HClick, routine_id("CancelPB_onClick"))
--------------------------------------------------------------------------------
procedure DialogCancelPB_onClick (integer self, integer event, sequence
params)--params is ()
        closeWindow(Window2)
        setFocus(Window1)
end procedure
setHandler( DialogCancelPB, w32HClick, routine_id("DialogCancelPB_onClick"))


WinMain( Window1,Normal )


Any thoughts?

Jonas Temple
http://www.innovativesys.net

new topic     » topic index » view message » categorize

2. Re: EuGrid - Issue when opening a dialog

Jonas Temple wrote:
> 
> Phil,
> 
> Hope you're still around and supporting EuGrid.
> 
> I've run into a situation where EuGrid causes an error with Win32Lib.  Using
> the following code, click the "Dialog" button at the bottom of the window. 
> The dialog should be displayed.  Close the dialog and click the "..." button
> in the grid.  The same dialog is displayed but errors out trying to capture
> mouse movements.
> 

<snipped code/>

> Any thoughts?
> 
> Jonas Temple
> <a href="http://www.innovativesys.net">http://www.innovativesys.net</a>

I think the issue was already raised. The original post from ck on Nov 30, 2007
is still available at
http://lists.topica.com/lists/EUforum/read/message.html?mid=1721260318
It refers to line 1527 of eugrid_mem.e making a now wrong guess.

Phil replied that he was fixing EuGrid. I don't know whether he did. If he
didn't, or your problem isn't related, then... I'll try to step in if I can.

Phil: At any rate, from v0.70.4 on, win32lib will have an
isFieldOf(struct_type,member) function which will probably avoid relying on the
exact layout, which is subject to change without notice as new features are added
or better supported. Such changes don't have a fast pace, but some day they
occur. I haven't peeked into EuGrid yet and assessed what else it needs exposed.
Your input would help (oedoc hat free doubt fr).

70.4 is known by some testers only, or those who use the sourceforge svn
repository for the win32libex project. I'll ship out another version for test
tonight, so as to release it before I leave computers for 4 weeks, around march
15 - I'll still be able to view the forum or check emails on an irregular basis
during that period.

CChris

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuGrid - Issue when opening a dialog

CChris wrote:
> 
> Jonas Temple wrote:
> > 
> > Phil,
> > 
> > Hope you're still around and supporting EuGrid.
> > 
> > I've run into a situation where EuGrid causes an error with Win32Lib.  Using
> > the following code, click the "Dialog" button at the bottom of the window. 
> > The dialog should be displayed.  Close the dialog and click the "..." button
> > in the grid.  The same dialog is displayed but errors out trying to capture
> > mouse movements.
> > 
> 
> <snipped code/>
> 
> > Any thoughts?
> > 
> > Jonas Temple
> > <a href="http://www.innovativesys.net">http://www.innovativesys.net</a>
> 
> I think the issue was already raised. The original post from ck on Nov 30,
> 2007 is still available at <a
> href="http://lists.topica.com/lists/EUforum/read/message.html?mid=1721260318">http://lists.topica.com/lists/EUforum/read/message.html?mid=1721260318</a>
> It refers to line 1527 of eugrid_mem.e making a now wrong guess.
> 
> Phil replied that he was fixing EuGrid. I don't know whether he did. If he
> didn't,
> or your problem isn't related, then... I'll try to step in if I can.
> 
> Phil: At any rate, from v0.70.4 on, win32lib will have an
> isFieldOf(struct_type,member)
> function which will probably avoid relying on the exact layout, which is
> subject
> to change without notice as new features are added or better supported. Such
> changes don't have a fast pace, but some day they occur. I haven't peeked into
> EuGrid yet and assessed what else it needs exposed. Your input would help
> (oedoc
> hat free doubt fr).
> 
> 70.4 is known by some testers only, or those who use the sourceforge svn
> repository
> for the win32libex project. I'll ship out another version for test tonight,
> so as to release it before I leave computers for 4 weeks, around march 15 -
> I'll still be able to view the forum or check emails on an irregular basis
> during
> that period.
> 
> CChris

Hi Jonas/Chris,

I had a go at fixing the problem in December, although I only sent
the code to CK.  Not sure that I got a reply, so never got round
to releasing it.

CChris - I've replied to your email.
Jonas - I've sent you the fix to see if it helps.

Cheers,

Phil

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu