Congratulations, wxRuby2 0.0.40 but,where is 0.0.40 mswin32.gem? _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
Sorry, Alex, but it looks like it''s still there. Evan Light IMs (all): sleight42 http://evan.tiggerpalace.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070509/e8bc14f7/attachment.html
Peng, I just uploaded the windows gem. The problem is that the guy who normally makes that gem seems to be unavailable right now. So I fixed-up my Windows install and created the gem. Sean On 5/9/07, peng. chen <auguusstt at gmail.com> wrote:> Congratulations, wxRuby2 0.0.40 > but,where is 0.0.40 mswin32.gem? > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >
thanks , wxWidgets 2.8 ,aui ,cool !!! ^_^ ** On 5/10/07, Sean Long <sean.m.long at gmail.com> wrote:> > Peng, > > I just uploaded the windows gem. The problem is that the guy who > normally makes that gem seems to be unavailable right now. So I > fixed-up my Windows install and created the gem. > > Sean > > On 5/9/07, peng. chen <auguusstt at gmail.com> wrote: > > Congratulations, wxRuby2 0.0.40 > > but,where is 0.0.40 mswin32.gem? > > > > _______________________________________________ > > wxruby-users mailing list > > wxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wxruby-users > > > _______________________________________________ > 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/20070510/26d311e8/attachment-0001.html
Evan Light wrote:> Sorry, Alex, but it looks like it''s still there.OK - did you apply the patch I sent to 0.0.40 and recompile? I didn''t try and fix the leak in 0.0.40 because we were too close to the release to test it thoroughly enough for regressions. alex
No, I hadn''t. I thought that the fix would be in 0.40 as you had mentioned earlier. Guess I''ll have to try a build. Are there definitive notes anywhere regarding what I need to download to do a build? I assume that there are dependencies outside of just wxRuby or am I incorrect? Evan Light IMs (all): sleight42 http://evan.tiggerpalace.com On May 10, 2007, at 4:06 AM, Alex Fenton wrote:> Evan Light wrote: >> Sorry, Alex, but it looks like it''s still there. > OK - did you apply the patch I sent to 0.0.40 and recompile? > > I didn''t try and fix the leak in 0.0.40 because we were too close to > the release to test it thoroughly enough for regressions. > > 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/20070510/fc72b022/attachment.html
Evan Light wrote:> No, I hadn''t. I thought that the fix would be in 0.40 as you had > mentioned earlier.Sorry that wasn''t clear. I just suggested waiting for 0.0.40 so you didn''t have to build wxWidgets twice. It''s a reasonably risky patch that I didn''t want to apply just before releasing.> Guess I''ll have to try a build. Are there definitive notes anywhere > regarding what I need to download to do a build? I assume that there > are dependencies outside of just wxRuby or am I incorrect?This page is pretty comprehensive - scroll down to ''building from source'' http://wxruby.rubyforge.org/wiki/wiki.pl?Installation http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets alex
When I copied the wxMac source to my machine and did a ./configure (with all of the parameters listed on the wx site for OS X), it said that I was missing wx-config.in. I copied configure.in to that name and ran configure with some success -- except that it said that I was missing "wx-config-inplace.in". Help me, Obi-wan Kenobi. You''re my only hope. Evan Light IMs (all): sleight42 http://evan.tiggerpalace.com On May 10, 2007, at 7:54 AM, Alex Fenton wrote:> Evan Light wrote: >> No, I hadn''t. I thought that the fix would be in 0.40 as you had >> mentioned earlier. > Sorry that wasn''t clear. I just suggested waiting for 0.0.40 so you > didn''t have to build wxWidgets twice. It''s a reasonably risky patch > that > I didn''t want to apply just before releasing. >> Guess I''ll have to try a build. Are there definitive notes anywhere >> regarding what I need to download to do a build? I assume that there >> are dependencies outside of just wxRuby or am I incorrect? > This page is pretty comprehensive - scroll down to ''building from > source'' > > http://wxruby.rubyforge.org/wiki/wiki.pl?Installation > > http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets > > 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/20070510/eecf31be/attachment.html
On May 10, 2007, at 10:32 PM, Evan Light wrote:> When I copied the wxMac source to my machine and did a ./configure > (with all of the parameters listed on the wx site for OS X), it > said that I was missing wx-config.in. I copied configure.in to > that name and ran configure with some success -- except that it > said that I was missing "wx-config-inplace.in". > > Help me, Obi-wan Kenobi. You''re my only hope.FYI, I''m building it through DarwinPorts instead. Will see if that works. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070510/6330a232/attachment.html
Built and installed. My memory leak is a bit better but it''s still there. If it helps at all, below is the code that gets kicked off when my timer executes (infinite loop executing every 5 seconds). In short, I create the following items on each loop: X many buttons (destroyed at the beginning of each loop) 1 Bitmap per button 1 Size object per button And that''s basically it. See code below if that helps at all. Is it PEBKAC or is there still a memory leak in WxRuby to be ironed out yet? If so, feel free to pitch me more fixes. I''m more than willing to rebuild and test. def create_bitmap_text_button(labels, parent, color=:green, params = {}) size = params.has_key?(:size) ? params[:size] : size=Size.new ($BTN_WIDTH,$BTN_HEIGHT) pos = params.has_key?(:pos) ? params[:pos] : DEFAULT_POSITION font = params.has_key?(:font) ? params[:font] : DEFAULT_FONT bitmap = case color when :green: Bitmap.new(GREEN_IMG, BITMAP_TYPE_GIF) when :yellow: Bitmap.new(YELLOW_IMG, BITMAP_TYPE_GIF) when :red: Bitmap.new(RED_IMG, BITMAP_TYPE_GIF) end bitmap.draw do |dc| dc.set_font font dc.set_background_mode TRANSPARENT dc.set_text_foreground BLACK extent = dc.get_text_extent(labels[0]) extent_y = extent[1] * labels.size label_no = 0 labels.each do |label| extent = dc.get_text_extent(label) text_x = (size.get_width - extent[0]) / 2 text_y = (size.get_height - extent_y) / 2 + extent[1] * label_no dc.draw_text label, text_x, text_y label_no += 1 end end btn = BitmapButton.new(parent, -1, bitmap, pos) end def create_button_per_friend @friends.map do |f| labels = [] labels << f.name color = case f.onlinestatus when "DND": :red when "ONLINE": :green else :yellow end btn = create_bitmap_text_button labels, @frame, color btn.set_min_size Size.new(150,150) evt_button(btn.get_id) do call = Skype.call f proc = Proc.new { |parent| handle_hangup call, parent } ButtonDialog.new(:parent =>@frame, :title => "Hang up call?", :label => "Hang up call", :command => proc, :color => :red).show_modal end btn end end # Adds one button per online Skype contact to the frame def redraw_friends_buttons @friend_btns.each { |b| b.destroy} if @friend_btns sizer = BoxSizer.new(VERTICAL) if (sizer = @frame.get_sizer).nil? @frame.set_sizer(sizer) if @frame.get_sizer.nil? @friends = Skype.online_friends.sort @frame.set_client_size($BTN_WIDTH, $BTN_HEIGHT * @friends.size) @friend_btns = create_button_per_friend @friend_btns.each { |b| sizer.add(b, 1, GROW|ALL, 2) } sizer.layout @frame.show end Evan Light IMs (all): sleight42 http://evan.tiggerpalace.com On May 10, 2007, at 7:54 AM, Alex Fenton wrote:> Evan Light wrote: >> No, I hadn''t. I thought that the fix would be in 0.40 as you had >> mentioned earlier. > Sorry that wasn''t clear. I just suggested waiting for 0.0.40 so you > didn''t have to build wxWidgets twice. It''s a reasonably risky patch > that > I didn''t want to apply just before releasing. >> Guess I''ll have to try a build. Are there definitive notes anywhere >> regarding what I need to download to do a build? I assume that there >> are dependencies outside of just wxRuby or am I incorrect? > This page is pretty comprehensive - scroll down to ''building from > source'' > > http://wxruby.rubyforge.org/wiki/wiki.pl?Installation > > http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets > > 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/20070511/e5d6f4e4/attachment.html
Hi Evan Light wrote:> My memory leak is a bit better but it''s still there.What I sent will fix Wx::Bitmap but it is likely still leaking on other classes. I''m working on a proper fix for the next release.> If it helps at all, below is the code that gets kicked off when my > timer executes (infinite loop executing every 5 seconds). In short, I > create the following items on each loop:If there''s any way of re- using some of the key variables here, it might reduce memory consumption in the interim. This might be a good idea anyway - creating new buttons willl probably always be slower than hiding them and showing them within in a sizer.> X many buttons (destroyed at the beginning of each loop) > 1 Bitmap per button > 1 Size object per button > > And that''s basically it. See code below if that helps at all. Is it > PEBKAC or is there still a memory leak in WxRuby to be ironed out yet?No I think it''s wxRuby ;) alwz
Yeah. I was originally contemplating caching the WxButtons internally but then you offered to try to fix it. ;-) I''m going to go with the caching mechanism. It''s a minor nuisance but I should be able to do it in a few lines of code. Evan Light IMs (all): sleight42 http://evan.tiggerpalace.com On May 14, 2007, at 6:21 PM, Alex Fenton wrote:> Hi > > Evan Light wrote: >> My memory leak is a bit better but it''s still there. > What I sent will fix Wx::Bitmap but it is likely still leaking on > other > classes. I''m working on a proper fix for the next release. >> If it helps at all, below is the code that gets kicked off when my >> timer executes (infinite loop executing every 5 seconds). In >> short, I >> create the following items on each loop: > If there''s any way of re- using some of the key variables here, it > might > reduce memory consumption in the interim. This might be a good idea > anyway - creating new buttons willl probably always be slower than > hiding them and showing them within in a sizer. >> X many buttons (destroyed at the beginning of each loop) >> 1 Bitmap per button >> 1 Size object per button >> >> And that''s basically it. See code below if that helps at all. Is it >> PEBKAC or is there still a memory leak in WxRuby to be ironed out >> yet? > No I think it''s wxRuby ;) > > alwz > _______________________________________________ > 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/20070514/89712a39/attachment-0001.html