Re: the group of me

2013-09-21 Thread Dr. Hawkins
On Fri, Sep 20, 2013 at 6:50 AM, Klaus major-k kl...@major-k.de wrote:

 try the owner of me :-)


Wow.

Uhh, yeah.

Closing on 25 years, and still finding little details like this (but
looking at the dictionary, I guess that this wasn't in the old hypercard 
supercard) . . .


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: the group of me

2013-09-20 Thread Klaus major-k
Hi Doc,

Am 20.09.2013 um 15:47 schrieb Dr. Hawkins doch...@gmail.com:

 As near as I can tell, there is no concept of the group of me or a
 similar way to get the group containing the target, other than things like
 word 5 of the long name of me
 
 Quick access to such things, as well as completing the set of groupNames to
 include fieldNames, buttonNames, and similar completions sure would be
 nice . . .

try the owner of me :-)

 -- 
 Dr. Richard E. Hawkins, Esq.
 (702) 508-8462

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: the group of me

2013-09-20 Thread Monte Goulding

On 20/09/2013, at 11:47 PM, Dr. Hawkins doch...@gmail.com wrote:

 As near as I can tell, there is no concept of the group of me or a
 similar way to get the group containing the target, other than things like
 word 5 of the long name of me
 
 Quick access to such things, as well as completing the set of groupNames to
 include fieldNames, buttonNames, and similar completions sure would be
 nice . . .

I agree we don't really have access to enough metadata about an object. I would 
like the stack|card|sharedGroup of me

Here's a workaround from the lcVCS code which recursively finds the parent 
object of the requested type. If you need the sharedGroup pShared should be 
true. As Klaus said if you just want the direct parent then the owner works 
fine.

function FindParent pObject,pType,pShared
   local tStat = true,tType
   
   put word 1 of pObject into tType
   if tType is bkgnd then
  put group into tType
   end if
   
   if pShared then
  if tType is group then
 put the sharedBehavior of pObject into tStat
  else if word 1 of pObject is card then
 return empty
  end if
   end if
   
   if tType is pType and tStat then
  return pObject
   else
  return FindParent(the long owner of pObject,pType,pShared)
   end if
end FindParent

--
Monte Goulding

M E R Goulding - software development services
mergExt - There's an external for that!





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode