[Openroad-users] Deleting tabpage crashes OpenROAD

Bodo Bergmann Bodo.Bergmann at ingres.com
Thu Dec 6 02:36:21 EST 2007


Frank,
 
I have no problem deleting the last of the dynamically added pages using
the following code:
 

	ON CLICK del_btn =
	{
	    i=FIELD(field1).CurPageIndex;
	    IF i=lastvis and i>1 THEN
	        lastvis = i-1;
	        FIELD(field1).CurPageIndex = lastvis;
	        tabflds_ori.RemoveRow(rownumber=i);
	        FIELD(field1).UpdField();
	    ELSE
	        MESSAGE 'You can only delete the last of the added
pages!';
	    ENDIF;
	}

I also get a crash when deleting one of the others, I'll try to find out
if there is a workaround (or fix).
 
Bodo.
 
Bodo Bergmann
Senior Software Engineer
OpenROAD Worldwide Development
Ingres Corp.
 

________________________________

From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Frank
Barratt
Sent: Wednesday, December 05, 2007 3:40 PM
To: openroad-users at peerlessit.com
Subject: [Openroad-users] Deleting tabpage crashes OpenROAD


Hi all,
 
Using code similar (and i have tried the exact code as well) to the
example (that Bodo provided) below to set up a frame with one tabfolder
containing 8 tabpages, I then needed a method of deleting a tab.
 
I have tried ALL of the following -
 
i=FIELD(field1).CurPageIndex;
 
 tabflds_ori.RemoveRow(rownumber=i);
 
or 
 
FIELD(field1).DeleteTabPage(pagenum =i);
 
or
 
 FIELD(field1).TabBar.tabfieldarray.setrowdeleted(rownum = i);
 
or
  FIELD(field1).TabBar.tabfieldarray.removerow(rownum = i);
 
All of the above work one or two times then OpenROAD crashes with the
w4gldev.exe exiting message resulting in the following in the errlog.log
 
W2MZ452Q::[II\COMSVR\984     , 00000000]: Wed Dec 05 13:27:25 2007
E_GC220B_EXP_RCV_FAIL GCA expedited receive failure: reason follows.
W2MZ452Q::[II\COMSVR\984     , 00000000]: Wed Dec 05 13:27:25 2007
E_GC0001_ASSOC_FAIL Association failure: partner abruptly released
association.
 
any help on this would be appreciated.
 
Regards
Frank.
 
initialize()=
declare
    i=INTEGER NOT NULL;
    lastvis=INTEGER NOT NULL DEFAULT 1;
    cust1 = customer DEFAULT NULL;
    tabflds_ori = ARRAY OF TabField DEFAULT NULL;
    tabflds = ARRAY OF TabField;
    tabpages = ARRAY OF TabPage DEFAULT NULL;
enddeclare
{
    tabpages = FIELD(field1).tabpagearray;
    tabflds_ori = FIELD(field1).TabBar.tabfieldarray;
    FOR i=1 TO tabflds_ori.LastRow DO
        tabflds[i] = tabflds_ori[i];
    ENDFOR;
    
    // Make pages 2 to 8 invisible
    FOR i=8 DOWNTO 2 DO
        tabpages[i].CurBias = FB_INVISIBLE;
        FIELD(field1).TabBar.tabfieldarray.RemoveRow(rownumber=i);
    ENDFOR;
    FIELD(field1).UpdField();
}
 

ON CLICK add_btn =
{
    IF lastvis<8 THEN
        lastvis = lastvis+1;
        tabpages[lastvis].CurBias = FB_CHANGEABLE;
        tabflds_ori.InsertRow(rownumber=lastvis,
rowobject=tabflds[lastvis]);
        FIELD(field1).UpdField();
        FIELD(field1).CurPageIndex = lastvis;
    ELSE
        MESSAGE 'Only 8 pages allowed';
    ENDIF;
}
 

ON CLICK check_btn =
{
    FIELD(field1).CurTabPage.GetFieldValue(value=BYREF(cust1));
    MESSAGE cust1.Name;
}

Bodo.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20071205/ab8c0316/attachment.html 


More information about the Openroad-users mailing list