Custom property sets

Ken Ray kray at sonsothunder.com
Tue Jul 9 02:48:01 EDT 2002


Ron,

If the defaultStack happens to be the stack the contains the custom
property, you can use "this stack" instead of an explicit reference. For
example, suppose you have two stacks, one called "Stack1" and one called
"Stack2". Both of these stacks have the same custom property in them,
"prefs". If you have Stack 1 open (and it is the defaultStack) and wish to
get the "prefs" of stack "Stack1", you can just say:

  put the prefs of this stack into myVar

If, however, you want to get the prefs from stack "Stack2", you can do one
of the following:

  put the prefs of stack "Stack2" into myVar

or

  set the defaultStack to "Stack2"
  put the prefs of this stack into myVar

Hope this helps,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


----- Original Message -----
From: "Ron" <rbarber at yhb.att.ne.jp>
To: <use-revolution at lists.runrev.com>
Sent: Monday, July 08, 2002 8:45 PM
Subject: Re: Custom property sets


> Thanks Yves and Ken,
>
> I didn't communicate very well, so let me make sure I understood your
> suggestions. I am not having trouble referencing btnnames[btn1], but in
> referencing another customproperty, called 'prefs', that is not a part of
> either the english or japanese sets. 'prefs' is a customproperty of just
one
> substack. That substack also needs access to the main english or japanese
> sets.
>
> You have confirmed that I need to explicitly call the stack to use the
> customproperties. I was hoping for a default name of 'me' if no stack was
> made explicit. eg 'put the prefs into myvar' would call the customprop
prefs
> or that I could call keys from the sets without explicit reference. My
> mistake.
>
> Thanks
> Ron
>
> > From: yves COPPE <yvescoppe at skynet.be>
> > Reply-To: use-revolution at lists.runrev.com
> > Date: Mon, 8 Jul 2002 10:11:54 +0200
> > To: use-revolution at lists.runrev.com
> > Subject: Re: Custom property sets
> >
> >> Greetings
> >>
> >> I have two custompropertysets which I set on startup:
> >> english
> >> japanese
> >>
> >> Each set has the same 3 keys but the keys have different content based
on
> >> the language:
> >>
> >> btnnames
> >> errors
> >> fldcontents
> >>
> >> The contents of btnnames is like this:
> >>
> >> btn1,this is a btn
> >> btn2, this is another btn
> >> etc
> >>
> >> I split it to make an array and reference the items using:
> >>
> >> set the label of btn1 to btnnames[btn1]
> >>
> >> This sets the name to the appropriate language throughout the
substacks.
> >> However, I have run into a problem referencing other customproperties.
If I
> >> make a customproperty in a substack, say 'prefs', and try to call it,
it is
> >> not available. Presumably because the custompropertyset of the main
stack
> >> does not contain this customproperty?
> >>
> >> Is there a way to call customproperties in the substack without
creating
> >> another set, then setting the custompropertyset to the new set,
referencing
> >> the property, then resetting the set to 'english'?
> >>
> >> Thanks
> >> Ron
> >>
> >> _______________________________________________
> >> use-revolution mailing list
> >> use-revolution at lists.runrev.com
> >> http://lists.runrev.com/mailman/listinfo/use-revolution
> >
> >
> >
> > You have to refer to the stack :
> > set the label of btn1 to btnnames[btn1] of this stack -- or of stack
> > "YourstackName"
> >
> > or something like :
> > put  the short name of this stack <or whatever you want> into
MYstackName
> > set the label of btn1 to btnnames[btn1] of stack MYstackName
> >
> > or you can also try :
> > set the customPropertySet of stack MYstackName to btnnames
> > --your script
> > ...
> > ...
> > ...
> > --and then you reset with
> > set the customPropertySet of stack MYstackName to empty
> >
> > hope this helps
> > --
> > Greetings.
> >
> > Yves COPPE
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the Use-livecode mailing list