Array of UIObject - Help Needed 
Author Message
 Array of UIObject - Help Needed

I have a custom method attached to a page which is called by certain
groups of UIObjects by their open methods. The purpose of this method
is to search (recursively) each group and add a reference to each
text object in a TextPointers array that I have declared as follows
in the page's Var section:

                TextPointers Array[] UIObject

In the custom method, I have the following statement (within some
conditional logic):

                TextPointers.addLast(ThisObj)

where ThisObj is of type UIObject.  This code compiles without errors,
but when the custom method executes the first time, I get the following
error at the above statement:

                You have tried to reference the object named '' from
                the object named '#Page2'. The referenced object
                could not be found ...

However, if I declare TextPointers as an array of string, and change the
statement causing the error to TextPointers.addLast(ThisObj.Name), then
the code executes without problem.  I would like to work with the UIObject
handles, since I expect them to provide a little faster execution and
require a lot less array storage space than the associated strings
(some of my groups have deeply imbedded text objects that result in
long containership hierarchy names.)  Thanks.



Fri, 07 Feb 1997 21:44:21 GMT
 Array of UIObject - Help Needed

Quote:

> I have a custom method attached to a page which is called by certain
> groups of UIObjects by their open methods. The purpose of this method
> is to search (recursively) each group and add a reference to each
> text object in a TextPointers array that I have declared as follows
> in the page's Var section:

>            TextPointers Array[] UIObject

> In the custom method, I have the following statement (within some
> conditional logic):

>            TextPointers.addLast(ThisObj)

> where ThisObj is of type UIObject.  This code compiles without errors,
> but when the custom method executes the first time, I get the following
> error at the above statement:

>            You have tried to reference the object named '' from
>            the object named '#Page2'. The referenced object
>            could not be found ...

Sounds like you're doing:

        ThisObj = your_object's_name

Try this:

        ThisObj.attach( your_object's_name )

It'll work!

PS: Be sure you include in your object's name any containers if they
have an specific name, not beginning with #: myRecord.Client_Name

Jose Garcia



Tue, 11 Feb 1997 17:35:41 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Help with UIObject Fields Needed

2. HELP Needed with UIObject

3. array of UIObjects?

4. Help! TCursor and UIObject

5. Help! TCursor and UIObject

6. Help labels for UIObjects on a form - helplbl.zip [01/01]

7. Arrays in SQL ????? - Need Help

8. Array help Needed

9. Student Needs Serious Help with Array

10. Need help passing an array to an Oracle procedure using Oracle Objects for OLE

11. Urgent Help Needed - Creating an array

12. Help needed in passing Array to Stored Procedure


 
Powered by phpBB® Forum Software