the objectType of me?

Web Admin Himalayan Academy katir at hindu.org
Sun Jun 26 07:24:13 EDT 2011


  On 6/25/11 10:49 PM, Claudi Cornaz wrote:
> Hi Slava,
>
> You can use: word 1 of the abbrev name of me
> The abbrev name will return 'the type of control and the short name' like: button "myButton" or graphic "this grc"
>
>     Claudi
Slava... there is no "controlType"   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..






More information about the use-livecode mailing list