I've done some testing on a simple stack and if you put the following lines
of code in a group on a card:
1) "btn x of me" will uniquely refer to the object.
2) "btn x of the owner of me" will not.
In other words 1) works however things are named/ how objects outside the
group are named.
"btn x of the owner of me" however equates to "btn x of group someName", and
if there are two groups called someName then it picks the first one,
regardless if this group is the real owner! This is the problem.
It makes the syntax "owner of me" unusable if you want to create and
independent group you can cut and paste on a card.
> From: Kevin Miller <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 21 Sep 2000 13:11:45 +0100
> To: [EMAIL PROTECTED]
> Subject: Re: Best way to refer to objects in groups...
> On 20/9/00 9:23 pm, David Bovill <[EMAIL PROTECTED]> wrote:
>> Having a lot more problems than I anticipated with uniquely referring to
>> objects within a group. The aim is to do this consistently so that if needed
>> the group can be duplicated on the same card and each group behave as
>> It is hard to tell what happens as there project is too complex for using
>> the debugger, but now it looks as if I can't use the following type
>> 1) btn x of me
>> 2) btn x of the owner of me
>> The reason for this is that ther are two objects with the same name as
>> me/the owner of me. I'm not sure about the target, and I'm not sure about
>> 3) btn x of myGroup (where mygroup = the long id of me)
>> Really appreciate some help on this as it's driving me nuts, as I have so
>> many objects to change the names of for each trial (yes I know I should
>> experiment on a simple test case first). Anyone know a bullet proof way of
>> referring to an object? Preferably something of the form "control someName
>> of someObject" in such a way that these references remain intact iwth
>> cutting and pasting etc...
> Not sure if I follow exactly what you're trying to do, but can't you use the
> long ID of the objects inside the groups to parse out the ID of the groups
> in question, then refer to everything by ID?
Firstly, finding the long id's of all the controls inside... is slow, second
don't the id's change if I cut the group and paste it into a new stack? I am
looking for a technique to refer to objects within a group that is
independent of how objects outside the group are referred to and can survive
cutting and pasting...
I guess there must be a technique along the lines of the above, and your
earlier help with finding out the names of groups inside a group... I may
have a go at defining the function:
function getRealOwnerID someControl
-- beware not always = the id of the owner of someControl
But for now, I think people should be aware that "the owner" is not always
Please send bug reports to <[EMAIL PROTECTED]>, not this list.