how do you identify the current group name (or ID)?

Jim Carwardine JimCarwardine at OwnYourFuture-net.com
Tue Feb 7 10:38:00 EST 2006


I've just used offset like this...

put the long name of someControl into theName
put offset(" of card",theName) into endChar

Then "char 1 to endChar of theName" captures all the nested groups for that
control... Jim



on 2/7/06 10:59 AM, Jonathan Lynch wrote:

> There is one thing to be wary of: the phrase "the owner of me" is safe, but
> "the owner of the owner of me" has a risk...
> 
> Acutally, this is a really obscure thing to be wary of, but just in case...
> 
> If you have nested groups, layed out like this:
> 
> group "TopGroupA"
> group "subgroup"
>   field "myField"
> 
> group "TopGroupB"
> group "subgroup"
>   field "myField"
> 
> 
> Say you have a script for field "myField" of group "subgroup" of group "B",
> and one line of that script says this:
> 
> get the short name of the owner of the owner of me
> 
> This line should return "TopGroupB", but Rev doesn't process it that way.
> Instead it will return "TopGroupA"
> 
> One way to work around this is like this:
> 
> put the long name of me into tMyName
> replace " of " with "|"
> set the itemdelimiter to "|"
> put word 1 to -1 of item 3 of tMyName into tOOName
> delete word 1 of tOOName
> delete char 1 of tOOName
> delete char -1 of tOOName
> 
> 
> At this point, the variable tOOName will contain the short name of the owner
> of the owner of the field, and it will refer to the correct object.
> 
> 
> 
> 
> 
> 
> 
> On 2/7/06, MisterX <b.xavier at internet.lu> wrote:
>> 
>> Hi Josh
>> 
>> try
>> 
>> put the name of the owner of me...
>> 
>> cheers
>> Xavier
>> 
>>> -----Original Message-----
>>> From: use-revolution-bounces at lists.runrev.com
>>> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
>>> Josh Mellicker
>>> Sent: Tuesday, 07 February, 2006 06:29
>>> To: How to use Revolution
>>> Subject: how do you identify the current group name (or ID)?
>>> 
>>> Forgive the noob question!
>>> 
>>> 
>>> How do you identify the current group name (or ID)?
>>> 
>>> the groupname of me
>>> 
>>> the name of the group of me
>>> 
>>> : (
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage
>>> your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

-- 

Helping people focus and use time effectively and satisfyingly
as they go through their day.
<http://www.OwnYourFuture-net.com>

Own Your Future Consulting Services Limited,
1959 Lower Water Street, Suite 1700, Halifax, Nova Scotia. B3J 3N2
Phone: 902-823-2339. Fax: 902-823-2139







More information about the use-livecode mailing list