Open a property inspector by script ?

Shao Sean shaosean at wehostmacs.com
Fri Oct 22 09:35:29 EDT 2010


on mouseUp
   # get the target of this control
   local tTargetID
   put the long id of the target into tTargetID

   # create the inspector linked to this control
   send "revBuildPropertyPalette tTargetID" to stack  
"revTemplatePalette"

   # get the name of the inspector linked to this control
   local tPaletteName
   put revPropertyPalettes(tTargetID) into tPaletteName

   # bring the inspector stack into use so we can use the scripts from  
it (we could do this with the value() function)
   start using stack tPaletteName

   # get the text for the drop down menu (the first line is the object  
type)
   local tTabs
   put revObjectTabs2(tTargetID) into tTabs

   # lock the screen so we do not see the selection handles
   lock screen
   select tTargetID

   # get the proper geometry card to display
   local tDefaultCard
   put revGeometryCard() into tDefaultCard

   # deselect the control and unlock the screen
   select EMPTY
   unlock screen

   # go to the correct inspector pane
   revBuildPropertyPaletteGoCard tDefaultCard, tPaletteName,  
tTargetID, tTabs

   # get the inspector to remember the pane it is displaying
   revRememberPane

   # no longer need the palette's scripts
   stop using stack tPaletteName
end mouseUp



More information about the use-livecode mailing list