Steve McClure wrote:
>I'm sure I'm doing something dumb but I'm trying to simulate a notebook
>page change if the notebook is already mapped and page X is already
>displayed. I'm doing this because I'm loading the contents of the page
>on the switch signal for that page and you don't get the signal if say
>the dialog is displaying data and the data source changes.
>
>I've tried notebook.emit('switch-page', page, pageNum) and
>notebook.emit('switch-page', notebook, page, pageNum) but I get this
>error:
>
> File
>"/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.1/site-packages/gtk.py",
>line 167, in emit
> return _gtk.gtk_signal_emitv_by_name(self._o,signal,params)
>TypeError: argument 1: expected gpointer, GtkObject found
>
>Can anyone point out my error please?
>
>
You shouldn't be emitting that signal directly. You should use the
notebook.set_page(page_num) method (which will emit "switch_page" if
appropriate). The signal takes a pointer argument to a GtkNotebookPage
struct (which shouldn't even be used in C programs these days ...) which
you can't create in Python, which is the cause of the exception.
James.
--
Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/
WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia.
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/