PDA

View Full Version : Problems with assigning callback function in MEL


AlexSudnikov
01-28-2013, 12:40 PM
Hey everyone!
I'm sure it's pretty dumb problem but i just can't figure it out.
I want my button to perform some action ( basically call other function with a parameter)

button -command("exportObjChan("+$mainBoxGroupUI+")")$mainBoxGroupUI ;

But no matter what mainBoxGroupUI is , i got the same error : "Invalid use of Maya object"

exportObjChan( string $value)
{}

Any suggestions are greatly appreciated! Thx^^

rgkovach123
01-28-2013, 01:56 PM
you may need to put a pair of escaped quotes around your string.

button -command("exportObjChan(\""+$mainBoxGroupUI+"\")")$mainBoxGroupUI;

CGTalk Moderation
01-28-2013, 01:56 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.