[wxruby-users] New problem: Newlines.
Mario Steele
mario at ruby-im.net
Thu Jan 8 23:39:18 EST 2009
Right now, I'm trying to get a compile of the latest Subversion that will be
deemed 2.0 going, so that I can run my tests to see if there are any
outstanding bugs that need to be covered. The WxRuby::THE_APP error, is
something that is kinda curious. I don't have a Mac system in which to test
out on, but from the looks of it, somehow WxRuby::THE_APP (AKA Wx::THE_APP),
is not being set, when your code calls the GuiMudClientApp.new, which is
suppose to be handled internally by wxRuby when you create the very first
App class or App subclass.
Meaning, that there is only 1 App that can be in existance during the entire
run of wxRuby. There are ways around it, but it's only for thoes who are
more experienced with the library, and know of the dangers of it. However,
in this case, your problem occurs in main_loop(), which is weird. My
suggestion to you, would be to move the code out of main_loop(), and throw
it into on_init(). Since you will have $connection setup by that time.
Just to test and see if the problem actually does lie in main_loop(), or
not.... And actually, I think on_init() isn't actually called till you
execute main_loop(), it's part of the process it goes through once
everything is initialized, it finalizes by running any on_init() methods you
have defined. So try moving the code there. That's the best I can suggest,
till I get wxWidgets and wxRuby compiled on Windows, to test your code, to
see if it has the same problem.
On Thu, Jan 8, 2009 at 9:49 PM, Tim Mcd <lists at ruby-forum.com> wrote:
> Mario Steele wrote:
> > You need to make sure that you pass the TE_MULTILINE to the creation of
> > the
> > TextCtrl, EG:
> >
> > test2 = TextCtrl.new(frame, 10, "Output here!", Point.new(0,
> > 501),Size.new(500, 25), TE_PROCESS_ENTER|TE_MULTILINE)
> >
> > This will create a Multi-Line Text Control, which can display new lines,
> > if
> > you create a TextCtrl without the TE_MULTILINE, it'll create a Single
> > Line
> > Text Control, even though the sizer will resize it to look like it's a
> > Multi-Line Text control.
>
> Thats good, thanks for that.
>
> Have any idea about the 'THE_APP' error?
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
--
Mario Steele
http://www.trilake.net
http://www.ruby-im.net
http://rubyforge.org/projects/wxruby/
http://rubyforge.org/projects/wxride/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090108/f64db82b/attachment.html>
More information about the wxruby-users
mailing list