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..



_______________________________________________
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

Reply via email to