Re: [Rhythmbox-devel] startView() takes exactly 1 argument (3 given)

Hello Jannik,

I tried that before, I changed it to what you suggested but that still gives me the exact same error message.


Jannik Heller wrote:
Hi Ron,
your callback function should look like this:

def startView(self, widget, shell)

because GTK Connect supplies the widget that is connected, too.

Am Dienstag, den 29.12.2009, 09:40 -0500 schrieb Ron Croonenberg:

I am (trying) to write a plugin for rhythmbox (in python) and keep running into an error msg from an action from the toolbar

I am adding a 'button' to the toolbar and when it's clicked execute a function/method.

I get a runtime error every time I click the button, here it is:
TypeError: startView() takes exactly 1 argument (3 given)
(It doesn't matter how many arguments I use in the function/method header, the same error-msg shows up.

I followed the outline in the rhythmbox plugins writing guide for adding 'an item'.

Here is the code snippet:

# the activate thing
def activate(self, shell): = shell

view_button = """
   <toolbar name="ToolBar">
     <placeholder name="startView">
       <toolitem name="startView" action="viewAction">

# create a new action
action = gtk.Action('viewAction',
                   _('Start _View'),
                   _('Browse'), "")

# connect it
action.connect('activate', self.startView, shell)
action_group = gtk.ActionGroup('NewActionGroup')
shell.get_ui_manager().insert_action_group(action_ group)

# add it to the toolbar
ui_manager = shell.get_ui_manager()

# Start the View
def startView(self, b, c, d): # tried this with 1, 2, 3, 4, 5... args

any tips/hints ?



main(p){printf(p,34,p="main(p){printf(p,34,p=%c%s%c,34); }",34); }
Ron Croonenberg                   |
                                  | Phone: 1 765 658 4761
Lab Instructor &                  | Fax:   1 765 658 4732
        Technology Coordinator    |
Department of Computer Science    | e-mail: ronc DePauw edu
DePauw University                 |
275 Julian Science & Math Center  |
602 South College Ave.            |
Greencastle, IN  46135            |

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]