Know the limits of user objects
I'm using user objects in PGPro and, just like the manual suggests, I'm storing a handle to the object in the gObjUserHndl& field. This works fine if I only use one window of that class type. However, if I need multiple copies of the window, it doesn't work. Even though there are multiple windows, there appears to be only a single gObjUserHndl& field. I have a workaround, but it has it's own problems. I'm wondering if any one else has run across this problem and solved it. Any help would be appreciated.
For exactly the reason you describe, I avoid gObjUserHndl&. Instead, I set up an array of handles
Thanks for the response, Greg. But to complicate things a bit further, what if I want to have multiple copies of the user object in a window? Then I'd have to either create multiple statement similar to 'DIM gMyDataHndl&(_maxWnds)', or set one up as a two dimensional array. Things start to get pretty complicated and one ends up setting aside a lot of memory of which only a small portion gets used. Do you have similar situations and if so, how do you handle them?
I ran into the same sort of problem, and ended up using Ross (lambert's) solution.