Try wrapping it in a lambda?
self.btn_add = cmds.symbolButton( width=60, height=20, annotation='Add 
object(s)', image='add.xpm', command=lambda *x: self.add_btn_callback(
"item_list") )

On Tuesday, March 14, 2017 at 10:59:37 AM UTC-5, likage wrote:
>
> While it works for the example, I tried applying the same concept into my 
> actual code, I am getting the errors..
> self.btn_add = cmds.symbolButton( width=60, height=20, annotation='Add 
> object(s)', image='add.xpm', command=self.add_btn_callback("item_list") )
>
> def add_btn_callback(self, "list"):
>     # Do the exec when add button is clicked
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/6193d5e7-2ddd-4e1e-a822-0c3d35a8a1f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to