At 10:59 PM -0400 10/18/2005, [EMAIL PROTECTED] wrote:
sez [EMAIL PROTECTED]:
At 4:00 PM +0100 10/17/2005, David Burgun wrote:
Does anyone know of a function that will extract name of the
Control, Group, Card and Stack from a long name string?
e.g. I have a string of the form:
 >>control "A" of group "B" of card "C" of stack "D"
 >I'd use the short name in conjunction with the owner for this:

   -- "myControl" is control "A" of group "B" of card "C" of stack "D"
   put the short name of myControl into myControlName
   put the short name of the owner of myControl into myGroupName
   put the short name of the owner of the owner of myControl into myCardName
   put the short name of the owner of the owner of the owner of
myControl into myStackName
   Problem: If you use this on something that *isn't* in a group, myGroupName
will end up being the name of a card; myCardName will be the stack name; and
I'm not sure *what* myStackName will end up as.

The problem as stated had a string in a particular form, which included a group. To generalize this solution obviously would take more code than this. (You'd need to check word 1 of the long name of "myControl", of "the owner of myControl", etc. If you want to be thorough, you also need to check the hcAddressing property.)

I suppose I just wanted to answer the question, rather than write out a general solution which would be both more complicated and not needed in this case.
--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.com
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to