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

Jonathan Lynch jonathandlynch at gmail.com
Tue Feb 7 09:59:45 EST 2006


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
>



More information about the use-livecode mailing list