Problem with the parameter of a callback method [GTK+]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with the parameter of a callback method [GTK+]

ZuLuuuuuu
Hello,

I have a callback method for this callback:

http://developer.gnome.org/gtk3/stable/GtkNotebook.html#GtkNotebook-switch-page

My callback method is:
       
myCallback: aWidget pageNumber: pageNumber [
	pageNumber printString printNl.
]

The text printed when the callback is called is numbers like: '13034496'.

Is this a CObject or something? How can I get the pageNumber in this situation?
Canol Gökel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with the parameter of a callback method [GTK+]

Paolo Bonzini-2
On 07/08/2011 09:11 AM, ZuLuuuuuu wrote:

> Hello,
>
> I have a callback method for this callback:
>
> http://developer.gnome.org/gtk3/stable/GtkNotebook.html#GtkNotebook-switch-page
>
> My callback method is:
>
> myCallback: aWidget pageNumber: pageNumber [
> pageNumber printString printNl.
> ]
>
>
> The text printed when the callback is called is numbers like: '13034496'.
>
> Is this a CObject or something? How can I get the pageNumber in this
> situation?

Define it as

myCallback: aNotebook page: aPage pageNumber: pageNumber

You were removing a parameter in the middle. :)

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Problem with the parameter of a callback method [GTK+]

ZuLuuuuuu
Paolo Bonzini-2 wrote
On 07/08/2011 09:11 AM, ZuLuuuuuu wrote:
> Hello,
>
> I have a callback method for this callback:
>
> http://developer.gnome.org/gtk3/stable/GtkNotebook.html#GtkNotebook-switch-page
>
> My callback method is:
>
> myCallback: aWidget pageNumber: pageNumber [
> pageNumber printString printNl.
> ]
>
>
> The text printed when the callback is called is numbers like: '13034496'.
>
> Is this a CObject or something? How can I get the pageNumber in this
> situation?

Define it as

myCallback: aNotebook page: aPage pageNumber: pageNumber

You were removing a parameter in the middle. :)

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Oh ok, thanks :)
Canol Gökel