hey Justin, now I get this :

# Error: myfunction() takes exactly 1 argument (2 given)

# TypeError: myfunction() takes exactly 1 argument (2 given) #



but I am not passing it any arguments.



this is exactly what I have



cmds.button(proc, e = 1, command = self.myfunction)





def myfunction(self):

    blah......






On Sat, May 4, 2013 at 4:03 PM, Todd Widup <[email protected]> wrote:

> ah ok, thanks Justin
>
>
> On Sat, May 4, 2013 at 3:56 PM, Justin Israel <[email protected]>wrote:
>
>> Make sure you are passing the method object and not actually calling it:
>>
>> cmds.button(myButton, e = 1, command = self.process)
>>
>> You were doing this:  self.process()
>>
>>
>>
>> On May 5, 2013, at 10:54 AM, Todd Widup wrote:
>>
>> using the CMDS commands for a quick UI
>>
>> when I have this in my code :
>>
>> cmds.button(myButton, e = 1, command = self.process())
>>
>> it is running it as soon as the window is built.  any suggestions on how
>> to prevent it from running at once?
>>
>> --
>> Todd Widup
>> Creature TD / Technical Artist
>> [email protected]
>> [email protected]
>> www.toddwidup.com
>>
>> --
>> 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 post to this group, send email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>>
>>  --
>> 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 post to this group, send email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Todd Widup
> Creature TD / Technical Artist
> [email protected]
> [email protected]
> www.toddwidup.com
>



-- 
Todd Widup
Creature TD / Technical Artist
[email protected]
[email protected]
www.toddwidup.com

-- 
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to