the objectType of me?

Sivakatirswami katir at hindu.org
Sun Jun 26 07:28:35 EDT 2011


  On 6/25/11 7:06 PM, Slava Paperno wrote:
> Is that the way to do it? Seems a bit childish:)  There's got to be a
> "controlType" property, no?
>
> Slava
>
Sorry, I don't think so...

   using Claudi suggestion: by making a command/function

put this in your object's script

on mousewithin
    switchControls(the abbrev name of me)
end mousewithin

Then in your group, card or stack script put:

command  switchControls pObjectName

     put word 1 of pObjectName into tControlType

     switch tControlType
        case "button"
           set the cursor to hand
            break
        case "field"
           answer "this is a field" with "OK"
           set the cursor to iBeam
      break
     end switch

end switchControls

Tried to put these script handlers in to button and use the button ID as 
a behavior in other objects, but it doesn't work.
dunnu why.. the "host" object does not pass "mousewithin" to the 
behavior object assigned to it. i think I recall something about this 
from one of the conferences but don't know where it is documented.

skts




More information about the Use-livecode mailing list