[wxruby-development] [ wxruby-Bugs-17013 ] Notebook#get_current_page
Alex Fenton
alex at pressure.to
Fri Jan 11 08:14:10 EST 2008
wxNotebookPage is a wxWidgets internal class name, which in wxRuby is
aliased to its correct (basic) return type, Window. That's in Notebook.i.
However I think get_page probably currently won't work correctly for
Notebooks loaded from XRC, for the same reasons (it shouldn't return an
actual Ruby instance of Wx::Window, but some specific window subclass).
What get_ruby_window.i does is interface with wxWidgets' run-time class
information system to map a C++ class to the right ruby class
I'll see if you're on IRC ....
a
Mario Steele wrote:
> Yeah, I need to read more, before I start throwing stuff out. I see
> the difference. GetPage() returns wxNotebookPage, not wxWindow. I'll
> look into the code you provided, and try compiling it here in a bit.
>
> L8ers,
>
> Mario Steele
>
> On 1/11/08, *Mario Steele* <mario at ruby-im.net
> <mailto:mario at ruby-im.net>> wrote:
>
> Okay, I mis-read it myself. Anyways, looking at the generated
> code, and such, I actually find, that wxNotebook::GetPage() is
> already wrapped, which means it should already have the stuff
> needed for GetCurrentPage() to work and return the correct
> casting. I just need to correct it in wxNotebook.h to return a
> wxWindow instead of a int.
>
> L8ers,
>
> Mario Steele
>
> On 1/11/08, *Alex Fenton* < alex at pressure.to
> <mailto:alex at pressure.to>> wrote:
>
> Mario Steele wrote:
> > I'll try it and see if it'll work without using the
> > swig/classes/Window.i, and include
> 'shared/get_ruby_window.i'. From
> > what I can tell of wxNotebook::GetCurrentPage() API, it only
> returns
> > the index of the Current Page being displayed.
> I'm not sure - in both the wxWidgets and wxRuby docs it's
> documented as
> returning wxWindow* or NULL. In which case it will need to use
> get_ruby_window etc. If you want to leave it I can do it this
> evening.
>
> cheers
> alex
> _______________________________________________
> wxruby-development mailing list
> wxruby-development at rubyforge.org
> <mailto:wxruby-development at rubyforge.org>
> http://rubyforge.org/mailman/listinfo/wxruby-development
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> wxruby-development mailing list
> wxruby-development at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-development
>
More information about the wxruby-development
mailing list