[Openroad-users] Accessing dynamically created fields
James Higson
James.Higson at GUI-tek.com.au
Mon Sep 3 08:51:49 EST 2007
Hi all,
I am using OR4.1SP3.
I have a StackField object which has a datatype of a userclass. I have then
created several instances of this StackField and grouped them into a second
StackField then grouped this into a ViewPort. In effect, I have mimmicked a
TableField. I am then dynamically appending instances of the first
StackField to the second StackField by duplicating the first instance at
runtime. I hope you are following me so far. The instances are then named
r001, r002, ... r00n.
I can reference the instances by using either:
FieldPtr =
CurFrame.TopForm.FieldByFullName(FullName='r'+RIGHT('000'+VARCHAR(i),3))),
or;
ExprPtr =
CurFrame.Scope.CreateDynExpr(String='r'+RIGHT('000'+VARCHAR(i),3))).
The problem I have, is that CreateDynExpr only works for the instances of
the StackField that were statically created on the form. The dynamically
created instances return a NULL reference. FieldByFullName works for the
dynamically created instances. I want to set the instances to a row in an
array by using:
ExprPtr =
CurFrame.Scope.CreateDynExpr(String='r'+RIGHT('000'+VARCHAR(i),3)));
ExprPtr.SetValue(Value = a[i]);
I would have thought that CreateDynExpr should work for dynamically created
instances as well. Can anyone see another way to do this?
Thanks,
James
Melbourne, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20070903/c75943e8/attachment.html
More information about the Openroad-users
mailing list