From field.tim at gmail.com Fri Nov 2 03:53:12 2007 From: field.tim at gmail.com (Tim Field) Date: Fri, 2 Nov 2007 20:53:12 +1300 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' Message-ID: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> Hi I'm trying to follow the tutorial on xrcise at http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise But I keep getting the following error when I try to run the example; tutorial.rb:21:in `initialize': undefined method 'upper_bt' for # (NoMethodError) from tutorial.rb:28:in `new' from tutorial.rb:28:in `on_init' from c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32/lib/wx/classes/app.rb:16:in `main_loop' from c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32/lib/wx/classes/app.rb:16:in `run' from tutorial.rb:27 The relevant ruby code looks like. # Inherit from the generated base class and set up event handlers class CaseChangeFrame < TextFrameBase def initialize super evt_button(upper_bt) { text_box.upcase! } evt_button(lower_bt) { text_box.downcase! } end end I have triple checked that I have given the button widget an Id name of upper_bt in DialogBlocks Has anyone come across this before? Thanks Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071102/d16ab784/attachment-0001.html From alex at pressure.to Fri Nov 2 07:17:33 2007 From: alex at pressure.to (Alex Fenton) Date: Fri, 02 Nov 2007 11:17:33 +0000 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> Message-ID: <472B074D.5010801@pressure.to> Hi Tim Tim Field wrote: > I'm trying to follow the tutorial on xrcise at > http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise > > But I keep getting the following error when I try to run the example; > tutorial.rb:21:in `initialize': undefined method 'upper_bt' for > # (NoMethodError) > from tutorial.rb:28:in `new' > from tutorial.rb:28:in `on_init' > from > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32/lib/wx/classes/app.rb:16:in > `main_loop' > from > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32/lib/wx/classes/app.rb:16:in > `run' > from tutorial.rb:27 Thanks for the report. Hard to say what's going on here - could you post the my_frame.xrc that you're running XRCise against, and also the my_frame.rb that's been generated? alex From smashwilson at gmail.com Fri Nov 2 17:02:56 2007 From: smashwilson at gmail.com (Ash Wilson) Date: Fri, 2 Nov 2007 17:02:56 -0400 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <472B074D.5010801@pressure.to> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> Message-ID: <767441450711021402j5c247681h46ed1c9dabc3751@mail.gmail.com> To my eyes, this looks like a simple syntax slip. The argument to evt_button is being interpreted as a method call, not a symbol as intended. Note the colons: evt_button(:upper_bt) { text_box.upcase! } evt_button(:lower_bt) { text_box.downcase! } - Ash On 11/2/07, Alex Fenton wrote: > > Hi Tim > > Tim Field wrote: > > I'm trying to follow the tutorial on xrcise at > > http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise > > > > But I keep getting the following error when I try to run the example; > > tutorial.rb:21:in `initialize': undefined method 'upper_bt' for > > # (NoMethodError) > > from tutorial.rb:28:in `new' > > from tutorial.rb:28:in `on_init' > > from > > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32 > /lib/wx/classes/app.rb:16:in > > `main_loop' > > from > > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32 > /lib/wx/classes/app.rb:16:in > > `run' > > from tutorial.rb:27 > Thanks for the report. Hard to say what's going on here - could you post > the my_frame.xrc that you're running XRCise against, and also the > my_frame.rb that's been generated? > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071102/399b7ea6/attachment.html From alex at pressure.to Fri Nov 2 17:21:25 2007 From: alex at pressure.to (Alex Fenton) Date: Fri, 02 Nov 2007 21:21:25 +0000 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <767441450711021402j5c247681h46ed1c9dabc3751@mail.gmail.com> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> <767441450711021402j5c247681h46ed1c9dabc3751@mail.gmail.com> Message-ID: <472B94D5.4020807@pressure.to> Ash Wilson wrote: > To my eyes, this looks like a simple syntax slip. The argument to > evt_button is being interpreted as a method call, not a symbol as > intended. Note the colons: > > evt_button(:upper_bt) { text_box.upcase! } > evt_button(:lower_bt) { text_box.downcase! } The first argument to evt_button, as to the other event handlers that capture commands from Controls, is a Window or a Window id that is the source of the vents So these should be methods which return a Wx::Button alex From field.tim at gmail.com Fri Nov 2 20:42:14 2007 From: field.tim at gmail.com (Tim Field) Date: Sat, 3 Nov 2007 13:42:14 +1300 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <472B074D.5010801@pressure.to> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> Message-ID: <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> Hi Alex Thanks for taking a look, Here are the files, I also tried the syntax changes mentioned by Ash but this didn't work either, resulted in this error. Must specify Wx::Window event source or its Wx id, not ':upper_bt' (ArgumentError) I'm fairly new to ruby syntax so it wouldn't be beyond me to have such a problem but seems its something else Tim On 11/3/07, Alex Fenton wrote: > > Hi Tim > > Tim Field wrote: > > I'm trying to follow the tutorial on xrcise at > > http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise > > > > But I keep getting the following error when I try to run the example; > > tutorial.rb:21:in `initialize': undefined method 'upper_bt' for > > # (NoMethodError) > > from tutorial.rb:28:in `new' > > from tutorial.rb:28:in `on_init' > > from > > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32 > /lib/wx/classes/app.rb:16:in > > `main_loop' > > from > > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.2-i386-mswin32 > /lib/wx/classes/app.rb:16:in > > `run' > > from tutorial.rb:27 > Thanks for the report. Hard to say what's going on here - could you post > the my_frame.xrc that you're running XRCise against, and also the > my_frame.rb that's been generated? > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071103/f76d7083/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: my_frame.rb Type: application/octet-stream Size: 880 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20071103/f76d7083/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: tutorial.xrc Type: application/octet-stream Size: 2372 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20071103/f76d7083/attachment-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: tutorial.rb Type: application/octet-stream Size: 701 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20071103/f76d7083/attachment-0002.obj From mario at ruby-im.net Fri Nov 2 21:25:35 2007 From: mario at ruby-im.net (Mario Steele) Date: Fri, 02 Nov 2007 20:25:35 -0500 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> Message-ID: <472BCE0F.2060203@ruby-im.net> Hey Tim and Alex, Tim Field wrote: > Hi Alex > > Thanks for taking a look, Here are the files, I also tried the syntax > changes mentioned by Ash but this didn't work either, > resulted in this error. > Must specify Wx::Window event source or its Wx id, not ':upper_bt' > (ArgumentError) > I'm fairly new to ruby syntax so it wouldn't be beyond me to have such > a problem but seems its something else > > Tim Wow, must be one of the first fast ones I've actually debugged here. I've done my own debugging, and it looks like, your trying to setup the ID for your objects, and they haven't even been defined yet. And for you Alex, in order to access "finder" You should proabbly store that as a Method Call, or store it as a Class Variable, so that it can be accessed, in this sistuation. Anyways, the core problem, is first, for the method at which your generating the code, and adding to it, you need to change the "finder" variable in my_frame.rb in TestFrameBase#initialize() to a class variable, so it can be accessed by sub-classed versions of the TestFrameBase. You can do this easily by just adding an '@' symbol to it. Nothing to it really. Next, in your sub-classed version in tutorial.rb, I made a few changes. Basically, I added the three calls to @finder.call("id_we_are_looking_for") for upper_bt, lower_bt, and text_box, then changed the upcase and downcase to the following: text_box.value = text_box.value.upcase/downcase As you can modify the string with upcase!/downcase!, but it doesn't modify it in the wxRuby Buffer, so you need to re-assign it to the buffer, so that it will convert over properly for you, and display the changes. The New code goes as follows: ======================my_frame.rb======================= # This class was automatically generated from XRC source. It is not # recommended that this file is edited directly; instead, inherit from # this class and extend its behaviour there. # # Source file: tutorial.xrc # Generated at: Sat Nov 03 13:22:37 +1300 2007 class TextFrameBase < Wx::Frame def initialize(parent = nil) super() xml = Wx::XmlResource.get xml.flags = 2 # Wx::XRC_NO_SUBCLASSING xml.init_all_handlers xml.load("tutorial.xrc") xml.load_frame_subclass(self, parent, "ID_WXFRAME") @finder = lambda do | x | int_id = Wx::xrcid(x) begin Wx::Window.find_window_by_id(int_id, self) || int_id # Temporary hack to work around regression in 1.9.2; remove # begin/rescue clause in later versions rescue RuntimeError int_id end end end end =====================tutorial.rb=========================== require 'wx' # load in the generated code require 'my_frame' # Mix-in for a Wx::TextCtrl module CaseChangeTextCtrl # convert all the text in the control to upper case def upcase! self.value = self.value.upcase end # convert all the text in the control to lower case def downcase! self.value = self.value.downcase end end # Inherit from the generated base class and set up event handlers class CaseChangeFrame < TextFrameBase def initialize super upper_bt = @finder.call("upper_bt") lower_bt = @finder.call("lower_bt") text_box = @finder.call("text_box") evt_button(upper_bt) { text_box.value = text_box.value.upcase } evt_button(lower_bt) { text_box.value = text_box.value.downcase } end end # Run the class Wx::App.run do CaseChangeFrame.new.show end ============================================================ Enjoy the new code, and Alex, you should look into this, incase someone decides they want to do something similar to this. This would exactly be the way that I would want to do it. L8ers, Mario Steele From field.tim at gmail.com Sat Nov 3 04:06:31 2007 From: field.tim at gmail.com (Tim Field) Date: Sat, 3 Nov 2007 21:06:31 +1300 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <472BCE0F.2060203@ruby-im.net> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> <472BCE0F.2060203@ruby-im.net> Message-ID: <97a92e950711030106s5ec29389hf0a737c3c890080f@mail.gmail.com> Hi Mario Wow thanks for that sure enough it works! Do you think the tutorial at http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise should be updated, I'm surprised this hasn't been an issue for someone else? Also I was thinking in php (i work with php for a living) there are special get and set methods you can define which are only triggered when your object or inherited object doesn't contain the member or method you're trying to access. (http://nz.php.net/manual/en/language.oop5.overloading.php ) so in this example in php I would write something like. function __get($name){ if($element = $this->finder($name)) return $element; trigger_error("undefined property $name"); } Maybe such a function would be useful in the base class in the tutorial example to look up the form elements thus preventing the need for the "upper_bt = @finder.call("upper_bt")" lines. Anyway I had a good look at the ruby manual I have and couldn't find a way to do this, I'm sure there is? or perhaps you guys can think of a more elegant solution? Thanks again for helping me though that issue guys! Tim On 11/3/07, Mario Steele wrote: > > Hey Tim and Alex, > > Tim Field wrote: > > Hi Alex > > > > Thanks for taking a look, Here are the files, I also tried the syntax > > changes mentioned by Ash but this didn't work either, > > resulted in this error. > > Must specify Wx::Window event source or its Wx id, not ':upper_bt' > > (ArgumentError) > > I'm fairly new to ruby syntax so it wouldn't be beyond me to have such > > a problem but seems its something else > > > > Tim > > Wow, must be one of the first fast ones I've actually debugged here. > I've done my own debugging, and it looks like, your trying to setup the > ID for your objects, and they haven't even been defined yet. And for > you Alex, in order to access "finder" You should proabbly store that as > a Method Call, or store it as a Class Variable, so that it can be > accessed, in this sistuation. > > Anyways, the core problem, is first, for the method at which your > generating the code, and adding to it, you need to change the "finder" > variable in my_frame.rb in TestFrameBase#initialize() to a class > variable, so it can be accessed by sub-classed versions of the > TestFrameBase. You can do this easily by just adding an '@' symbol to > it. Nothing to it really. > > Next, in your sub-classed version in tutorial.rb, I made a few changes. > Basically, I added the three calls to > @finder.call("id_we_are_looking_for") for upper_bt, lower_bt, and > text_box, then changed the upcase and downcase to the following: > text_box.value = text_box.value.upcase/downcase As you can modify the > string with upcase!/downcase!, but it doesn't modify it in the wxRuby > Buffer, so you need to re-assign it to the buffer, so that it will > convert over properly for you, and display the changes. The New code > goes as follows: > > ======================my_frame.rb======================= > > # This class was automatically generated from XRC source. It is not > # recommended that this file is edited directly; instead, inherit from > # this class and extend its behaviour there. > # > # Source file: tutorial.xrc > # Generated at: Sat Nov 03 13:22:37 +1300 2007 > > class TextFrameBase < Wx::Frame > > def initialize(parent = nil) > super() > xml = Wx::XmlResource.get > xml.flags = 2 # Wx::XRC_NO_SUBCLASSING > xml.init_all_handlers > xml.load("tutorial.xrc") > xml.load_frame_subclass(self, parent, "ID_WXFRAME") > > @finder = lambda do | x | > int_id = Wx::xrcid(x) > begin > Wx::Window.find_window_by_id(int_id, self) || int_id > # Temporary hack to work around regression in 1.9.2; remove > # begin/rescue clause in later versions > rescue RuntimeError > int_id > end > end > > end > end > > =====================tutorial.rb=========================== > require 'wx' > # load in the generated code > require 'my_frame' > > # Mix-in for a Wx::TextCtrl > module CaseChangeTextCtrl > # convert all the text in the control to upper case > def upcase! > self.value = self.value.upcase > end > # convert all the text in the control to lower case > def downcase! > self.value = self.value.downcase > end > end > > # Inherit from the generated base class and set up event handlers > class CaseChangeFrame < TextFrameBase > def initialize > super > upper_bt = @finder.call("upper_bt") > lower_bt = @finder.call("lower_bt") > text_box = @finder.call("text_box") > evt_button(upper_bt) { text_box.value = text_box.value.upcase } > evt_button(lower_bt) { text_box.value = text_box.value.downcase } > end > end > > # Run the class > Wx::App.run do > CaseChangeFrame.new.show > end > > > ============================================================ > > Enjoy the new code, and Alex, you should look into this, incase someone > decides they want to do something similar to this. This would exactly > be the way that I would want to do it. > > L8ers, > > Mario Steele > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071103/912fa051/attachment-0001.html From alex at pressure.to Sat Nov 3 11:47:15 2007 From: alex at pressure.to (Alex Fenton) Date: Sat, 03 Nov 2007 15:47:15 +0000 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> Message-ID: <472C9803.8090706@pressure.to> Hi Tim Tim Field wrote: > > Thanks for taking a look, Here are the files, I also tried the syntax > changes mentioned by Ash but this didn't work either, As Mario says, it's the missing finder calls that are the problem, but these should be in the autogenerated base class, not the user class you're writing. Finder is meant to be a private implementation detail. There is something strange going on because when I run xrcise over the xrc file you sent, it does generate the missing lines in my_frame.rb attr_reader :text_box, :upper_bt, :lower_bt ... @text_box = finder.call("text_box") @text_box.extend(CaseChangeTextCtrl) @upper_bt = finder.call("upper_bt") @lower_bt = finder.call("lower_bt") Please could you double-check you're running xrcise over the latest saved version of your xrc file, as you posted it here. If those lines are still not showing up, could you say what ruby version and platform you're on. thanks alex thanks alex From alex at pressure.to Sat Nov 3 11:57:16 2007 From: alex at pressure.to (Alex Fenton) Date: Sat, 03 Nov 2007 15:57:16 +0000 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <97a92e950711030106s5ec29389hf0a737c3c890080f@mail.gmail.com> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> <472BCE0F.2060203@ruby-im.net> <97a92e950711030106s5ec29389hf0a737c3c890080f@mail.gmail.com> Message-ID: <472C9A5C.3020505@pressure.to> Tim Field wrote: > Also I was thinking in php (i work with php for a living) there are > special get and set methods you can define which are only triggered > when your object or inherited object doesn't contain the member or > method you're trying to access. ( > http://nz.php.net/manual/en/language.oop5.overloading.php) Object#method_missing is what you're looking for. class Foo def method_missing(meth, *args) puts "Called non-existing method '#{meth}' with arguments '#{args.join(',')}'" end end It's best used with discretion, because it breaks reflection on an object's supported methods eg, Foo.new.respond_to?(:blah) => false Even if 'blah' would be a valid method call. cheers alex From lists at ruby-forum.com Sat Nov 3 23:17:14 2007 From: lists at ruby-forum.com (Sebastian Comella) Date: Sun, 4 Nov 2007 04:17:14 +0100 Subject: [wxruby-users] Can't run samples - Mac OS 10.3 w/ RubyGems Message-ID: Hello - I'm interested in leveraging wxRuby on my PowerPC-based iBook. I've got Mac OS 10.3.9 and I installed wxRuby 1.9.2 using gems. However, when I try to run samples such as minimal.rb, I get the following error: dyld: ruby Undefined symbols: _DataBrowserChangeAttributes _PMGetDuplex _PMSetDuplex _TXNGetCommandEventSupport _TXNSetCommandEventSupport _TXNSetSpellCheckAsYouType Trace/BPT trap It seems to be some fundamental issue with the install as I get the same error no matter what sample I run. It's my understanding that I don't need to install any other libraries, but if I've overlooked something please let me know. Thanks! Sebastian. -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Sat Nov 3 23:37:26 2007 From: alex at pressure.to (Alex Fenton) Date: Sun, 04 Nov 2007 03:37:26 +0000 Subject: [wxruby-users] Can't run samples - Mac OS 10.3 w/ RubyGems In-Reply-To: References: Message-ID: <472D3E76.403@pressure.to> Hi Sebastian Sebastian Comella wrote: > I'm interested in leveraging wxRuby on my PowerPC-based iBook. > I've got Mac OS 10.3.9 and I installed wxRuby 1.9.2 using gems. > However, when I try to run samples such as minimal.rb, I get the > following error: > > dyld: ruby Undefined symbols: > _DataBrowserChangeAttributes > _PMGetDuplex > _PMSetDuplex > _TXNGetCommandEventSupport > _TXNSetCommandEventSupport > _TXNSetSpellCheckAsYouType > Trace/BPT trap > I haven't seen this error but I wonder whether it's because recent PPC versions of wxRuby have been built using 10.4. I think, for example, that spell-check-as-you-type was a feature difference between 10.3 and 10.4, and wxWidgets conditionally compiles support for this in. The last binary that was built using 10.3 was preview-0.0.40. Perhaps you could try downloading it from: http://rubyforge.org/frs/download.php/25570/wxruby2-preview-0.0.40-powerpc-darwin7.9.0.gem.old Save the file, rename it to take the ".old" suffix off it, then run "gem install wxruby2-preview" in that directory, and also uninstall the 1.9.2 gem. If you can run the samples with that, then it is down to the OS version. Unfortunately, in that case, you'll have to compile your own version of 1.9.2, as, since my Powerbook got nicked, no-one in the dev team has a 10.3 machine. Fortunately, installing from source is pretty routien on OS X - see the wiki: http://wxruby.rubyforge.org/wiki/wiki.pl?Installation http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets hth alex From field.tim at gmail.com Sun Nov 4 03:48:52 2007 From: field.tim at gmail.com (Tim Field) Date: Sun, 4 Nov 2007 21:48:52 +1300 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <472C9803.8090706@pressure.to> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> <472C9803.8090706@pressure.to> Message-ID: <97a92e950711040148k79a28a8focfee275bcb34cf42@mail.gmail.com> Hi Alex, Those lines definitely aren't showing up. (when using that xrc file or another one I have) I'm running ruby 1.8.6 on winxp -Tim On 11/4/07, Alex Fenton wrote: > > Hi Tim > > Tim Field wrote: > > > > Thanks for taking a look, Here are the files, I also tried the syntax > > changes mentioned by Ash but this didn't work either, > As Mario says, it's the missing finder calls that are the problem, but > these should be in the autogenerated base class, not the user class > you're writing. Finder is meant to be a private implementation detail. > > There is something strange going on because when I run xrcise over the > xrc file you sent, it does generate the missing lines in my_frame.rb > > attr_reader :text_box, :upper_bt, :lower_bt > > ... > > @text_box = finder.call("text_box") > @text_box.extend(CaseChangeTextCtrl) > @upper_bt = finder.call("upper_bt") > @lower_bt = finder.call("lower_bt") > > Please could you double-check you're running xrcise over the latest > saved version of your xrc file, as you posted it here. > > If those lines are still not showing up, could you say what ruby version > and platform you're on. > > thanks > alex > > thanks > alex > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071104/97d95640/attachment.html From alex at pressure.to Mon Nov 5 12:57:41 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 05 Nov 2007 17:57:41 +0000 Subject: [wxruby-users] xrcise tutorial, undefined method 'upper_bt' In-Reply-To: <97a92e950711040148k79a28a8focfee275bcb34cf42@mail.gmail.com> References: <97a92e950711020053w2d76539bt5c97c8296baafef@mail.gmail.com> <472B074D.5010801@pressure.to> <97a92e950711021742j45ee9f95qa0bf73e77726e940@mail.gmail.com> <472C9803.8090706@pressure.to> <97a92e950711040148k79a28a8focfee275bcb34cf42@mail.gmail.com> Message-ID: <472F5995.4040001@pressure.to> Tim Tim Field wrote: > Those lines definitely aren't showing up. (when using that xrc file or > another one I have) > > I'm running ruby 1.8.6 on winxp I couldn't reproduce the bug with XP/1.8.4, but I tried installing the latest 1.8.6 and now can. It's due to some incompatible change in REXML shipped with ruby 1.8.4 (version 3.1.3) and 1.8.6 (version 3.1.6), somewhere in it's XPath parsing, but exactly what's needed is eluding me right now. Anyway, thanks again for the report. We should be able to pin down what's up and put out a version of wxSugar inc XRCise that works on 1.8.6 in the next week or so. alex From lists at ruby-forum.com Mon Nov 5 20:40:37 2007 From: lists at ruby-forum.com (Sebastian Comella) Date: Tue, 6 Nov 2007 02:40:37 +0100 Subject: [wxruby-users] Can't run samples - Mac OS 10.3 w/ RubyGems In-Reply-To: <472D3E76.403@pressure.to> References: <472D3E76.403@pressure.to> Message-ID: <3ca43334248d6e3d54691d6c8809e2e6@ruby-forum.com> > Unfortunately, in that case, you'll have to compile your own version of > 1.9.2, as, since my Powerbook got nicked, no-one in the dev team has a > 10.3 machine. Fortunately, installing from source is pretty routien on > OS X - see the wiki: > > http://wxruby.rubyforge.org/wiki/wiki.pl?Installation > http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets > Thanks Alex - I did try to build WxWidgets and during configuration it complained about not finding a recent enough version of GTK. If you know a quick fix for that issue (command line switch for configure?) that would be great, but I think it's simply time I shell out for a new OS version. :) Thanks for your help! Sebastian. -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Tue Nov 6 07:00:31 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 06 Nov 2007 12:00:31 +0000 Subject: [wxruby-users] Can't run samples - Mac OS 10.3 w/ RubyGems In-Reply-To: <3ca43334248d6e3d54691d6c8809e2e6@ruby-forum.com> References: <472D3E76.403@pressure.to> <3ca43334248d6e3d54691d6c8809e2e6@ruby-forum.com> Message-ID: <4730575F.8050108@pressure.to> Sebastian Comella wrote: > I did try to build WxWidgets and during configuration it complained > about not finding a recent enough version of GTK. If you know a quick > fix for that issue (command line switch for configure?) that would be > great, It shouldn't be looking for gtk on OS X, that's for Linux. Is there --with-gtk in your configure flags? Check you're using the right ./configure switches from http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets cheers alex From teki321 at gmail.com Tue Nov 6 17:57:24 2007 From: teki321 at gmail.com (Bela Babik) Date: Wed, 7 Nov 2007 09:57:24 +1100 Subject: [wxruby-users] gem problems on Windows Message-ID: $ gem list wxruby *** LOCAL GEMS *** wxruby (1.9.1, 1.9.0) Ruby interface to the wxWidgets GUI library $ gem install wxruby Need to update 39 gems from http://gems.rubyforge.org ....................................... complete Select which gem to install for your platform (i386-mswin32) 1. wxruby 1.9.2 (x86_64-linux) 2. wxruby 1.9.1 (x86_64-linux) 3. Skip this gem 4. Cancel installation > $ gem -v 0.9.2 $ ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] From mario at ruby-im.net Tue Nov 6 18:53:10 2007 From: mario at ruby-im.net (Mario Steele) Date: Tue, 06 Nov 2007 17:53:10 -0600 Subject: [wxruby-users] gem problems on Windows In-Reply-To: References: Message-ID: <4730FE66.8060203@ruby-im.net> Hello Bela, I've confirmed that this is a problem, as I've ran the same thing, only difference is that I'm running v0.9.4 of RubyGems, and I'm running Ruby v1.8.6 (2007-09-23 patchlevel 110) [i386-mingw32] as I do custom compiling, and don't use Visual C to compile. Alex, did you update RubyGems repository? L8ers, Mario Steele Bela Babik wrote: > $ gem list wxruby > > *** LOCAL GEMS *** > > wxruby (1.9.1, 1.9.0) > Ruby interface to the wxWidgets GUI library > > $ gem install wxruby > Need to update 39 gems from http://gems.rubyforge.org > ....................................... > complete > Select which gem to install for your platform (i386-mswin32) > 1. wxruby 1.9.2 (x86_64-linux) > 2. wxruby 1.9.1 (x86_64-linux) > 3. Skip this gem > 4. Cancel installation > > > $ gem -v > 0.9.2 > > $ ruby -v > ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071106/f981ab3b/attachment-0001.html From alex at pressure.to Tue Nov 6 19:01:59 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 07 Nov 2007 00:01:59 +0000 Subject: [wxruby-users] gem problems on Windows In-Reply-To: <4730FE66.8060203@ruby-im.net> References: <4730FE66.8060203@ruby-im.net> Message-ID: <47310077.3030401@pressure.to> Mario Steele wrote: > I've confirmed that this is a problem, as I've ran the same thing, I'm seeing this too on Linux i686; the only builds being offered are the AMD-64 ones. > only difference is that I'm running v0.9.4 of RubyGems, and I'm > running Ruby v1.8.6 (2007-09-23 patchlevel 110) [i386-mingw32] as I > do custom compiling, and don't use Visual C to compile. Out of interest, Mario, did you have to do anything special to compile with mingw on Windows? When I last tried I didn't get this to work. > Alex, did you update RubyGems repository? No, nothing's changed in the wxRuby project. I'm guessing it's an error with the rubyforge gem indexer. If it's not resolved itself I'll follow up. Bela - thanks for the report alex From mario at ruby-im.net Tue Nov 6 19:08:10 2007 From: mario at ruby-im.net (Mario Steele) Date: Tue, 06 Nov 2007 18:08:10 -0600 Subject: [wxruby-users] gem problems on Windows In-Reply-To: <47310077.3030401@pressure.to> References: <4730FE66.8060203@ruby-im.net> <47310077.3030401@pressure.to> Message-ID: <473101EA.9090305@ruby-im.net> Alex Fenton wrote: > Out of interest, Mario, did you have to do anything special to compile > with mingw on Windows? When I last tried I didn't get this to work. > I use both MinGW and MSYS to get the bash like interface. The only thing I did, was go into the source directory, and did up ./configure. It detected everything just fine. Though, if you try to use the make that comes with MinGW, there may be problems, so you may want to try using MSYS. If you still have problems compiling it, let me know, and I'll do a clean compile, and see what I did to get it to work. L8ers, Mario Steele From jari.williamsson at mailbox.swipnet.se Wed Nov 7 03:02:13 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Wed, 07 Nov 2007 09:02:13 +0100 Subject: [wxruby-users] 3 wxSugar questions Message-ID: <47317105.60800@mailbox.swipnet.se> A bit new to wxRuby and have 2 questions regarding wxSugar: 1. I only find one sample application for wxSugar, but as I understand from the docs, wsSugar is the preferred approach. Are there any more wxSugar samples available somewhere? 2. When I run sugar-sample.rb, I get a couple of warnings: "listen is deprecated, use evt_xxx directly". Just wanted to check: Is this sample outdated or is there some version mismatch? 3. Again when using sugar-sample.rb, the bottom part of the list box is covered by the panel with the buttons/dropdown/edit controls. I have to stretch the window quite much to get all the list box visible (on Windows XP). Is this the intended behavior? If I want to get the list box automatically resized according to its panel, how do I do that? Best regards, Jari Williamsson From alex at pressure.to Wed Nov 7 05:30:02 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 07 Nov 2007 10:30:02 +0000 Subject: [wxruby-users] 3 wxSugar questions In-Reply-To: <47317105.60800@mailbox.swipnet.se> References: <47317105.60800@mailbox.swipnet.se> Message-ID: <473193AA.1040607@pressure.to> Hi Jari Jari Williamsson wrote: > A bit new to wxRuby and have 2 questions regarding wxSugar: > 1. I only find one sample application for wxSugar, but as I understand > from the docs, wsSugar is the preferred approach. Are there any more > wxSugar samples available somewhere? > wxSugar is in a slightly limbo position at the moment. A few months ago we held a survey and there was a decisive vote in favour of adding most of the nice 'sugar' features into core wxRuby. So wxSugar has a few odds and ends that might be useful, but the most-wanted features are now part of wxRuby. Some of the wxRuby samples are updated to a 'sugar' style - eg minimal.rb, event.rb, nothing.rb. I should update the wiki to reflect this - sorry for the confusion. > 2. When I run sugar-sample.rb, I get a couple of warnings: "listen is > deprecated, use evt_xxx directly". Just wanted to check: Is this sample > outdated or is there some version mismatch? > wxRuby 1.9.2 added nicer event handling syntax to the core library, so "listen" in wxSugar isn't really relevant, but is kept for backwards compatibility. Have a look at the "event handling tutorial" in the current wxRuby docs for information on the options for setting up event handlers. > 3. Again when using sugar-sample.rb, the bottom part of the list box is > covered by the panel with the buttons/dropdown/edit controls. I have to > stretch the window quite much to get all the list box visible (on > Windows XP). Is this the intended behavior? If I want to get the list > box automatically resized according to its panel, how do I do that? > > I'll check this out. "Sizers" are the general way to fit subwindows within a larger window. It may be that a call to "sizer.layout" is needed in the frame's initializer - this tells the sizer to recalculate the size of all the child windows. cheers alex From jari.williamsson at mailbox.swipnet.se Wed Nov 7 07:23:59 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Wed, 07 Nov 2007 13:23:59 +0100 Subject: [wxruby-users] Wx::FileDialog and common dialogs Message-ID: <4731AE5F.9060201@mailbox.swipnet.se> The documentation for Wx::FileDialog is incorrectly generated: http://wxruby.rubyforge.org/doc/filedialog.html Every time the '*' (for the wildcard character in file filters) appears, the doc instead switches between boldface and normal. Also, it seems like the links under "See also" are broken. Feature request: Regarding all modal common dialogs (ColourDialog, DirDialog, FileDialog), it looks like it's currently not possible to set the style element outside new(). For the modal ones, it would make lots of sense to be able to set the style separately prior to show_modal: d.style = Wx::WHAT_EVER_STYLE Best regards, Jari Williamsson From alex at pressure.to Wed Nov 7 10:15:43 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 07 Nov 2007 15:15:43 +0000 Subject: [wxruby-users] Wx::FileDialog and common dialogs In-Reply-To: <4731AE5F.9060201@mailbox.swipnet.se> References: <4731AE5F.9060201@mailbox.swipnet.se> Message-ID: <4731D69F.7010205@pressure.to> Jari Williamsson wrote: > The documentation for Wx::FileDialog is incorrectly generated: > http://wxruby.rubyforge.org/doc/filedialog.html > Every time the '*' (for the wildcard character in file filters) appears, > the doc instead switches between boldface and normal. > Thanks for the report; we'll tidy it up for the next release. > Feature request: > Regarding all modal common dialogs (ColourDialog, DirDialog, > FileDialog), it looks like it's currently not possible to set the style > element outside new(). For the modal ones, it would make lots of sense > to be able to set the style separately prior to show_modal: > d.style = Wx::WHAT_EVER_STYLE For all Windows, which includes Dialogs, the style normally has to be set in the initializer - this is a WxWidgets restriction we can't really work around. There is a method d.window_style = Wx::WHAT_EVER http://wxruby.rubyforge.org/doc/window.html#Window_setwindowstyle - but the catch is that some styles cannot be altered after initialization. If you're looking for a more self-documenting style of code, you could use keyword arguments to the constructor: dlg = Wx::FileDialog.new(parent, :style => Wx::WHAT_EVER) hth alex From peralta at sonic.net Thu Nov 8 16:53:05 2007 From: peralta at sonic.net (peralta at sonic.net) Date: Thu, 8 Nov 2007 13:53:05 -0800 (PST) Subject: [wxruby-users] Why don't my tabs look as nice as theirs? Message-ID: <16805.64.142.64.96.1194558785.squirrel@webmail.sonic.net> Hello again, I'm running my WxRuby scripts on Windows XP. I am new at GUI coding. Here's what I don't understand: why my WxRuby notebook tabs don't look like notebook tabs in other apps running on the same machine. I've attached two little examples. The first (mine.gif) shows what I get with WxRuby. The second (theirs.gif) is from a typical app running on the same Windows XP machine. Is there a way to make my tabs look like theirs? I feel like I'm missing something very simple. Here's my test script: ------------------------------------------------------------ require "wx" include Wx class MyNotebook < Notebook def initialize( parent ) super(parent, -1) %w[ Apples Oranges Bananas ].each{ |d| win = Panel.new( self, -1 ) add_page( win, d, false ) } end end class MyApp < App def on_init frame = Frame.new(nil, -1, "Test") MyNotebook.new( frame ) frame.show() end end MyApp.new.main_loop ------------------------------------------------------------ Thanks for your help! Peralta -------------- next part -------------- A non-text attachment was scrubbed... Name: mine.gif Type: image/gif Size: 1579 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20071108/8371e7e5/attachment.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: theirs.gif Type: image/gif Size: 2643 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20071108/8371e7e5/attachment-0001.gif From alex at pressure.to Thu Nov 8 17:30:07 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 08 Nov 2007 22:30:07 +0000 Subject: [wxruby-users] Why don't my tabs look as nice as theirs? In-Reply-To: <16805.64.142.64.96.1194558785.squirrel@webmail.sonic.net> References: <16805.64.142.64.96.1194558785.squirrel@webmail.sonic.net> Message-ID: <47338DEF.20402@pressure.to> Hi peralta at sonic.net wrote: > I'm running my WxRuby scripts on Windows XP. I am new > at GUI coding. > > Here's what I don't understand: why my WxRuby notebook > tabs don't look like notebook tabs in other apps running > on the same machine. > > I've attached two little examples. The first (mine.gif) > shows what I get with WxRuby. The second (theirs.gif) is > from a typical app running on the same Windows XP machine. > > Is there a way to make my tabs look like theirs? http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html hth alex From alex at pressure.to Thu Nov 8 18:00:34 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 08 Nov 2007 23:00:34 +0000 Subject: [wxruby-users] wxSugar 0.1.19 Message-ID: <47339512.6050009@pressure.to> Hi We've just released an updated version of wxSugar, version 0.1.19. http://rubyforge.org/frs/?group_id=35 The only change in this version is that it contains a workaround for a ?bug introduced in REXML packaged with ruby 1.8.6, that meant that the XRCise tool[1] would not work properly. alex [1] http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise From peralta at sonic.net Thu Nov 8 19:01:51 2007 From: peralta at sonic.net (peralta at sonic.net) Date: Thu, 8 Nov 2007 16:01:51 -0800 (PST) Subject: [wxruby-users] Wx::Notebook tabs, bug reports on... Message-ID: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> Thank you Alex for the answer to my previous question -- it was exactly what I was looking for! Moving on, I have some bugs to report: I'm using the Wx::Notebook class and it looks to me like Wx::NB_LEFT, Wx::NB_RIGHT, and Wx::NB_BOTTOM are defined incorrectly. To get my tabs to appear on the bottom, for example, I find I have to use Wx::NB_LEFT. Same symptom in samples/bigdemo/WxNotebook.rbw -- the constructor uses Wx::NB_BOTTOM but the tabs appear on the right. Off by 1? I'm also having trouble with images in tabs -- they seem to randomly disappear on resizing. Has anyone else seen this? It's not hard to repro, but it's not happening all the time, either. And, now that I am educated about Windows XP style controls and manifest files, I'm noticing that Wx::Notebook tabs seem to ignore them if they're placed anywhere but at the top. In other words, I get the version 6 style if the tabs are at the top, and the version 5 style if they're anywhere else. Kind regards, Peralta From field.tim at gmail.com Fri Nov 9 04:41:22 2007 From: field.tim at gmail.com (Tim Field) Date: Fri, 9 Nov 2007 22:41:22 +1300 Subject: [wxruby-users] wxSugar 0.1.19 In-Reply-To: <47339512.6050009@pressure.to> References: <47339512.6050009@pressure.to> Message-ID: <97a92e950711090141u56ba25c0n758c0c339c3bacf0@mail.gmail.com> Thanks Alex Can confirm it fixed the issue I had. -Tim On Nov 9, 2007 12:00 PM, Alex Fenton wrote: > Hi > > We've just released an updated version of wxSugar, version 0.1.19. > > http://rubyforge.org/frs/?group_id=35 > > The only change in this version is that it contains a workaround for a > ?bug introduced in REXML packaged with ruby 1.8.6, that meant that the > XRCise tool[1] would not work properly. > > alex > > [1] http://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCise > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071109/aefe7fd5/attachment.html From alex at pressure.to Fri Nov 9 06:46:04 2007 From: alex at pressure.to (Alex Fenton) Date: Fri, 09 Nov 2007 11:46:04 +0000 Subject: [wxruby-users] Wx::Notebook tabs, bug reports on... In-Reply-To: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> References: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> Message-ID: <4734487C.3060706@pressure.to> peralta at sonic.net wrote: > I'm using the Wx::Notebook class and it looks to me > like Wx::NB_LEFT, Wx::NB_RIGHT, and Wx::NB_BOTTOM are > defined incorrectly. To get my tabs to appear on the > bottom, for example, I find I have to use Wx::NB_LEFT. > Same symptom in samples/bigdemo/WxNotebook.rbw -- the > constructor uses Wx::NB_BOTTOM but the tabs appear on > the right. Off by 1? > Thanks very much for the report. It seems the values of the constants changed in wxWidgets between version 2.6 and 2.8, so when we upgraded to target 2.8 the wxRuby values went out by one. I'll fix for the next release, but for reference, the correct values are: NB_DEFAULT = 0 NB_TOP = 1 NB_BOTTOM = 2 NB_LEFT = 4 NB_RIGHT = 8 > I'm also having trouble with images in tabs -- they > seem to randomly disappear on resizing. Has anyone > else seen this? It's not hard to repro, but it's not > happening all the time, either. > I haven't seen this. Can you reproduce in one of the samples? Note that current Windows UI guidelines discourage the use of icons in tabs: http://msdn2.microsoft.com/en-us/library/aa511493.aspx > And, now that I am educated about Windows XP style > controls and manifest files, I'm noticing that > Wx::Notebook tabs seem to ignore them if they're > placed anywhere but at the top. In other words, I > get the version 6 style if the tabs are at the top, > and the version 5 style if they're anywhere else. > I get the same result. I can't think that I've ever seen the XP-style "glow"/rounded tabs other than on the top in an application, and my guess is that those tabs are only available on the top in the Windows XP UI. Note that side/bottom tabs won't work anyway on OS X. You might have a look into Wx::AuiNotebook (see the aui.rb sample) as an alternative. wxWidgets 2.8 added some other "book" controls (TreeBook, ToolBook) but they aren't yet available in wxRuby. cheers alex cheers Alex From peralta at sonic.net Fri Nov 9 11:38:34 2007 From: peralta at sonic.net (peralta at sonic.net) Date: Fri, 9 Nov 2007 08:38:34 -0800 (PST) Subject: [wxruby-users] Wx::Notebook tabs, bug reports on... In-Reply-To: <4734487C.3060706@pressure.to> References: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> <4734487C.3060706@pressure.to> Message-ID: <16723.64.142.64.96.1194626314.squirrel@webmail.sonic.net> >> I'm also having trouble with images in tabs -- they >> seem to randomly disappear on resizing. Has anyone >> else seen this? It's not hard to repro, but it's not >> happening all the time, either. >> > I haven't seen this. Can you reproduce in one of the samples? None of the samples use images in tabs, as far as I can see, but I have a small test program that exhibits the problem. I honestly can't figure out what sequence of resize operations triggers the bug, but all I have to do is resize the window repeatedly, including maximizing and restoring it, and eventually the tab images go away. My environment, FWIW: ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] wxruby-1.9.0-i386-mswin32 Windows XP Professional 5.1.2600 Here's my test program: -------------------------------------------------------------- require "wx" include Wx class MyNotebook < Notebook def initialize( parent ) super(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE ) il = Wx::ImageList.new(26,18) my_img = il.add( Wx::Bitmap.new( Image.new( "test.png", BITMAP_TYPE_PNG)) ) set_image_list( il ) %w[ Apples Oranges Bananas ].each{ |d| win = Panel.new( self, -1 ) add_page( win, d, false, my_img ) } end end class MyApp < App def on_init frame = Frame.new(nil, -1, "Title") MyNotebook.new( frame ) frame.show() end end MyApp.new.main_loop From mario at ruby-im.net Fri Nov 9 12:18:34 2007 From: mario at ruby-im.net (Mario Steele) Date: Fri, 09 Nov 2007 11:18:34 -0600 Subject: [wxruby-users] Wx::Notebook tabs, bug reports on... In-Reply-To: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> References: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> Message-ID: <4734966A.30109@ruby-im.net> peralta at sonic.net wrote: > And, now that I am educated about Windows XP style > controls and manifest files, I'm noticing that > Wx::Notebook tabs seem to ignore them if they're > placed anywhere but at the top. In other words, I > get the version 6 style if the tabs are at the top, > and the version 5 style if they're anywhere else. > Hello there Peralta, The thing about the Notebook Tabs on Left, Right and bottom with the version 6 style, Windows naturally does not have this functionality by default. If you go to Windows API, and look at the TabControl, you will find nothing on how to draw the Notebook Tabs on Left, Right or Bottom. What wxWidgets does is draws the default Tab style, for when it's done on the left, right or bottom of the Notebook control. Other GUI Toolkits do the same thing. So unfortunatly, there no way to get natural Windows XP Styles, with the Tabs being in a different area. L8ers, Mario Steele From jari.williamsson at mailbox.swipnet.se Sat Nov 10 06:37:03 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Sat, 10 Nov 2007 12:37:03 +0100 Subject: [wxruby-users] Anti-aliasing? Message-ID: <473597DF.3060501@mailbox.swipnet.se> I'm doing a graphics application and need onscreen anti-aliasing for both lines and text. Seems like wxGraphicsContext would do that, is that planned to be ported to wxRuby? Best regards, Jari Williamsson From bureaux.sebastien at neuf.fr Sat Nov 10 08:23:30 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Sat, 10 Nov 2007 14:23:30 +0100 Subject: [wxruby-users] =?iso-8859-1?q?probl=E8me_de_t=E9l=E9chargement?= Message-ID: <000501c8239c$e2d6afd0$0201a8c0@sebastien> salut Alex, je ne peut pas t?l?charger wxruby-1.9.2 avec rubygems. J'avait wxruby-1.9.0, mais j'ai fait une restauration compl?te de mon pc hier. J'ai la version 0.9.4 de ruby gems. J'ai un message d'erreur quand je veut installer wxruby-1.9.2. merci -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071110/8514880e/attachment.html From lists at ruby-forum.com Sat Nov 10 16:39:50 2007 From: lists at ruby-forum.com (Sebastian Comella) Date: Sat, 10 Nov 2007 22:39:50 +0100 Subject: [wxruby-users] Can't run samples - Mac OS 10.3 w/ RubyGems In-Reply-To: <4730575F.8050108@pressure.to> References: <472D3E76.403@pressure.to> <3ca43334248d6e3d54691d6c8809e2e6@ruby-forum.com> <4730575F.8050108@pressure.to> Message-ID: Alex Fenton wrote: > Sebastian Comella wrote: >> I did try to build WxWidgets and during configuration it complained >> about not finding a recent enough version of GTK. If you know a quick >> fix for that issue (command line switch for configure?) that would be >> great, > It shouldn't be looking for gtk on OS X, that's for Linux. Is there > --with-gtk in your configure flags? Check you're using the right > ./configure switches from > http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets > > cheers > alex Hm, I re-downloaded the source today, and this time the configure (taken both times from the helpful link you mentioned) worked! So I'm happily compiling at the moment...Thanks for your help. Sebastian. -- Posted via http://www.ruby-forum.com/. From mario at ruby-im.net Sat Nov 10 17:50:48 2007 From: mario at ruby-im.net (Mario Steele) Date: Sat, 10 Nov 2007 16:50:48 -0600 Subject: [wxruby-users] =?iso-8859-1?q?probl=E8me_de_t=E9l=E9chargement?= In-Reply-To: <000501c8239c$e2d6afd0$0201a8c0@sebastien> References: <000501c8239c$e2d6afd0$0201a8c0@sebastien> Message-ID: <473635C8.4080609@ruby-im.net> Salut Sebastien, Il semble que RubyGems est d'avoir avec les erreurs d'indexation et le t?l?chargement de wxRuby. Elle sera mieux pour vous de t?l?charger wxRuby - 1.9.2 de Rubyforge page, et l'installer si gemme. Ceci devrait vous permettre d'installer wxRuby 1.9.2. Laters, Mario Steele sebastien wrote: > salut Alex, je ne peut pas t?l?charger wxruby-1.9.2 avec rubygems. > J'avait wxruby-1.9.0, mais j'ai fait une restauration compl?te de mon > pc hier. > J'ai la version 0.9.4 de ruby gems. > J'ai un message d'erreur quand je veut installer > wxruby-1.9.2. > merci > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071110/260234fa/attachment.html From bureaux.sebastien at neuf.fr Sat Nov 10 18:33:38 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Sun, 11 Nov 2007 00:33:38 +0100 Subject: [wxruby-users] =?iso-8859-1?q?_probl=E8me_de_t=E9l=E9chargement?= Message-ID: <000501c823f2$20cc3210$0201a8c0@sebastien> Salut Mario. J'ai essayer d'installer wxruby-1.9.2 manuellement, mais ?a ne fonctionne pas. Qu'est ce qu'il faut que je fasse une fois la gemme t?l?charger manuellement et install? dans le dossier "cache" merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/665e4718/attachment-0001.html From mario at ruby-im.net Sun Nov 11 02:48:38 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 11 Nov 2007 01:48:38 -0600 Subject: [wxruby-users] =?iso-8859-1?q?probl=E8me_de_t=E9l=E9chargement?= In-Reply-To: <000501c823f2$20cc3210$0201a8c0@sebastien> References: <000501c823f2$20cc3210$0201a8c0@sebastien> Message-ID: <4736B3D6.2030200@ruby-im.net> Bonjour Sebastien, Tout d'abord, permettez-moi, veuillez m'excuser pour mon fran?ais, comme ?a a ?t? bien plus de 8 ans que je ad'abord ?t? enseign?e. J'ai donc d? utiliser Google pour traduire certains de cela. Premi?rement, je voudrais savoir un peu de votre configuration de votre syst?me. Est-il Windows, Linux, Macintosh? De m?me, lorsque vous t?l?chargez le Gem, est-ce que vous allez votre shell (invite de commande sous Windows, Terminal sous Linux et Macintosh), dans le r?pertoire que vous t?l?chargez de la gemme, et de faire "gem install wxruby-1.9.2-*.gem'? Le * est remplac? par votre syst?me d'exploitation cible, mswin32, darwin8.8.2, etc etc Si vous n'avez pas, essayez ?a, et voir si elle vous permettra de l'installer, et ?crire m'a retour. Sinc?rement, Mario Steele sebastien wrote: > Salut Mario. J'ai essayer d'installer wxruby-1.9.2 manuellement, mais > ?a ne fonctionne pas. > Qu'est ce qu'il faut que je fasse une fois la gemme t?l?charger > manuellement et install? dans le dossier "cache" > merci > sebastien > http://beusse.liveror.com > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/eda922b4/attachment.html From bureaux.sebastien at neuf.fr Sun Nov 11 05:07:12 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Sun, 11 Nov 2007 11:07:12 +0100 Subject: [wxruby-users] =?iso-8859-1?q?_probl=E8me_de_t=E9l=E9chargement?= Message-ID: <000501c8244a$a16156f0$0201a8c0@sebastien> Bonjour, j'ai essayer avec "gem install wxruby-1.9.2-mswin32.gem" mais ?a ne marche pas non plus. Il y a qu'avec wxruby que j'ai des probl?mes d'installation. J'ai install? d'autres gems sans probl?mes avec rubygems. Mon syst?me d'exploitation est windows. Voici le message d'erreur quand je veut install? wxruby-1.9.2: ERROR: while executing gem ... 404 Not Found MERCI sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/38f1e45a/attachment.html From mario at ruby-im.net Sun Nov 11 05:45:05 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 11 Nov 2007 04:45:05 -0600 Subject: [wxruby-users] =?iso-8859-1?q?probl=E8me_de_t=E9l=E9chargement?= In-Reply-To: <000501c8244a$a16156f0$0201a8c0@sebastien> References: <000501c8244a$a16156f0$0201a8c0@sebastien> Message-ID: <4736DD31.6050207@ruby-im.net> Bonjour, Bon, essayons ici Sebastien. Suivez ces instructions ici, pour voir si nous pouvons l'obtenir pour fonctionner correctement. Premi?rement, cr?er un r?pertoire temporaire de votre disque C:. Exemple: C:\Temp Deuxi?mement, un nouveau t?l?chargement wxruby-1.9.2-mswin32.gem, et enregistrez-le dans C:\Temp Troisi?mement, Ouvrez une fen?tre d'invite de commande, en allant dans D?marrer> Ex?cuter et tapez command.com ou cmd.com, soit devraient fonctionner. Quatri?mement, le type en cd \Temp Cinqui?me et dernier, tapez 'gem install --local wxruby-1.9.2-mswin32.gem' De quoi cela ressemble, Ruby Gems essaie toujours d'aller sur le Web pour installer les pierres pr?cieuses, la cause ne peut trouver localement. Suite ? ces instructions devrait permettre wxRuby 1.9.2 doivent ?tre install?s, ? partir de la copie que vous avez t?l?charg? sur votre r?pertoire temporaire. Une fois que vous avez termin? les ?tapes ci-dessus, et il installe avec succ?s, vous pouvez supprimer le r?pertoire C:\Temp de votre disque, car il a servi son but. Permettez-moi de savoir comment il va, Mario Steele sebastien wrote: > Bonjour, j'ai essayer avec "gem install wxruby-1.9.2-mswin32.gem" mais > ?a ne marche pas non plus. > Il y a qu'avec wxruby que j'ai des probl?mes d'installation. > J'ai install? d'autres gems sans probl?mes avec rubygems. > Mon syst?me d'exploitation est windows. > Voici le message d'erreur quand je veut install? wxruby-1.9.2: > ERROR: while executing gem ... > 404 Not Found > MERCI > sebastien > http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/6d8bcc07/attachment.html From mario at ruby-im.net Sun Nov 11 05:58:49 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 11 Nov 2007 04:58:49 -0600 Subject: [wxruby-users] Recent French communications Message-ID: <4736E069.6040406@ruby-im.net> Hello All, (Salut) Sebastien is a French user among us, and doesn't speak English, so I've been talking with him in French the best way I know how (Google is god.) So, I will also translate the conversation going on, so that everyone will be able to understand, and keep up with what has been going on: (Sebastien est un utilisateur fran?ais parmi nous, et ne parle pas l'anglais, alors j'en ai discut? avec lui, en fran?ais le meilleur moyen je sais combien (Google est dieu.) Donc, je vais aussi traduire la conversation en cours, de sorte que Tout le monde sera en mesure de comprendre, et rester en contact avec ce qui s'est pass?:) Original Email: probl?me de t?l?chargement (Download problem) [French:] salut Alex, je ne peut pas t?l?charger wxruby-1.9.2 avec rubygems. J'avait wxruby-1.9.0, mais j'ai fait une restauration compl?te de mon pc hier. J'ai la version 0.9.4 de ruby gems. J'ai un message d'erreur quand je veut installer wxruby-1.9.2. merci [English:] Hello Alex, I can not download wxruby-1.9.2 with rubygems. I had wxruby-1.9.0, but I did a complete restoration of my pc yesterday. I have version 0.9.4 of ruby gems. I receive an error message when I want to install wxruby-1.9.2. Please Reply (Me): [French:] Salut Sebastien, Il semble que RubyGems est d'avoir avec les erreurs d'indexation et le t?l?chargement de wxRuby. Elle sera mieux pour vous de t?l?charger wxRuby - 1.9.2 de Rubyforge page, et l'installer si gemme. Ceci devrait vous permettre d'installer wxRuby 1.9.2. Laters, Mario Steele [English:] Hello Sebastien, It seems that RubyGems is to have mistakes with the indexing and downloading wxRuby. It will be better for you to download wxRuby - 1.9.2 of Rubyforge page, and install it if gem. This should allow you to install wxRuby 1.9.2. Reply (Sebastien): [French:] Salut Mario. J'ai essayer d'installer wxruby-1.9.2 manuellement, mais ?a ne fonctionne pas. Qu'est ce qu'il faut que je fasse une fois la gemme t?l?charger manuellement et install? dans le dossier "cache" merci sebastien [English:] Hello Mario. I try installing wxruby-1.9.2 manually, but it does not work. What should I do once the gem manually download and installed in the "cache" Please Sebastien Reply (me): [French:] Bonjour Sebastien, Tout d'abord, permettez-moi, veuillez m'excuser pour mon fran?ais, comme ?a a ?t? bien plus de 8 ans que je ad'abord ?t? enseign?e. J'ai donc d? utiliser Google pour traduire certains de cela. Premi?rement, je voudrais savoir un peu de votre configuration de votre syst?me. Est-il Windows, Linux, Macintosh? De m?me, lorsque vous t?l?chargez le Gem, est-ce que vous allez votre shell (invite de commande sous Windows, Terminal sous Linux et Macintosh), dans le r?pertoire que vous t?l?chargez de la gemme, et de faire "gem install wxruby-1.9.2-*.gem'? Le * est remplac? par votre syst?me d'exploitation cible, mswin32, darwin8.8.2, etc etc Si vous n'avez pas, essayez ?a, et voir si elle vous permettra de l'installer, et ?crire m'a retour. Sinc?rement, Mario Steele [English:] Hello Sebastien, First, let me, I apologize for my french, as it has been well over 8 years since I was first taught. So I had to use Google to translate some of that. First, I would like to know a little of your system configuration. Is it Windows, Linux, Macintosh? Also, when you download the Gem, will you your shell (command prompt under Windows, Linux Terminal and Macintosh), in the directory that you download from the gem, and to "gem install wxruby-1.9 .2 -*. gem '? * is replaced by your operating system target mswin32, darwin8.8.2, etc. etc. If you have not, try it and see if it will allow you to install it, and write me back. Sincerely, Mario Steele Reply (Sebastien): [French:] Bonjour, j'ai essayer avec "gem install wxruby-1.9.2-mswin32.gem" mais ?a ne marche pas non plus. Il y a qu'avec wxruby que j'ai des probl?mes d'installation. J'ai install? d'autres gems sans probl?mes avec rubygems. Mon syst?me d'exploitation est windows. Voici le message d'erreur quand je veut install? wxruby-1.9.2: ERROR: while executing gem ... 404 Not Found MERCI sebastien [English:] Hello, I try with "gem install wxruby-1.9.2-mswin32.gem" but it does not work either. There are only wxruby my installation problems. I installed other gems without problems with rubygems. My operating system is windows. Here is the error message when I want installed wxruby-1.9.2: ERROR: while executing gem ... 404 Not Found THANKS Sebastien Reply (me): [French:] Bonjour, Bon, essayons ici Sebastien. Suivez ces instructions ici, pour voir si nous pouvons l'obtenir pour fonctionner correctement. Premi?rement, cr?er un r?pertoire temporaire de votre disque C:. Exemple: C:\Temp Deuxi?mement, un nouveau t?l?chargement wxruby-1.9.2-mswin32.gem, et enregistrez-le dans C:\Temp Troisi?mement, Ouvrez une fen?tre d'invite de commande, en allant dans D?marrer> Ex?cuter et tapez command.com ou cmd.com, soit devraient fonctionner. Quatri?mement, le type en cd \Temp Cinqui?me et dernier, tapez 'gem install --local wxruby-1.9.2-mswin32.gem' De quoi cela ressemble, Ruby Gems essaie toujours d'aller sur le Web pour installer les pierres pr?cieuses, la cause ne peut trouver localement. Suite ? ces instructions devrait permettre wxRuby 1.9.2 doivent ?tre install?s, ? partir de la copie que vous avez t?l?charg? sur votre r?pertoire temporaire. Une fois que vous avez termin? les ?tapes ci-dessus, et il installe avec succ?s, vous pouvez supprimer le r?pertoire C:\Temp de votre disque, car il a servi son but. Permettez-moi de savoir comment il va, Mario Steele [English:] Hello, Well, here are trying Sebastien. Follow these instructions here to see if we can get it to work properly. First, create a temporary directory on your C: drive. Example: C:\Temp Secondly, a new download wxruby-1.9.2-mswin32.gem, and save it to C:\Temp Third, open a command prompt window, go to Start> Run and type command.com or cmd.com, or should work. Fourth, the type cd \Temp Fifth and last, type 'gem install --local wxruby-1.9.2-mswin32.gem' What it resembles, Ruby Gems always tries to go on the Web to install precious stones, the cause can not find locally. Following these instructions should allow wxRuby 1.9.2 must be installed, from the copy you downloaded to your temporary directory. Once you have completed the above steps, and it installs successfully, you can delete the C: \ Temp your hard because it has served its purpose. Let me know how it goes, Mario Steele Future communication that I respond to Sebastien will include both English and French translations, so that everyone can keep track of what is going on. (Avenir de communication que je r?pondre ? Sebastien comprendra ? la fois des traductions en anglais et en fran?ais, afin que chacun puisse conserver une trace de ce qui se passe.) L8ers, Mario Steele -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/bc7dade3/attachment-0001.html From bureaux.sebastien at neuf.fr Sun Nov 11 07:44:26 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Sun, 11 Nov 2007 13:44:26 +0100 Subject: [wxruby-users] =?iso-8859-1?q?_probl=E8me_de_t=E9l=E9chargement?= Message-ID: <000501c82460$9852e950$0201a8c0@sebastien> je ne comprend pas le quatri?mement: le type en cd \Temp C'est ? dire? sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/1e8490f6/attachment.html From bureaux.sebastien at neuf.fr Sun Nov 11 08:11:01 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Sun, 11 Nov 2007 14:11:01 +0100 Subject: [wxruby-users] =?iso-8859-1?q?_probl=E8me_de_t=E9l=E9chargement?= Message-ID: <000501c82464$4f36a550$0201a8c0@sebastien> J'ai reussi. Par contre vous avez omis "i386" => wxruby-1.9.2-i386-mswin32.gem Ne tenez pas compte de mon message pr?c?dent. Pourquoi est-ce qu'il faut faire tout ?a pour pouvoir installer la gemme? merci Mario. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/fc203340/attachment.html From peralta at sonic.net Sun Nov 11 08:43:33 2007 From: peralta at sonic.net (peralta at sonic.net) Date: Sun, 11 Nov 2007 05:43:33 -0800 (PST) Subject: [wxruby-users] Wx::Notebook tabs, bug reports on... In-Reply-To: <4734966A.30109@ruby-im.net> References: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> <4734966A.30109@ruby-im.net> Message-ID: <12198.64.142.64.96.1194788613.squirrel@webmail.sonic.net> Alex wrote: > Note that current Windows UI guidelines discourage the use of icons in tabs: > http://msdn2.microsoft.com/en-us/library/aa511493.aspx This UI guidelines page has been very interesting reading! It recommends using "clearly recognizable icons [in tabs] if there might be insufficient space to display meaningful labels", which is just the use I have in mind. > I can't think that I've ever seen the XP-style > "glow"/rounded tabs other than on the top in an application... On the above-mentioned page there is an example of "correct" use of images in tabs, and the tabs are on the bottom. > You might have a look into Wx::AuiNotebook (see the aui.rb sample) as an > alternative. wxWidgets 2.8 added some other "book" controls (TreeBook, > ToolBook) but they aren't yet available in wxRuby. Thanks, I'll take a look. And Mario wrote: > If you go to Windows API, and look at the TabControl If you get a chance, could you please provide a link to this? I googled around but couldn't find it. (I am admittedly completely unfamiliar with Windows API documentation. Not that I plan to do any Windows API coding, but it might be educational reading.) Thanks all, Peralta From mario at ruby-im.net Sun Nov 11 21:13:39 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 11 Nov 2007 20:13:39 -0600 Subject: [wxruby-users] =?iso-8859-1?q?probl=E8me_de_t=E9l=E9chargement?= In-Reply-To: <000501c82464$4f36a550$0201a8c0@sebastien> References: <000501c82464$4f36a550$0201a8c0@sebastien> Message-ID: <4737B6D3.2040900@ruby-im.net> Ma faute l?, j'ai oubli? que i386 est maintenant partie de la convention de nommage gemme. Nous avons couru dans quelques probl?mes r?cemment avec RubyGems pas de maintien de corriger l'information dans le r?f?rentiel, donc beaucoup de gens qui n'ont pas la possibilit? de t?l?charger quoi que ce soit, mais source de la version Linux de wxRuby et x86-64 versions compil?es de wxRuby. Nous avons d?j? pr?sent? ce bug pour les responsables de RubyGems, et, esp?rons-le, une solution sera bient?t termin?. Je suis heureux que vous l'avez install? maintenant, et n'h?sitez pas ? poser d'autres questions que vous pourriez avoir. Cordialement, Mario Steele English: My fault there, I forgot that i386 was now part of the gem naming convention. We have ran into several problems recently with RubyGems not keeping correct information in the repository, therefore a lot of people have not be able to download anything but Linux source version of wxRuby and the x86-64 compiled versions of wxRuby. We have already submitted this bug to the maintainers of RubyGems, and hopefully a solution will be completed soon. I am glad that you have it installed now, and feel free to ask any other questions you may have. Sincerely, Mario Steele sebastien wrote: > J'ai reussi. Par contre vous avez omis "i386" > => wxruby-1.9.2-i386-mswin32.gem > Ne tenez pas compte de mon message pr?c?dent. > Pourquoi est-ce qu'il faut faire tout ?a pour pouvoir installer la gemme? > merci Mario. English: > I managed. On the other hand you have failed "i386" > => Wxruby-1.9.2-i386-mswin32.gem > Ignore my previous message. > Why is it that we must do everything in order to install the gem? > Thank you Mario. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071111/ed8627ed/attachment.html From peralta at sonic.net Sun Nov 11 21:22:28 2007 From: peralta at sonic.net (peralta at sonic.net) Date: Sun, 11 Nov 2007 18:22:28 -0800 (PST) Subject: [wxruby-users] XRCise says "Cannot create wrapper for subclass of wxWizard" Message-ID: <15339.64.142.64.96.1194834148.squirrel@webmail.sonic.net> I have created a very simple DialogBlocks project that consists of a very simple wxWizard. I have exported the project to XRC and am trying to get XRCise to process it. XRCise produces the message "Cannot create wrapper for subclass of wxWizard". Is this a symptom of the XPath parsing in Ruby 1.8.6 bug? Or am I doing something wrong? My env: ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] wxruby-1.9.2-i386-mswin32 wx_sugar 0.1.19 Windows XP Professional 5.1.2600 My XRC file: --------------------------------------------------------------------------- wxWIZARD_EX_HELPBUTTON Me Wizard wizard.png #FFFFFF oooh.png wxVERTICAL wxGROW|wxALL 5 ----------------------------------------------------------------------- Thank you kindly for any advice you can offer, Peralta From alex at pressure.to Mon Nov 12 07:20:19 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 12 Nov 2007 12:20:19 +0000 Subject: [wxruby-users] =?iso-8859-1?q?probl=E8me_de_t=E9l=E9chargement?= In-Reply-To: <4737B6D3.2040900@ruby-im.net> References: <000501c82464$4f36a550$0201a8c0@sebastien> <4737B6D3.2040900@ruby-im.net> Message-ID: <47384503.8030301@pressure.to> Mario Steele wrote: > We have already submitted this bug to the maintainers of RubyGems, and > hopefully a solution will be completed soon. The Rubyforge team has now fixed the bug in the gem indexer, and Tom's deployed it to Rubyforge. So all the wxruby gems should once again be available via "gem install wxruby". Thanks to Tom and the Rubygems developers. Sebastien - le probl?me a ?t? r?sous, et vous pouvez employer "gem install wxruby" pour l'installer. alex From alex at pressure.to Mon Nov 12 07:22:57 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 12 Nov 2007 12:22:57 +0000 Subject: [wxruby-users] Anti-aliasing? In-Reply-To: <473597DF.3060501@mailbox.swipnet.se> References: <473597DF.3060501@mailbox.swipnet.se> Message-ID: <473845A1.7070903@pressure.to> Jari Jari Williamsson wrote: > I'm doing a graphics application and need onscreen anti-aliasing for > both lines and text. Seems like wxGraphicsContext would do that, is that planned to be ported to wxRuby? Yes, I was planning to have a look at adding it before the next release. It's a new set of classes in 2.8 so I can't promise it will be successful. alex From alex at pressure.to Mon Nov 12 14:40:54 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 12 Nov 2007 19:40:54 +0000 Subject: [wxruby-users] XRCise says "Cannot create wrapper for subclass of wxWizard" In-Reply-To: <15339.64.142.64.96.1194834148.squirrel@webmail.sonic.net> References: <15339.64.142.64.96.1194834148.squirrel@webmail.sonic.net> Message-ID: <4738AC46.30505@pressure.to> peralta at sonic.net wrote: > I have created a very simple DialogBlocks project that > consists of a very simple wxWizard. I have exported the > project to XRC and am trying to get XRCise to process it. > XRCise produces the message "Cannot create wrapper for > subclass of wxWizard". > Thanks for the report. It's because I don't know how to load a Wizard from XRC - currently only Dialog, Panel and Frame are supported. There are lots of methods in the XmlResource API like load_frame, load_panel etc, but not one it seems for wizards. Using load_dialog doesn't work although Wizard is technically a subclass of Wx::Dialog. I will have a further look into this, but if anyone knows how to load a Wizard in C++ wxWidgets, that would help... cheers alex From alex at pressure.to Mon Nov 12 17:47:34 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 12 Nov 2007 22:47:34 +0000 Subject: [wxruby-users] Anti-aliasing? In-Reply-To: <473845A1.7070903@pressure.to> References: <473597DF.3060501@mailbox.swipnet.se> <473845A1.7070903@pressure.to> Message-ID: <4738D806.4070603@pressure.to> Alex Fenton wrote: > Jari Williamsson wrote: > >> I'm doing a graphics application and need onscreen anti-aliasing for >> both lines and text. Seems like wxGraphicsContext would do that, is that planned to be ported to wxRuby? >> > Yes, I was planning to have a look at adding it before the next release. > It's a new set of classes in 2.8 so I can't promise it will be successful. > Just a quick update - I tried a preliminary wrapping of GraphicsContext and have a working sample drawing antialiased lines and text on Linux. Barring problems on other platforms we should be able to include this in the next wxRuby version. alex From jari.williamsson at mailbox.swipnet.se Tue Nov 13 02:58:57 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Tue, 13 Nov 2007 08:58:57 +0100 Subject: [wxruby-users] Anti-aliasing? In-Reply-To: <4738D806.4070603@pressure.to> References: <473597DF.3060501@mailbox.swipnet.se> <473845A1.7070903@pressure.to> <4738D806.4070603@pressure.to> Message-ID: <47395941.3090903@mailbox.swipnet.se> Alex Fenton wrote: > Just a quick update - I tried a preliminary wrapping of GraphicsContext > and have a working sample drawing antialiased lines and text on Linux. > Barring problems on other platforms we should be able to include this in > the next wxRuby version. Sounds fantastic! Thanks to all you people who do the porting stuff, you're doing great work! Best regards, Jari Williamsson From jari.williamsson at mailbox.swipnet.se Tue Nov 13 07:41:44 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Tue, 13 Nov 2007 13:41:44 +0100 Subject: [wxruby-users] SashWindowLayout design Message-ID: <47399B88.5040602@mailbox.swipnet.se> Hello! I want a SashWindowLayout with 3 small panels (below each other) on the left side and the big remaining area to the right. All walls movable. The approach that I've used to get kind of the effect I wanted was to first add the right-side area (right-aligned), then add 2 other top-aligned panels. Which leaves the remaining area to the panel at the bottom left. I got a problem with this approach, though. When resizing the main window, the wall between the left and right part moves as well (=increasing/decreasing the width of all left-side panels). How do I get it to not resize? Best regards, Jari Williamsson From alex at pressure.to Tue Nov 13 14:13:32 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 13 Nov 2007 19:13:32 +0000 Subject: [wxruby-users] SashWindowLayout design In-Reply-To: <47399B88.5040602@mailbox.swipnet.se> References: <47399B88.5040602@mailbox.swipnet.se> Message-ID: <4739F75C.6040507@pressure.to> Jari Williamsson wrote: > I want a SashWindowLayout with 3 small panels (below each other) on the > left side and the big remaining area to the right. All walls movable. > > The approach that I've used to get kind of the effect I wanted was to > first add the right-side area (right-aligned), then add 2 other > top-aligned panels. Which leaves the remaining area to the panel at the > bottom left. > > I got a problem with this approach, though. When resizing the main > window, the wall between the left and right part moves as well > (=increasing/decreasing the width of all left-side panels). How do I get > it to not resize? > I think the easiest solution is to make the right-hand area the 'remaining' area, and have the others as panels. Have a look at sample/bigdemo/wxSashWindow.rb which seems to do this kind of thing. The wxWidgets documents describe a sophisticated mechanism using CalculateLayoutEvent. I haven't used this class so didn't really get what was going on. But I'll try and add the LayoutEvent classes so they're at least available in wxRuby. alex From jari.williamsson at mailbox.swipnet.se Tue Nov 13 15:00:29 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Tue, 13 Nov 2007 21:00:29 +0100 Subject: [wxruby-users] New wxTree method Message-ID: <473A025D.5080603@mailbox.swipnet.se> Here's my first try at a contribution to the wxRuby project: The tree control seemed to lack a more Ruby-ish way to add a bulk of items to a tree control (and to easily connect a data structure to a tree). Since tree view can be seen as an array of arrays, I simply added a method called append_array (see attached file). With it, you can add a full tree as simple as: --- root = treectrl.add_root("Root") treectrl.append_array(root, ["one", "two", ["sub1", "sub2"], "three"]) --- It also gives your objects the possibility to interact a bit more with the tree item, if needed. See the docs for the method. My plans are also to add at least an update_array_item() method, to be able to refresh an object's visual tree state dynamically. However, the wxRuby docs for TreeCtrl#set_item_image isn't in Ruby syntax, so I don't know how to figure out the last parameter (which I need). Would this be an useful addition to the existing wxRuby tree control? Comments are welcome! Best regards, Jari Williamsson -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxtree_array.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20071113/a4014233/attachment.pl From jari.williamsson at mailbox.swipnet.se Tue Nov 13 15:10:05 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Tue, 13 Nov 2007 21:10:05 +0100 Subject: [wxruby-users] SashWindowLayout design In-Reply-To: <4739F75C.6040507@pressure.to> References: <47399B88.5040602@mailbox.swipnet.se> <4739F75C.6040507@pressure.to> Message-ID: <473A049D.3040001@mailbox.swipnet.se> Alex Fenton wrote: > Jari Williamsson wrote: >> I want a SashWindowLayout with 3 small panels (below each other) on the >> left side and the big remaining area to the right. All walls movable. >> >> The approach that I've used to get kind of the effect I wanted was to >> first add the right-side area (right-aligned), then add 2 other >> top-aligned panels. Which leaves the remaining area to the panel at the >> bottom left. >> >> I got a problem with this approach, though. When resizing the main >> window, the wall between the left and right part moves as well >> (=increasing/decreasing the width of all left-side panels). How do I get >> it to not resize? >> > I think the easiest solution is to make the right-hand area the > 'remaining' area, and have the others as panels. Have a look at > sample/bigdemo/wxSashWindow.rb which seems to do this kind of thing. Actually, I used the bigdemo sample as my starting point, but I failed to convert it to what i needed. Bigdemo adds the stacked panels horizontally from the left, which then gives the remaining area to the right. If I add instead panels from the top, the remaining area is at the bottom, and if I don't have anything at all on the right side, the added panels will cover the whole horizontal space. I'll probably try to see if it works to put a SashWindowLayout within an existing SashWindowLayout. Best regards, Jari Williamsson From alex at pressure.to Tue Nov 13 15:52:15 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 13 Nov 2007 20:52:15 +0000 Subject: [wxruby-users] SashWindowLayout design In-Reply-To: <473A049D.3040001@mailbox.swipnet.se> References: <47399B88.5040602@mailbox.swipnet.se> <4739F75C.6040507@pressure.to> <473A049D.3040001@mailbox.swipnet.se> Message-ID: <473A0E7F.8040005@pressure.to> Jari Williamsson wrote: > Actually, I used the bigdemo sample as my starting point, but I failed > to convert it to what i needed. Bigdemo adds the stacked panels > horizontally from the left, which then gives the remaining area to the > right. If I add instead panels from the top, the remaining area is at > the bottom, and if I don't have anything at all on the right side, the > added panels will cover the whole horizontal space. > OK, I haven't used SashLayoutWindow to know how to make it do that specifically. > I'll probably try to see if it works to put a SashWindowLayout within an > existing SashWindowLayout. > Sounds good. You might find that SplitterWindow is an easier alternative for the main partition of the window into left and right. Use SplitterWindow#set_sash_gravity to apply all the increase in size to the "main" right window when the parent frame is resized. alex From alex at pressure.to Wed Nov 14 17:30:40 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 14 Nov 2007 22:30:40 +0000 Subject: [wxruby-users] New wxTree method In-Reply-To: <473A025D.5080603@mailbox.swipnet.se> References: <473A025D.5080603@mailbox.swipnet.se> Message-ID: <473B7710.8080209@pressure.to> Hi Jari Jari Williamsson wrote: > Here's my first try at a contribution to the wxRuby project: > The tree control seemed to lack a more Ruby-ish way to add a bulk of > items to a tree control (and to easily connect a data structure to a > tree). Since tree view can be seen as an array of arrays, I simply > added a method called append_array (see attached file). With it, you > can add a full tree as simple as: > > --- > root = treectrl.add_root("Root") > treectrl.append_array(root, ["one", "two", ["sub1", "sub2"], "three"]) > --- Thanks, I like this. If it's OK with you, I'm going to add it to wxSugar, where there are some other convenient methods. Things to consider in developing this approach might be: * How can we create a more general "nice" API for bulk adding items to all multi-item classes, like ListBox, ListCtrl etc * It would be useful to have a way of adding item data, which I usually need to use with these type of classes > My plans are also to add at least an update_array_item() method, to be > able to refresh an object's visual tree state dynamically. However, > the wxRuby docs for TreeCtrl#set_item_image isn't in Ruby syntax, so I > don't know how to figure out the last parameter (which I need). The values are Wx::TREE_ITEM_ICON_EXPANDED, Wx::TREE_ITEM_ICON_NORMAL etc - see samples/treectrl/ for an example of their usage. The docs needed a little tidy-up, thanks for the report. On a tangent, it would also be nice to have a way to remember and reestore a TreeCtrl's state in terms of the expanded and collapsed items. I've written something that does this for an app, but I wonder if it would be more generally useful. alex PS - I've just committed the whole set of Graphics* classes (except Renderer, which didn't appear useful in Ruby) to SVN trunk. The transforms (shears etc), gradient fills and so on work really impressively, and all anti-aliased From sean.m.long at gmail.com Wed Nov 14 18:46:37 2007 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 14 Nov 2007 15:46:37 -0800 Subject: [wxruby-users] New wxTree method In-Reply-To: <473B7710.8080209@pressure.to> References: <473A025D.5080603@mailbox.swipnet.se> <473B7710.8080209@pressure.to> Message-ID: >On a tangent, it would also be nice to have a way to remember and >reestore a TreeCtrl's state in terms of the expanded and collapsed >items. I've written something that does this for an app, but I wonder if >it would be more generally useful. I would really like to see that functionality added, I have thought about adding something similar but it is very low on my priority list. Sean From jari.williamsson at mailbox.swipnet.se Thu Nov 15 06:03:51 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Thu, 15 Nov 2007 12:03:51 +0100 Subject: [wxruby-users] New wxTree method In-Reply-To: <473B7710.8080209@pressure.to> References: <473A025D.5080603@mailbox.swipnet.se> <473B7710.8080209@pressure.to> Message-ID: <473C2797.3060209@mailbox.swipnet.se> Alex Fenton wrote: > Thanks, I like this. If it's OK with you, I'm going to add it to > wxSugar, where there are some other convenient methods. That sounds good, but I need to first add a small thing to the tree_item_ref callback method that I missed. When the object (optionally) receives the info about the treeitem id, it has to get the TreeCtrl object as well. Otherwise the object can't reference the tree id in a good way, if the object resides in another module etc. I'll e-mail you an update later today. > * How can we create a more general "nice" API for bulk adding items to > all multi-item classes, like ListBox, ListCtrl etc I'll look into this! Perhaps the API terminology should be streamlined for these kind of Ruby bulk-add (and related) methods? Any suggestions? > * It would be useful to have a way of adding item data, which I usually > need to use with these type of classes As you've seen, present in my TreeCtrl implementation, but probably harder to do in a ListBox, since there's no item_data for the strings. However, I'm thinking of adding a ListBox#insert_obj_items(), with the syntax: ListBox#insert_obj_items(array, method, pos) This would work like ListBox#insert_items(), appart from that you can specify the method in the array objects where the data should be retrieved (and then a to_s conversion to make sure the data is in string format). Often, the data for list boxes are already available in object arrays, but not necessarily in string arrays. > PS - I've just committed the whole set of Graphics* classes (except > Renderer, which didn't appear useful in Ruby) to SVN trunk. The > transforms (shears etc), gradient fills and so on work really > impressively, and all anti-aliased Sounds great! I'll see if I can get the SVN to work. Best regards, Jari Williamsson From jari.williamsson at mailbox.swipnet.se Thu Nov 15 16:30:09 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Thu, 15 Nov 2007 22:30:09 +0100 Subject: [wxruby-users] Code for Listbox object bulk adding Message-ID: <473CBA61.8070005@mailbox.swipnet.se> Hello! Attached is a method to bulk add arrays to a list box, when the array isn't a string array. Feel free to add it to wxSugar. Example: arr = [[Wx::RED, "Red"],[Wx::GREEN, "Green"],[Wx::BLUE, "Blue"]] listbox.insert_obj_items(arr, "[1]") ...would add 3 list box items with "Red"-"Green"-"Blue" listbox.insert_obj_items(arr, "[1].length") ...would add 3 list box items with "3"-"5"-"4" listbox.insert_obj_items(arr, ".length") ...would add 3 list box items with "2"-"2"-"2" Best regards, Jari Williamsson -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: listbox_obj_insert.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20071115/b6e6cef6/attachment.pl From empower at smart.net Thu Nov 15 17:09:14 2007 From: empower at smart.net (Jamal Mazrui) Date: Thu, 15 Nov 2007 17:09:14 -0500 (EST) Subject: [wxruby-users] Misc feedback and questions In-Reply-To: <471E68D0.5020504@pressure.to> References: <471E68D0.5020504@pressure.to> Message-ID: I hadn't tried a beta in a while, but did earlier this week with the latest WxRuby and WxSugar. This may be a known issue, but in case not, gem install is not finding the Windows packages. Given the WxSugar merging, are all its syntax conveniences planned? For example, I noticed that arrange_grid requires WxSugar at this point. I particularly appreciate syntax that makes layout more convenient. I noticed that sizers do not yet accept the :parameter => value style. For some reason, the previous WxRuby is accessible with both the ruby.exe and rubyw.exe interpreters, whereas WxRuby2 only is with rubyw.exe. This makes debugging code more difficult with a screen reader. I need to run a script with ruby.exe to get error messages printed to the console, but if the script runs without errors, my screen reader (JAWS) shuts up completely. Has a change been made concerning redirection of standard or error output streams, or use of threads, when running in Windows as opposed to console mode? I'd like to help get to the bottom of this so that I can encourage other blind programmers to try GUI programming with the latest WxRuby. When instantiating a Frame or Dialog, can the code be made to assume nil for the parent if that parameter is not specified? In that way, one could just use a single :title => value parameter without nil as the first parameter preceding it. Thanks for all the work by the WxRuby 2 developers! I found valuable samples and wiki information that have helped me get up to speed with the current WxRuby capabilities. Jamal From alex at pressure.to Fri Nov 16 11:50:24 2007 From: alex at pressure.to (Alex Fenton) Date: Fri, 16 Nov 2007 16:50:24 +0000 Subject: [wxruby-users] Misc feedback and questions In-Reply-To: References: <471E68D0.5020504@pressure.to> Message-ID: <473DCA50.2070508@pressure.to> Hi Jamal Nice to hear from you. I am always impressed with the feedback I read about TextPal - it's a great example of wxRuby's support for OS accessibility features. Jamal Mazrui wrote: > This may be a known issue, but in case not, > gem install is not finding the Windows packages. > Yes, it's a known issue. Changes in Rubygems broke the platform-matching for binary gems, but we're working with the devs to fix that. > Given the WxSugar merging, are all its syntax conveniences planned? For > example, I noticed that arrange_grid requires WxSugar at this point. I > particularly appreciate syntax that makes layout more convenient. I > noticed that sizers do not yet accept the :parameter => value style. > We haven't really discussed merging the 'layout' features of wxSugar into core. I wasn't sure how used and useful they were, and I've moved over to using XRC + DialogBlocks so I'm personally using those features less. But I realise it's important to support pure editor-based programming as well, so I'm open to tidying them up and merging them. What do others think? > For some reason, the previous WxRuby is accessible with both the ruby.exe > and rubyw.exe interpreters, whereas WxRuby2 only is with rubyw.exe. This > makes debugging code more difficult with a screen reader. I need to run a > script with ruby.exe to get error messages printed to the console, but if > the script runs without errors, my screen reader (JAWS) shuts up > completely. Has a change been made concerning redirection of standard or > error output streams, or use of threads, when running in Windows as > opposed to console mode? Not that I'm aware of. I almost always run under ruby.exe on Windows and haven't had any problems on normal exit, but I will try installing the screen reader. Are you running from the standard windows command prompt? > When instantiating a Frame or Dialog, can the code be made to assume nil > for the parent if that parameter is not specified? In that way, one could > just use a single :title => value parameter without nil as the first > parameter preceding it. > This is a bit tricky, because we need to distinguish between a nil parent and a call to the no-argument constructors for Frame or Dialog, which are used in conjunction with XRC. I will see if there's a backwards-compatible way of assuming a nil parent if there is any keyword argument passed. > Thanks for all the work by the WxRuby 2 developers! I found valuable > samples and wiki information that have helped me get up to speed with the > current WxRuby capabilities. Thanks for your kind words. I see that there have been recent releases of TextPal - is it still based on wxRuby? Please do feel free to post news of major releases here, as I'm sure people are interested to see examples of fully-featured end-user wxRuby applications. cheers alex From lists at ruby-forum.com Sun Nov 18 14:39:27 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Sun, 18 Nov 2007 20:39:27 +0100 Subject: [wxruby-users] set background label to transparent?? Message-ID: I just use wxRuby and I have problem I use background image on my app and when I create label it seem look background of label is gray, how can I change it into transparent???? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 18 15:30:19 2007 From: lists at ruby-forum.com (Glenn Pringle) Date: Sun, 18 Nov 2007 21:30:19 +0100 Subject: [wxruby-users] Issues adding sub-menu items Message-ID: <43c2f2f505878d0bc94e63955c60d61b@ruby-forum.com> Hello All, I'm new to the list and to Ruby. I was trying to use one of the examples as a skeleton for something that I'm working on. I'm currently stuck when it comes to adding another item to the sub-menus. I have a menu item by the name of "Tools" and I would like to add a sub-menu item called "Find Unique Fields" but it doesn't show up when I try to run it. If I add a Wx::ID_UNIQUE and a handle for the event the program fails. What do I need to do or what I'm I missing. I appreciate your response. Thanks, Glenn #!/usr/bin/env ruby begin .... .... .... class HL7Query < Wx::Frame def initialize(title) super(nil, :title => title, :size => [ 850, 600 ]) menu_bar = Wx::MenuBar.new # The "file" menu menu_file = Wx::Menu.new menu_file.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program") menu_bar.append(menu_file, "&File") # The "Tools" menu menu_tools = Wx::Menu.new #menu_tools.append(Wx::ID_UNIQUEFIELDS, "Find Unique Fields", "Find Unique Fields") menu_tools.append(nil, "Find Unique Fields", "Find Unique Fields") menu_bar.append(menu_tools, "Tools") # The "help" menu menu_help = Wx::Menu.new # Using Wx::ID_ABOUT default id means the menu item will be placed # in the correct platform-specific place - eg on OS X menu_help.append(Wx::ID_ABOUT, "&About...\tF1", "Show about dialog") menu_bar.append(menu_help, "&Help") # Assign the menubar to this frame self.menu_bar = menu_bar # Create a status bar create_status_bar(2) self.status_text = "Welcome to HL7Query!" # Set it up to handle menu events using the relevant methods evt_menu Wx::ID_EXIT, :on_quit evt_menu Wx::ID_ABOUT, :on_about end def on_quit close() end .... .... .... Wx::App.run do self.app_name = 'HL7Query' frame = HL7Query.new(":::HL7Query:::") frame.show end -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Nov 19 04:21:12 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 10:21:12 +0100 Subject: [wxruby-users] wxRuby textArea?? Message-ID: <2e578ec6749044a2cadc013f92e719fa@ruby-forum.com> I want to know wxruby can make textArea like java?? I can only use textbox with it but it has problem when I must use text that has many line, it can't new line please help me -- Posted via http://www.ruby-forum.com/. From jari.williamsson at mailbox.swipnet.se Mon Nov 19 04:39:39 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Mon, 19 Nov 2007 10:39:39 +0100 Subject: [wxruby-users] wxRuby textArea?? In-Reply-To: <2e578ec6749044a2cadc013f92e719fa@ruby-forum.com> References: <2e578ec6749044a2cadc013f92e719fa@ruby-forum.com> Message-ID: <474159DB.6020506@mailbox.swipnet.se> Pat Kiatchaipipat wrote: > I want to know wxruby can make textArea like java?? > I can only use textbox with it but it has problem when I must use text > that has many line, it can't new line Seems like you want the multi-line version of wxTextCtrl. In general, if you're looking for a specific type of control, run the bigdemo sample and locate the control (and code) there. Best regards, Jari Williamsson From alex at pressure.to Mon Nov 19 04:42:10 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 19 Nov 2007 09:42:10 +0000 Subject: [wxruby-users] wxRuby textArea?? In-Reply-To: <2e578ec6749044a2cadc013f92e719fa@ruby-forum.com> References: <2e578ec6749044a2cadc013f92e719fa@ruby-forum.com> Message-ID: <47415A72.9000103@pressure.to> Pat Kiatchaipipat wrote: > I want to know wxruby can make textArea like java?? > I can only use textbox with it but it has problem when I must use text > that has many line, it can't new line > textarea = Wx::TextCtrl.new(parent, :style => Wx::TE_MULTILINE) see: http://wxruby.rubyforge.org/doc/textctrl.html alex From alex at pressure.to Mon Nov 19 04:43:07 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 19 Nov 2007 09:43:07 +0000 Subject: [wxruby-users] set background label to transparent?? In-Reply-To: References: Message-ID: <47415AAB.3000308@pressure.to> Pat Kiatchaipipat wrote: > I just use wxRuby and I have problem > > I use background image on my app and when I create label it seem look > background of label is gray, how can I change it into transparent???? > Can you show us the code you're using here, and tell us what platform (Win/Linux/Mac) you're using. thanks alex From jari.williamsson at mailbox.swipnet.se Mon Nov 19 05:29:57 2007 From: jari.williamsson at mailbox.swipnet.se (Jari Williamsson) Date: Mon, 19 Nov 2007 11:29:57 +0100 Subject: [wxruby-users] Issues adding sub-menu items In-Reply-To: <43c2f2f505878d0bc94e63955c60d61b@ruby-forum.com> References: <43c2f2f505878d0bc94e63955c60d61b@ruby-forum.com> Message-ID: <474165A5.1000203@mailbox.swipnet.se> Glenn Pringle wrote: > I'm currently stuck when it comes to adding another item to the > sub-menus. > I have a menu item by the name of "Tools" and I would like to add a > sub-menu item called "Find Unique Fields" but it doesn't show up when I > try to run it. > > If I add a Wx::ID_UNIQUE and a handle for the event the program fails. > > What do I need to do or what I'm I missing. I appreciate your response. Your example (the row that wasn't commented out) had nil as the menu item id, which will fail. Either you have to supply your own valid ID value (starting from 100 going upwards is a good idea) or you use Wx::ID_ANY as the ID and you'll get an automatically assigned id (use get_id for the returned menu item object to know the ID). You have many ways to go here. Since you seem to choose to set up IDs yourself, first try a numerical value (for example 101) so you see how it works: menu_tools.append(101, "Find Unique Fields", "Find Unique Fields") ...and set up the menu item event handler... evt_menu 101, :on_unique_fields ...and then create the event handler method... def on_unique_fields p "on unique fields menu item selected" end Now, replace the number 101 with ID_UNIQUE: ID_UNIQUE = 101 ... menu_tools.append(ID_UNIQUE, "Find Unique Fields", "Find Unique Fields") ... evt_menu ID_UNIQUE, :on_unique_fields Please note that the Wx:: prefix should NOT be used prior to your own constant names - you don't want your own constants to interfere with the wxRuby name scope. Best regards, Jari Williamsson From bureaux.sebastien at neuf.fr Mon Nov 19 07:51:25 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Mon, 19 Nov 2007 13:51:25 +0100 Subject: [wxruby-users] options Message-ID: <000601c82aaa$e5404320$0201a8c0@sebastien> Bonjour tout le monde. En fait je voudrait savoir si il est possible d'enlever l'une des trois fonctions de la frame(maximize_box, minimise_box, close_box). On peut retirer les 3 en m?me temps, mais est-ce que l'on peut juste retirer l'une des trois? merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071119/2df9ddec/attachment.html From alex at pressure.to Mon Nov 19 08:05:46 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 19 Nov 2007 13:05:46 +0000 Subject: [wxruby-users] options In-Reply-To: <000601c82aaa$e5404320$0201a8c0@sebastien> References: <000601c82aaa$e5404320$0201a8c0@sebastien> Message-ID: <47418A2A.2080703@pressure.to> Salut sebastien wrote: > En fait je voudrait savoir si il est possible d'enlever l'une des > trois fonctions de la frame(maximize_box, minimise_box, close_box). [Sebastien asked: is it possible to remove just one of the three frame standard frame buttons: maximize/minimize/close?] Oui, on peut enlever une en par utilisant le 'style' argument au constructeur de Wx::Frame. Par exemple, si on ne veut pas une fonction 'maximize', on peut panacher deux styles, comme ci: no_max_style = Wx::DEFAULT_FRAME_STYLE ^ Wx::MAXIMIZE_BOX Wx::Frame.new(nil, :style => no_max_style) L'operateur logique "^" enleve la fonction, comme l'operateur '|' ajoute une en. [Yes, to remove one of the boxes, use the "style" argument to Wx::Frame's constructor. For example, to remove the maximise button, combine two styles as shown The logical operator "^" removes the box from the default style, as "|" adds one ] alex From lists at ruby-forum.com Mon Nov 19 08:32:02 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 14:32:02 +0100 Subject: [wxruby-users] wxRuby textArea?? In-Reply-To: <47415A72.9000103@pressure.to> References: <2e578ec6749044a2cadc013f92e719fa@ruby-forum.com> <47415A72.9000103@pressure.to> Message-ID: <291e4414cbff849503a8471b79933e7d@ruby-forum.com> thank you :D -- Posted via http://www.ruby-forum.com/. From bureaux.sebastien at neuf.fr Mon Nov 19 08:19:57 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Mon, 19 Nov 2007 14:19:57 +0100 Subject: [wxruby-users] options Message-ID: <000501c82aae$e3dc97a0$0201a8c0@sebastien> Salut Alex. Ce que je veut faire n'est pas cette option. Ce que je veut pouvoir faire, c'est faire dispara?tre compl?tement l'une des trois options. Avec la methode "maximize_box" par exemple tu d?sactive mais tu ne fait pas dispara?tre l'option de la frame. Est-ce qu'il est possible d'obtenir cette option? merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071119/cdc4c2c1/attachment-0001.html From lists at ruby-forum.com Mon Nov 19 09:09:16 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 15:09:16 +0100 Subject: [wxruby-users] how to add icon to window Message-ID: <4e28d65a580b9b450ed1b1912d449158@ruby-forum.com> I have icon file and I want to add it to top-left of my application How can I add it ?? -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Mon Nov 19 09:15:26 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 19 Nov 2007 14:15:26 +0000 Subject: [wxruby-users] how to add icon to window In-Reply-To: <4e28d65a580b9b450ed1b1912d449158@ruby-forum.com> References: <4e28d65a580b9b450ed1b1912d449158@ruby-forum.com> Message-ID: <47419A7E.6080607@pressure.to> Pat Kiatchaipipat wrote: > I have icon file and I want to add it to top-left of my application > How can I add it ?? > Use Frame#icon= or Frame#set_icon method. PNG icons are usually the best cross-platform option: my_frame.icon = Wx::Icon.new('path/to/icon.png', Wx::BITMAP_TYPE_PNG) You can also use .ico icons on Windows only, and .xpm on Linux: my_frame.icon = Wx::Icon.new('/path/to/icon.ico') You might want to take a look at the samples directory that comes with wxRuby. Most basic operations such as this, as well as many advanced usages are demonstrated in those samples. alex From alex at pressure.to Mon Nov 19 09:37:49 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 19 Nov 2007 14:37:49 +0000 Subject: [wxruby-users] options In-Reply-To: <000501c82aae$e3dc97a0$0201a8c0@sebastien> References: <000501c82aae$e3dc97a0$0201a8c0@sebastien> Message-ID: <47419FBD.10600@pressure.to> sebastien wrote: > Ce que je veut faire n'est pas cette option. > Ce que je veut pouvoir faire, c'est faire dispara?tre compl?tement > l'une des trois options. > Avec la methode "maximize_box" par exemple tu d?sactive mais tu ne > fait pas dispara?tre l'option de la frame. > Est-ce qu'il est possible d'obtenir cette option? [Sebastien said: that's not what I was looking for - I want to be able to make one of the three options disappear completely, not just be disabled] --- Je ne connais pas une fa?on de faire exactement ce que tu veux. Les dialogs n'affichent qu'une bouton de fermeture - ?a suffirait? On peut afficher une Frame sans aucune "decoration" - vois l'?chantillon bigdemo/ShapedWindow.rb Qu'est-ce que tu veux r?aliser? Le plus souvent, l'utilisateurs s'attendent ? ce que les trois options soient pr?sentes dans le premier frame d'une application. --- [I don't know a way to do this exactly. Dialogs only have a close button - would that do? You can show a frame without any decorations at all - see the bigdemo/ShapedWindow sample What are you trying to achieve. Most often, useres will expect that the three options will be present in the main frame of an application] alex From bureaux.sebastien at neuf.fr Mon Nov 19 10:07:21 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Mon, 19 Nov 2007 16:07:21 +0100 Subject: [wxruby-users] options Message-ID: <000501c82abd$e3065e10$0201a8c0@sebastien> Je veut tout simplement faire dispara?tre l'option "maximize_box" de la frame car je suis en train de cr?er une application ou je desactive "maximize_box" donc c'est pour ?a que je veut la faire compl?tement dispara?tre et ne laiss? que les deux autres. Ca n'est pas grave si ?a n'est pas possible. C'est juste une question de pr?sentation. merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071119/b42d6174/attachment.html From lists at ruby-forum.com Mon Nov 19 10:40:22 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 16:40:22 +0100 Subject: [wxruby-users] how to add icon to window In-Reply-To: <47419A7E.6080607@pressure.to> References: <4e28d65a580b9b450ed1b1912d449158@ruby-forum.com> <47419A7E.6080607@pressure.to> Message-ID: thank you :) -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Nov 19 10:54:06 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 16:54:06 +0100 Subject: [wxruby-users] about fileDialog Message-ID: <4ea321179b669ad086526ce5ae13e0a6@ruby-forum.com> I want to create openfile dialog and I use @dialog = FileDialog.new(@panel, "Choose a file", "", "", ".*", style=FD_OPEN, Point.new(312,152), Size.new(98, 23), "open") it's nothing happen in my frame I want to create openfileDialog at button how can I create it?? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Nov 19 10:59:12 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 16:59:12 +0100 Subject: [wxruby-users] about fileDialog In-Reply-To: <4ea321179b669ad086526ce5ae13e0a6@ruby-forum.com> References: <4ea321179b669ad086526ce5ae13e0a6@ruby-forum.com> Message-ID: I can do it now @dialog.show_modal() sorry.. :) -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Nov 19 12:09:27 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 18:09:27 +0100 Subject: [wxruby-users] set background label to transparent?? In-Reply-To: <47415AAB.3000308@pressure.to> References: <47415AAB.3000308@pressure.to> Message-ID: my code is @label1 = StaticText.new(@picturebox2, -1, 'Calculator', Point.new(168,38), Size.new(213, 39)) @label1.set_foreground_colour(Colour.new(255, 0, 255)) @label1.set_font(Font.new(15, FONTFAMILY_DEFAULT, BOLD, FONTWEIGHT_NORMAL, FALSE, 'Kristen ITC')) @picturebox2 is image background that I add to Panel I set like this and output it's can work completely but background of 'Calculator' label is gray and other label be the same :'( see my attachment picture Attachments: http://www.ruby-forum.com/attachment/1012/1.jpg -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Nov 19 12:10:05 2007 From: lists at ruby-forum.com (Pat Kiatchaipipat) Date: Mon, 19 Nov 2007 18:10:05 +0100 Subject: [wxruby-users] set background label to transparent?? In-Reply-To: References: <47415AAB.3000308@pressure.to> Message-ID: ah I use in Window -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Mon Nov 19 12:26:15 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 19 Nov 2007 17:26:15 +0000 Subject: [wxruby-users] set background label to transparent?? In-Reply-To: References: <47415AAB.3000308@pressure.to> Message-ID: <4741C737.3080104@pressure.to> Pat Kiatchaipipat wrote: > @label1 = StaticText.new(@picturebox2, -1, 'Calculator', > Point.new(168,38), Size.new(213, 39)) > @label1.set_foreground_colour(Colour.new(255, 0, 255)) > @label1.set_font(Font.new(15, FONTFAMILY_DEFAULT, BOLD, > FONTWEIGHT_NORMAL, FALSE, 'Kristen ITC')) > > @picturebox2 is image background that I add to Panel > I set like this and output it's can work completely but background of > 'Calculator' label is gray and other label be the same :'( > On Windows at least, StaticText always draws its background in the theme background colour. Instead of using StaticText, I would suggest drawing the text directly onto the bitmap using a DC (DeviceContext), inside an evt_paint event. Use draw_bitmap to paint the bitmap onto the frame, then draw_text to draw the text atop it. The simplest example of this can be found in the dialogs/dialogs.rb sample - search for on_paint method. hth alex From lists at ruby-forum.com Mon Nov 19 17:44:46 2007 From: lists at ruby-forum.com (Glenn Pringle) Date: Mon, 19 Nov 2007 23:44:46 +0100 Subject: [wxruby-users] Issues adding sub-menu items In-Reply-To: <474165A5.1000203@mailbox.swipnet.se> References: <43c2f2f505878d0bc94e63955c60d61b@ruby-forum.com> <474165A5.1000203@mailbox.swipnet.se> Message-ID: Jari Williamsson wrote: > Glenn Pringle wrote: > > Please note that the Wx:: prefix should NOT be used prior to your own > constant names - you don't want your own constants to interfere with the > wxRuby name scope. > > > Best regards, > > Jari Williamsson Thanks -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Tue Nov 20 05:52:47 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 20 Nov 2007 10:52:47 +0000 Subject: [wxruby-users] Wx::Notebook tabs, bug reports on... In-Reply-To: <16723.64.142.64.96.1194626314.squirrel@webmail.sonic.net> References: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> <4734487C.3060706@pressure.to> <16723.64.142.64.96.1194626314.squirrel@webmail.sonic.net> Message-ID: <4742BC7F.9030506@pressure.to> Hi peralta at sonic.net wrote: > I honestly can't figure out what sequence of resize operations > triggers the bug, but all I have to do is resize the window > repeatedly, including maximizing and restoring it, and eventually > the tab images go away. > > My environment, FWIW: > ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] > wxruby-1.9.0-i386-mswin32 > Windows XP Professional 5.1.2600 > > Here's my test program Thanks for the test case - that was very helpful. Having worked with it I'm pretty sure this is down to Ruby's garbage collection prematurely destroying the ImageList (repeated resizing accumulates Event and Size objects, which eventually triggers GC). wxRuby should protect an assigned image list in this situation. It should be a simple fix for the next wxRuby release with a DISOWN typemap, but in the meantime holding a reference to the image list as an instance variable of your Notebook should provide a workaround. Let me know if this doesn't seem to help. cheers alex From peralta at sonic.net Tue Nov 20 19:18:31 2007 From: peralta at sonic.net (peralta at sonic.net) Date: Tue, 20 Nov 2007 16:18:31 -0800 (PST) Subject: [wxruby-users] Wx::Notebook tabs, bug reports on... In-Reply-To: <4742BC7F.9030506@pressure.to> References: <19322.64.142.64.96.1194566511.squirrel@webmail.sonic.net> <4734487C.3060706@pressure.to> <16723.64.142.64.96.1194626314.squirrel@webmail.sonic.net> <4742BC7F.9030506@pressure.to> Message-ID: <15629.206.173.243.2.1195604311.squirrel@webmail.sonic.net> > ... but in the meantime holding a reference to the image list as an > instance variable of your Notebook should provide a workaround. That seems to do the trick, thanks! From bureaux.sebastien at neuf.fr Wed Nov 21 10:57:45 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Wed, 21 Nov 2007 16:57:45 +0100 Subject: [wxruby-users] bugs Message-ID: <000601c82c57$444f3e40$0201a8c0@sebastien> Bonjour tout le monde. Parfois j'ai mon application qui se ferme toute seul et voila l'erreur qui appara?t: "Exit code: -1073741819" Est-ce que quelqu'un peut m'expliquer ce que veut dire ce message d'erreur? Je vous remercie. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071121/aa5468de/attachment.html From alex at pressure.to Thu Nov 22 10:26:27 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 22 Nov 2007 15:26:27 +0000 Subject: [wxruby-users] bugs In-Reply-To: <000601c82c57$444f3e40$0201a8c0@sebastien> References: <000601c82c57$444f3e40$0201a8c0@sebastien> Message-ID: <47459FA3.20406@pressure.to> sebastien wrote: > Bonjour tout le monde. > Parfois j'ai mon application qui se ferme toute seul et voila l'erreur > qui appara?t: "Exit code: -1073741819" > Est-ce que quelqu'un peut m'expliquer ce que veut dire ce message > d'erreur? [Sebastian said: sometimes my application shuts itself down with the error message "Exit code -1073741819". Could someone explain to me what this error message means?] J'ai cherch? plusieurs fois et je n'ai pas r?ussi ? trouv? une explication certaine. Nombreuses pages suggerent que cette erreur peut se manifester ? cause d'un driver graphique d?fectueux, ou m?me dans le hardware (eg memory). Mais ?a nous aide ? peine... Est-ce que tu as vu cette erreur dans les ?chantillons ou autres applications wxruby, ou seulement dans un cas? Si nous pouvons isoler cette erreur ? quelque classe... [I've looked several times and I haven't found a definite explanation for this error. Several pages suggest that this error can arise from a bad graphic driver, or even in hardware, for example, memory. But that doesn't help us much ... Have you seen this error in the samples, or other wxruby applications, or only in one case. If we could isolate this error to a particular class...] cheers alex From bureaux.sebastien at neuf.fr Thu Nov 22 10:57:15 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Thu, 22 Nov 2007 16:57:15 +0100 Subject: [wxruby-users] bugs Message-ID: <000501c82d20$5bcbb7a0$0201a8c0@sebastien> Bonjour Alex. Ces erreurs ne proviennent pas des ?chantillons. En fait ces erreurs surviennent ? la suite d'erreur de code de ma part. Je travail avec "scite". Suivant l'erreur que je peut faire, le num?ro change. Ca m'arrive de temps en temps d'avoir une erreur "Exit code ....." suivant les erreurs. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071122/65768bba/attachment.html From mario at ruby-im.net Fri Nov 23 00:33:53 2007 From: mario at ruby-im.net (Mario Steele) Date: Thu, 22 Nov 2007 23:33:53 -0600 Subject: [wxruby-users] bugs In-Reply-To: <000501c82d20$5bcbb7a0$0201a8c0@sebastien> References: <000501c82d20$5bcbb7a0$0201a8c0@sebastien> Message-ID: On 11/22/07, sebastien wrote: > > Bonjour Alex. > Ces erreurs ne proviennent pas des ?chantillons. > En fait ces erreurs surviennent ? la suite d'erreur de code de ma part. Je > travail avec "scite". Suivant l'erreur que je peut faire, le num?ro change. > Ca m'arrive de temps en temps d'avoir une erreur "Exit code ....." suivant > les erreurs. > [Sebastien said: These errors are not from the samples. In fact these errors occur as a result of error code on my part. I work with "scite. Next mistake that I can do, the number change. It happens from time to time to have a mistake "Exit code ....." Following errors. ] Bonjour Sebastien, Du sons de cela, il semble que c'est une erreur qui doit faire face ? Scite. Ma question est pour vous, c'est quoi votre faisons avec Scite qui causait cette erreur de se produire? Si c'est traitant de Scite, plus que probable, il s'agit d'un probl?me de r?partition. Le syst?me d'exploitation peut ne pas ?tre en mesure d'allouer de la m?moire assez vite, pour Scite, qui en retour donne ? ce code d'erreur. Mais sans voir quelle est la cause de cette erreur, il va ?tre difficile pour nous de suivre cette baisse. Toute id?e vous pouvez nous donner, seront tr?s appr?ci?s. [Hello Sebastien, >From the sounds of this, it looks as though it's a specific error that has to deal with Scite. My question for you is, what is it your doing with Scite that would cause this error to occur? If it's dealing with Scite, more then likely, it's an allocation problem. The operating system may not be able to allocate the memory fast enough, for Scite, which in return gives this error code. But without seeing what is causing this error, it is going to be hard for us to track this down. Any insight you can give us, will be much appreciated.] Mario Steele -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071122/ab12ec3b/attachment.html From bureaux.sebastien at neuf.fr Fri Nov 23 04:29:57 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Fri, 23 Nov 2007 10:29:57 +0100 Subject: [wxruby-users] bugs Message-ID: <000501c82db3$73dbf510$0201a8c0@sebastien> Bonjour Mario. Je n'est pas relev? l'erreur que j'avait fait, donc je ne peut pas vous renseigner plus. Je noterait l'erreur la prochaine fois et je vous en ferait part. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071123/c57db65f/attachment.html From bureaux.sebastien at neuf.fr Fri Nov 23 05:14:23 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Fri, 23 Nov 2007 11:14:23 +0100 Subject: [wxruby-users] bugs Message-ID: <000501c82db9$a22d0c00$0201a8c0@sebastien> Par contre, j'ai un autre message d'erreur qui s'affiche par moment: "Exit code: 3" Je n'ai pas d'erreur dans mon application, mais par contre ce message se produit quand j'ouvre et ferme tr?s souvent mon application et au bout d'un moment mon application est tr?s longue ? s'ouvrir ou ne s'ouvre plus du tout et ce message d'erreur appara?t. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071123/b4917d28/attachment.html From bureaux.sebastien at neuf.fr Sat Nov 24 05:26:03 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Sat, 24 Nov 2007 11:26:03 +0100 Subject: [wxruby-users] htmlwindow Message-ID: <000601c82e84$6fed1bb0$0201a8c0@sebastien> Bonjour. Ne pouvant pas afficher toutes les pages web avec html window, est-ce qu'il est possible ? partir d'un bouton de coller l'url choisi dans la barre de recherche d'IE7 par exemple et d'ouvrir IE7 automatiquement ? la page recherch?e? Est-ce que vous pouvez me donnez quelques explications si cela est possible? merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071124/06d4a098/attachment.html From mario at ruby-im.net Sun Nov 25 13:54:41 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 25 Nov 2007 12:54:41 -0600 Subject: [wxruby-users] bugs In-Reply-To: <000501c82db9$a22d0c00$0201a8c0@sebastien> References: <000501c82db9$a22d0c00$0201a8c0@sebastien> Message-ID: On 11/23/07, sebastien wrote: > > Par contre, j'ai un autre message d'erreur qui s'affiche par moment: > "Exit code: 3" > Je n'ai pas d'erreur dans mon application, mais par contre ce message se > produit quand j'ouvre et ferme tr?s souvent mon application et au bout d'un > moment mon application est tr?s longue ? s'ouvrir ou ne s'ouvre plus du tout > et ce message d'erreur appara?t. > [Sebastien said: However, I have another error message that appears at times: "Exit code: 3" I have no mistake in my application, but on the other hand this message occurs when I open and close very often my application and after a while my application is very long to open or not open any more and you get this error. ] Bonjour Sebastien, Avec cette information, je voudrais v?rifier si vous avez des "fant?mes" rubis processus en cours d'ex?cution. Du sons de celui-ci, le Ruby interpr?te est toujours en cours d'ex?cution, de provoquer des wxWidgets l'a pas effectivly sorti de l'main_loop (). V?rifiez ? l'aide de Ctrl + Alt + Suppr pour faire appara?tre votre gestionnaire de t?ches, et de voir si le processus est toujours en cours d'ex?cution. Si c'est le cas, c'est que vous n'avez pas sorti des wxWidgets' main_loop (). Vous pouvez le faire en chassant la wxCloseEvent, et en utilisant Wx:: App.exit_main_loop () pour quitter compl?tement. [Hello Sebastien, With this information, I would check to see if you have any "ghost" ruby processes running. From the sounds of it, the Ruby interpreter is still running, cause the wxWidgets hasn't effectivly exited the main_loop() process. Check to see by using Ctrl+Alt+Delete to bring up your task manager, and see if the process is still running. If it is, then you have not exited wxWidgets' main_loop() function. You can do this by catching the wxCloseEvent, and using Wx::App.exit_main_loop() to exit out completely.] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071125/336144ff/attachment-0001.html From mario at ruby-im.net Sun Nov 25 14:03:21 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 25 Nov 2007 13:03:21 -0600 Subject: [wxruby-users] htmlwindow In-Reply-To: <000601c82e84$6fed1bb0$0201a8c0@sebastien> References: <000601c82e84$6fed1bb0$0201a8c0@sebastien> Message-ID: On 11/24/07, sebastien wrote: > > Bonjour. > Ne pouvant pas afficher toutes les pages web avec html window, est-ce > qu'il est possible ? partir d'un bouton de coller l'url choisi dans la barre > de recherche d'IE7 par exemple et d'ouvrir IE7 automatiquement ? la page > recherch?e? > Est-ce que vous pouvez me donnez quelques explications si cela est > possible? > merci > [Sebastien said: Hello. Unable to not show all web pages with html window, is it possible from a button paste the url chosen in the search bar of IE7 for example and open IE7 automatically to the page sought? Can you give me some explanation if possible?] Bonjour Sebastien, Wx:: HtmlWindow ne supporte pas les instructions HTML, comme les feuilles de style en cascade ou JavaScript, qui peuvent causer le plus de ne pas afficher les pages correctement. Si vous souhaitez installer quelque chose o? si vous avez l'URL de la page, et vous voulez que l'utilisateur soit en mesure de lancer la page dans Internet Explorer 7 ou Firefox, vous pouvez utiliser # noyau du syst?me ( "iexplore # de (url)") ou # Noyau du syst?me ( "firefox, # de (url)"). Parfois, la seule vocation du noyau syst?me # ( "# de (url)") se lance automatiquement ? l'utilisateur le navigateur pr?f?r? pour vous. Mais cela ne fonctionne que sous Windows, que Linux n'a pas de m?thode officielle pour le lancement des navigateurs, sans savoir ce qui l'aide de votre gestionnaire de fen?tres, comme KDE ou Gnome, soit la moiti? du million d'autres gestionnaires de fen?tres qui existe. Esp?rons que cette aide. [Hello Sebastien, Wx::HtmlWindow does not fully support HTML instructions, such as Cascading Style Sheets, or JavaScript, which can cause most pages not to display properly. If you want to setup something where if you have the URL to the page, and want the user to be able to launch the page in Internet Explorer 7 or Firefox, you can utilize Kernel#system("iexplore #{url}") or Kernel#system("firefox #{url}"). Sometimes, just calling Kernel#system("#{url}") will automatically launch the user's preferred browser for you. But this only works on Windows, as Linux has no official method for launching browsers, without knowing which Window Manager your using, such as KDE or Gnome, or half the million other Window managers out there. Hope this helps.] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071125/880ac0c9/attachment.html From bureaux.sebastien at neuf.fr Sun Nov 25 17:55:44 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Sun, 25 Nov 2007 23:55:44 +0100 Subject: [wxruby-users] bugs Message-ID: <000501c82fb6$54d0e9f0$0201a8c0@sebastien> Bonsoir. D?s que l'erreur ce reproduira, je regarderait dans le gestionnaire de t?ches pour voir si le processus est toujours en cours et je vous en ferait part. merci. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071125/76d36872/attachment.html From bureaux.sebastien at neuf.fr Mon Nov 26 07:58:21 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Mon, 26 Nov 2007 13:58:21 +0100 Subject: [wxruby-users] htmlwindow Message-ID: <000501c8302c$0681e710$0201a8c0@sebastien> Bonjour. Est-ce que vous pouvez me donner un peu plus de pr?cision et d'explication sur: Kernel#system("iexplore #{url}") Normalement en utilisant cette ligne de code, ca doit coller l'url dans la barre de recherche et ouvrir IE7 automatiquement ? la page recherch?e? Il n'y a pas grand chose d'expliquer sur le kernel dans les livres que j'ai. Je pense qu'il y a quelque chose que je ne fait pas correctement. merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071126/e44e2df3/attachment.html From alex at pressure.to Tue Nov 27 06:46:27 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Nov 2007 11:46:27 +0000 Subject: [wxruby-users] htmlwindow In-Reply-To: <000501c8302c$0681e710$0201a8c0@sebastien> References: <000501c8302c$0681e710$0201a8c0@sebastien> Message-ID: <474C0393.4000403@pressure.to> Salut sebastien wrote: > Bonjour. > Est-ce que vous pouvez me donner un peu plus de pr?cision et > d'explication sur: Kernel#system("iexplore #{url}") > Normalement en utilisant cette ligne de code, ca doit coller l'url > dans la barre de recherche et ouvrir IE7 automatiquement ? la page > recherch?e? [Sebastian said: could you give me a little more detail about Kernel#system("iexplore #{url}")?] http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_m_kernel.html#Kernel.system "system" donne son argument au shell pour ?tre ex?cut?. Windows doit pouvoir trouver "iexplore" dans PATH, et, pour moi (Windows XP SP2), il n'est pas trouv?, et donc, ne fonctionne pas. Cependant, on peut se servir de system("explorer #{url}") qui m?ne ? le m?me resultat. Je te sugg?re d'experimenter avec "Command Prompt" afin de trouver un command convenable ? donner ? "system" ["system" gives its argument to the shell to be executed. Windows must be able to find "iexplore" in PATH, and, for me (Windows XP SP2), it's not there, and so it doesn't work. However, one can use system("explorer #{url}") which gives the same result. I suggest you try out with "Command Prompt" to find the appropriate command to give to "system"] hth alex From bureaux.sebastien at neuf.fr Tue Nov 27 09:23:00 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Tue, 27 Nov 2007 15:23:00 +0100 Subject: [wxruby-users] htmlwindow Message-ID: <000501c83101$04020a30$0201a8c0@sebastien> j'ai essayer avec: system("iexplore #{url}") mais cela ne marche pas. Tu me sugg?re d'exp?rimenter avec "Command Prompt" afin de trouver une commande convenable pour "system" C'est ? dire? Est-ce que tu peut d?tailler un peu plus? merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071127/e1a7530e/attachment.html From alex at pressure.to Tue Nov 27 13:02:15 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Nov 2007 18:02:15 +0000 Subject: [wxruby-users] htmlwindow In-Reply-To: <000501c83101$04020a30$0201a8c0@sebastien> References: <000501c83101$04020a30$0201a8c0@sebastien> Message-ID: <474C5BA7.9070302@pressure.to> sebastien wrote: > j'ai essayer avec: system("iexplore #{url}") mais cela ne marche pas. > Tu me sugg?re d'exp?rimenter avec "Command Prompt" afin de trouver une > commande convenable pour "system" Je t'a sugg?r? ? essayer system("explorer #{url}") - est-ce que c'a marche? Ceci est une question generale de ruby - mais on peut tenter ce qui se passerait avec "system" par entrer une commande au terminal (eg "Command Prompt"/cmd.exe - je suis desol? que je ne sais pas comment il t'appelle en Fran?ais) alex From bureaux.sebastien at neuf.fr Tue Nov 27 13:55:27 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Tue, 27 Nov 2007 19:55:27 +0100 Subject: [wxruby-users] htmlwindow Message-ID: <000501c83127$1aa118f0$0201a8c0@sebastien> Quand je t'ai envoyer le message pr?c?dent, system("explorer #{url}") ne marchait pas(j'avait essayer qu'avec un seul url). Je vient d'essayer avec un url du site ruby.fr et la ?a marche. Donc j'ai bien IE7 qui s'ouvre ? la page demand?. Apparement, ?a d?pend des urls. Part contre voila le message d'erreur quand ?a ne marche pas: Le chemin d'acc?s "url" n'existe pas ou n'est pas un r?pertoire. Pour l'instant, je vais contr?ler mes urls et essayer de savoir pourquoi certain urls ne passe pas. Je te dirait si j'ai reussi ? r?soudre le probl?me. merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071127/b820e569/attachment.html From bureaux.sebastien at neuf.fr Wed Nov 28 04:22:50 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Wed, 28 Nov 2007 10:22:50 +0100 Subject: [wxruby-users] htmlwindow Message-ID: <000501c831a0$43e63d70$0201a8c0@sebastien> Salut Alex, j'ai reussi ? r?soudre le probl?me. J'arrive ? afficher tout mes urls. c'est bon. merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071128/89a9e337/attachment.html From nochoice at xs4all.nl Wed Nov 28 11:51:48 2007 From: nochoice at xs4all.nl (Jonathan Maasland) Date: Wed, 28 Nov 2007 17:51:48 +0100 Subject: [wxruby-users] Problems installing/running svn-code Message-ID: <474D9CA4.4070906@xs4all.nl> Hi, The last couple of days I've been trying to get back on the wxRuby-horse however I've ran into some problems while compiling/testing the subversion sources. Mind, the 1.9.2 official release works fine. Absolutely no problems whatsoever. The first hurdle was that the rake install target doesn't work. It fails on rakewx.rb:145. Looking into it I found that $target_lib wasn't set to anything. Searching the sources I couldn't find where it is supposed to be set. Still the rake gem command works fine so I installed the newly created gem. However when trying to run the minimal sample (only one I tried) it segfaults. After recompiling both wxGTK and wxRuby with debug enabled I decided to run it through gdb. I couldn't find anything, it's just a wee bit too complex for me to handle right now. Don't think this is useful for the developers but just in case it might be this is the error I got: undefined symbol: _Z10wxOnAssertPKwiPKcS0_S0_ I am running wxGTK-2.8.6, Ruby 1.8.6, RubyGems 0.9.4 and the wxruby subversion archive is up-to-date (rev 1450). I compiled wxGTK with the following configure command: ./configure --disable-shared --with-gtk --enable-monolithic \ --enable-unicode --enable-debug --enable-catch_segvs --enable-graphics_ctx \ --enable-mediactrl --with-opengl --with-libjpeg=builtin --with-libpng=builtin \ --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --enable-gui \ --enable-xrc --enable-mdi --enable-gif \ --enable-pcx --enable-iff --enable-pnm --enable-xpm With kind regards, Jonathan Maasland From bureaux.sebastien at neuf.fr Wed Nov 28 12:02:33 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Wed, 28 Nov 2007 18:02:33 +0100 Subject: [wxruby-users] bugs Message-ID: <000501c831e0$789d9e10$0201a8c0@sebastien> Salut Mario. Apr?s avoir encore eu un message d'erreur: "Exit code: 3", j'ai v?rifier dans le gestionnaire de t?ches, il n'y a pas de processus ruby en cours. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071128/f0d74120/attachment.html From mario at ruby-im.net Wed Nov 28 17:21:58 2007 From: mario at ruby-im.net (Mario Steele) Date: Wed, 28 Nov 2007 16:21:58 -0600 Subject: [wxruby-users] bugs In-Reply-To: <000501c831e0$789d9e10$0201a8c0@sebastien> References: <000501c831e0$789d9e10$0201a8c0@sebastien> Message-ID: On 11/28/07, sebastien wrote: > > Salut Mario. > Apr?s avoir encore eu un message d'erreur: "Exit code: 3", j'ai v?rifier > dans le gestionnaire de t?ches, il n'y a pas de processus ruby en cours. > [Sebastien said: Hello Mario. After yet had an error message: "Exit code: 3", I check in the task manager, there is no ruby process underway.] Bonjour Sebastien, D'accord, ce que nous avons ?limin? la possibilit? d'avoir d?voy? rubis processus encore en cours d'ex?cution. Au moins, nous pouvons maintenant d?terminer qui est rubis existant car il est suppos?. Y at-il une action sp?cifique que vous l'avez fait ? la cr?ation du "Exit Code 3 'rapport? Si nous pouvons r?duire o? cela est appel? ? partir, nous serons peut-?tre en mesure de d?terminer si cela est un probl?me avec Ruby, ou des wxWidgets. De me le faire savoir d?s que possible. [Okay, so we have eliminated the possibility of there being rogue ruby processes still running. At least we can now determine that ruby is existing as it is suppose to. Is there a specific action you did to create the 'Exit Code 3' report? If we can narrow down where this is being called from, we may be able to determine if this is a problem with Ruby, or wxWidgets. Let me know as soon as possible. ] Mario Steele -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071128/d5a10890/attachment.html From marcel.Bultez at Tiscali.fr Thu Nov 29 05:29:47 2007 From: marcel.Bultez at Tiscali.fr (Bul) Date: Thu, 29 Nov 2007 11:29:47 +0100 Subject: [wxruby-users] WxRuby + Scintilla avec HTML + JavaScript Message-ID: <000701c83272$c4bcd7b0$989824d5@phebus> bonjour ? toutes et ? tous, d'abord d?sol? de ne pas parler/lire/comprendre l'am?ricain/l'anglais, ce qui fait que j'ai beaucoup de mal ? comprendre la doc par exemple. j'ai un souci d'utilisation de WXRuby avec SCIntilla, dans le cas d'un HTML + Javascript. je suis parti bien entendu de l'exemple scintilla.rb fourni, qui fonctionne parfaitement, mais pas je ne parviens pas ? appliquer pour le JavaScript inclus. ========== d?but du script ========== require 'wx' include Wx class MyFrame < Frame def initialize() super( nil, -1, 'test', [100,100], [500,400] ) @sci = Wx::StyledTextCtrl.new( self ) line_num_margin = @sci.text_width( STC_STYLE_LINENUMBER, "_99999" ) @sci.set_margin_width( 0, line_num_margin ) @sci.set_lexer_language( 'hypertext' ) @sci.style_clear_all() @sci.style_set_foreground( 0, Wx::Colour.new(0,0,0) ) @sci.style_set_foreground( 1, Wx::Colour.new(0,0,0xFF) ) @sci.style_set_foreground( 2, Wx::Colour.new(0,0xFF,0) ) @sci.style_set_foreground( 3, Wx::Colour.new(0,0xFF,0xFF) ) @sci.style_set_foreground( 4, Wx::Colour.new(0xFF,0,0) ) @sci.style_set_foreground( 5, Wx::Colour.new(0xFF,0,0xFF) ) @sci.style_set_foreground( 6, Wx::Colour.new(0xF0,0xF0,0) ) @sci.style_set_foreground( 7, Wx::Colour.new(0xA0,0xA0,0xA0) ) @sci.set_key_words( 0, 'a abbr acronym address applet area b base basefont bdo big blockquote body'+ ' br button caption center cite code col colgroup dd del dfn dir div dl'+ ' dt em fieldset font form frame frameset h1 h2 h3 h4 h5 h6 head hr html'+ ' i iframe img input ins isindex kbd label legend li link map menu meta'+ ' noframes noscript object ol optgroup option p param pre q s samp script'+ ' select small span strike strong style sub sup table tbody td textarea'+ ' tfoot th thead title tr tt u ul var xml xmlns' ) @sci.set_key_words( 1, 'and break case catch char '+ ' const continue default delete do else'+ ' for function if in'+ ' new return'+ ' switch this typeof var void '+ ' while with' ) end end class RbApp < App def on_init frm = MyFrame.new() frm.show(TRUE) end end a = RbApp.new a.main_loop() ========== fin du script ========== et si on fait un copi?/coll? d'une page html avec du javascript, celui-ci est soulign? avec ~ et non color? qu'ai-je oubli? ? mal compris ? mal fait ? merci d'avance si vous pouvez m'aider, me dire o? trouver une exemple.... Cordialement. From bureaux.sebastien at neuf.fr Thu Nov 29 08:55:14 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Thu, 29 Nov 2007 14:55:14 +0100 Subject: [wxruby-users] bugs Message-ID: <000501c8328f$7988cde0$0201a8c0@sebastien> Pour l'instant, quand j'ai un "Exit code: 3", c'est quand j'ouvre et ferme tr?s fr?quement mon application. Ca ne le fait pas tout le temps. sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071129/6921dce4/attachment.html From bureaux.sebastien at neuf.fr Fri Nov 30 12:26:36 2007 From: bureaux.sebastien at neuf.fr (sebastien) Date: Fri, 30 Nov 2007 18:26:36 +0100 Subject: [wxruby-users] encodage Message-ID: <000501c83376$2ae33530$0201a8c0@sebastien> Salut Alex. J'ai remarqu? que "-" n'ai pas encod? avec htmlwindow??? Ce sigle correspond: \302\226 = - = ??" Je ne pense pas avoir fait d'erreur. Ca fait un petit rectangle ? la place. Je te laisse v?rifier. merci sebastien http://beusse.liveror.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20071130/859fae0f/attachment.html From jay at mcgavren.com Fri Nov 30 23:28:24 2007 From: jay at mcgavren.com (Jay McGavren) Date: Fri, 30 Nov 2007 21:28:24 -0700 Subject: [wxruby-users] Tearing in my buffered animation test script... Message-ID: <839490bc0711302028v35a8d9d5lb959762b17f115e8@mail.gmail.com> OK, I have a basic blit demo working (thanks to Alex Fenton for his reply, which I finally saw). However, there's a great deal of "tearing" on the screen - flickering grey lines in the black background. It looks like the blit isn't always complete when the screen refreshes. Can anyone look at this and tell me what I might be doing wrong? Any help would be most appreciated! -Jay McGavren http://jay.mcgavren.com/zyps require 'rubygems' require 'wx' class MyApp < Wx::App def on_init #Containing frame. frame = Wx::Frame.new(nil, :size => [300, 300]) frame.show #Offscreen drawing buffer. buffer = Wx::Bitmap.new(300, 300) #Displays drawing. window = Wx::Window.new(frame, :size => [300, 300]) window.evt_paint do |event| window.paint do |dc| #Copy the buffer to the viewable window. buffer.draw do |buffer_dc| dc.blit(0, 0, 300, 300, buffer_dc, 0, 0) end end end #Animate. (1..40).each do |i| #Clear screen. buffer.draw do |surface| surface.pen = Wx::Pen.new(Wx::Colour.new(0, 0, 0), 0) surface.brush = Wx::BLACK_BRUSH surface.draw_rectangle(0, 0, 300, 300) end #Draw line. buffer.draw do |surface| surface.pen = Wx::Pen.new( Wx::Colour.new(128, 255, 128), 3 ) surface.pen.cap = Wx::CAP_ROUND surface.draw_line(i, 0, i+100, 100) end #Update screen. window.refresh window.update sleep 0.1 end end end app = MyApp.new app.main_loop