[Openroad-users] FW: Tablefields that map to a user class-compileissue
Paul White
pwhite at peerlessit.com.au
Wed Aug 15 14:15:13 EST 2007
Make sure you are running the latest patch Robert.
Prior to sp3 the feature had some gotchas which overwrote data in
memory.
It works pretty well but I've found a couple of limitations. I can copy
the tablefield to an array, pass it to another procedure, and sort, but
I havent worked out how to retrieve its value in that procedure. In the
debugger you can see the foreign field.
My frame has a simple table field with columns a1,b2,c1,d1 which derive
from a user class. Also one extra date column d2.
-- In the frame ---
on click btnfield =
declare
la_test = array of uc_test;
Enddeclare
{
la_test = uc_test_tf.duplicate();
MESSAGE 'Before :' + varchar(uc_test_tf[1].d2);
CALLPROC p4_sort_by_column_d2(param_test = BYREF(la_test));
uc_test_tf = la_test.duplicate();
MESSAGE 'After :' + varchar(uc_test_tf[1].d2);
}
-- In the procedure--
procedure p4_sort_by_column_d2 (param_test = array of uc_test) =
Declare
status = integer not null;
dval = date not null;
dexp = dynexpr default null;
Enddeclare
{
param_test.sort(d2 = AS_ASC);
/* This line does not compile but you can see the value in the debugger
** MESSAGE varchar(param_test[1].d2);
*/
/* This section compiles but does not return any values.
*/
dexp = CurProcedure.Scope.CreateDynExpr(string ='param_test[1].d2');
status = dexp.GetValue(value = byref(dval));
MESSAGE varchar(dval);
}
-----Original Message-----
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Durwin
Wright
Sent: Wednesday, 15 August 2007 12:37 PM
To: International OpenROAD Users
Subject: Re: [Openroad-users] FW: Tablefields that map to a user
class-compileissue
This was a deliberate change made to OpenROAD 4.1/0403
Durwin Wright | Sr. Architect | Durwin.Wright at ingres.com | Ingres | 500
Arguello Street | Suite 200 | Redwood City | CA | 94063 | USA +1
650-587-5523 | fax: +1 650-587-5550
-----Original Message-----
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Paul White
Sent: Tuesday, August 14, 2007 4:38 PM
To: International OpenROAD Users
Subject: [Openroad-users] FW: Tablefields that map to a user class-
compileissue
-----Original Message-----
From: Robert Allely
Sent: Wednesday, 1 August 2007 11:46 AM
To: International OpenROAD Users
Subject: Tablefields that map to a user class- compile issue
This one bit me again so I will tell you all - and I will be more
careful.
OpenROAD 4.1/0403 compiles OK when a table field whose rows are of a
user class actually contains a column which is NOT in the userclass. At
runtime, errors can occur and the result is undefined. This time it all
appeared to work except the InsertRow method can fail silently or with
runtime errors about the underlying class of the tablefield.
I wonder if this is fixed in the latest version OpenROAD ? It did not
happen in 4.1/0302 I think the compile should fail.
Robert Allely
IT Development
Ports of Auckland Ltd
NZ
***
This e-mail is privileged and confidential. If you are not the intended
recipient please delete the message and notify the sender at Ports of
Auckland Limited.
***
________________________________________________________________
OpenROAD-Users mailing list
You can maintain your subscription here:
http://www.peerlessit.com/mailman/listinfo/openroad-users
To unsubscribe click on this link
mailto:openroad-users-unsubscribe at peerlessit.com&subject=unsubscribe
To subscribe click on this link
mailto:openroad-users-subscribe at peerlessit.com&subject=subscribe
________________________________________________________________
OpenROAD-Users mailing list
You can maintain your subscription here:
http://www.peerlessit.com/mailman/listinfo/openroad-users
To unsubscribe click on this link
mailto:openroad-users-unsubscribe at peerlessit.com&subject=unsubscribe
To subscribe click on this link
mailto:openroad-users-subscribe at peerlessit.com&subject=subscribe
More information about the Openroad-users
mailing list