From alex at pressure.to Mon Sep 3 06:22:16 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 03 Sep 2007 11:22:16 +0100 Subject: [wxruby-users] API survey results & update Message-ID: <46DBE058.5080002@pressure.to> Thanks to everyone who voted in the API style survey. We had 10 votes altogether - we're not electing the prime minister, after all - but it was decisively a yes. 90% (9/10) supported adding keyword constructors, and 77% (7/9) ruby-style accessors. The changes are summarised at the bottom of the email. We hope to have a 1.9.1 release incorporating these in the next week or two. 1.9.1 will also add StyledTextCtrl (Scintilla) support, as well as BitmapComboBox and RendererNative. Lastly it has some useful bugfixes to methods - eg TreeCtrl#on_compare_items; Choice#append; ListCtrl#get_item_rect cheers alex 1) All widgets and frames can be created using keyword args. This is really handy, for example, if you mainly use Sizers to manage layouts, and so rarely need to set an explicit size or position for a window. So, for a multiline TextCtrl, before, this was necessary Wx::TextCtrl.new(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::TE_MULTILINE) now this is enough: Wx::TextCtrl.new(parent, :style => Wx::TE_MULTILINE) 2) One of the keyword constructor aspects is to allow a shorter notation for Size and Position arguments, using a two-element array: Wx::TextCtrl.new(parent, :size => [200, 100]) For consistency, this shorthand will be made available to all methods which accept point or size arguments: textctrl.set_size [200, 100] # or textctrl.size = [200, 100] 3) Getter and setter methods can be accessed using the naming style more common in Ruby as well as that more common in C++/Java: * Instance methods like get_foo can be accessed as foo * Instance methods like set_foo can be accessed as foo= * Instance methods like is_foo can be accessed as foo? From lancecarlson at gmail.com Mon Sep 3 13:00:23 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Mon, 3 Sep 2007 13:00:23 -0400 Subject: [wxruby-users] API survey results & update In-Reply-To: <46DBE058.5080002@pressure.to> References: <46DBE058.5080002@pressure.to> Message-ID: <49f64a900709031000j3a0f285au8e775e5fbd1a9665@mail.gmail.com> Nice, I'm excited for the next release! On 9/3/07, Alex Fenton wrote: > Thanks to everyone who voted in the API style survey. We had 10 votes > altogether - we're not electing the prime minister, after all - but it > was decisively a yes. 90% (9/10) supported adding keyword constructors, > and 77% (7/9) ruby-style accessors. The changes are summarised at the > bottom of the email. > > We hope to have a 1.9.1 release incorporating these in the next week or > two. 1.9.1 will also add StyledTextCtrl (Scintilla) support, as well as > BitmapComboBox and RendererNative. Lastly it has some useful bugfixes to > methods - eg TreeCtrl#on_compare_items; Choice#append; > ListCtrl#get_item_rect > > cheers > alex > > 1) All widgets and frames can be created using keyword args. This is > really handy, for example, if you mainly use Sizers to manage layouts, > and so rarely need to set an explicit size or position for a window. So, > for a multiline TextCtrl, before, this was necessary > > Wx::TextCtrl.new(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, > Wx::TE_MULTILINE) > > now this is enough: > > Wx::TextCtrl.new(parent, :style => Wx::TE_MULTILINE) > > 2) One of the keyword constructor aspects is to allow a shorter notation > for Size and Position arguments, using a two-element array: > > Wx::TextCtrl.new(parent, :size => [200, 100]) > > For consistency, this shorthand will be made available to all methods > which accept point or size arguments: > > textctrl.set_size [200, 100] > # or > textctrl.size = [200, 100] > > 3) Getter and setter methods can be accessed using the naming style more > common in Ruby as well as that more common in C++/Java: > > * Instance methods like get_foo can be accessed as foo > * Instance methods like set_foo can be accessed as foo= > * Instance methods like is_foo can be accessed as foo? > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From teki321 at gmail.com Tue Sep 4 00:02:53 2007 From: teki321 at gmail.com (Bela Babik) Date: Tue, 4 Sep 2007 14:02:53 +1000 Subject: [wxruby-users] listctrl set_item_data Message-ID: Hi, I have used set_item_data with ruby objects (an array) and got a crash. The reason is simple, the objects were deallocated by the GC. The easy solution would be to accept only long parameters (like the original interface). The hard is to play by the GC's rules and increase the reference count and decrease on deletion. Regards, teki From alex at pressure.to Tue Sep 4 05:10:53 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 04 Sep 2007 10:10:53 +0100 Subject: [wxruby-users] listctrl set_item_data In-Reply-To: References: Message-ID: <46DD211D.8080207@pressure.to> Hi Bela Babik wrote: > I have used set_item_data with ruby objects (an array) and got a crash. > The reason is simple, the objects were deallocated by the GC. > It shouldn't do that. wxRuby tries to protect any objects that have been set as item_data from Ruby's GC. Please could you post some code that reproduces the problem, along with platform/version info? cheers alex From teki321 at gmail.com Wed Sep 5 00:02:21 2007 From: teki321 at gmail.com (Bela Babik) Date: Wed, 5 Sep 2007 14:02:21 +1000 Subject: [wxruby-users] listctrl set_item_data In-Reply-To: <46DD211D.8080207@pressure.to> References: <46DD211D.8080207@pressure.to> Message-ID: Created a bug report: http://rubyforge.org/tracker/index.php?func=detail&aid=13676&group_id=35&atid=218 -- teki From mario at ruby-im.net Wed Sep 5 00:13:12 2007 From: mario at ruby-im.net (Mario Steele) Date: Tue, 04 Sep 2007 23:13:12 -0500 Subject: [wxruby-users] listctrl set_item_data In-Reply-To: References: <46DD211D.8080207@pressure.to> Message-ID: <46DE2CD8.7000308@ruby-im.net> Bela Babik wrote: > Created a bug report: > http://rubyforge.org/tracker/index.php?func=detail&aid=13676&group_id=35&atid=218 > > From Bug Report: > I don't know how it supposed to work, but it seems that the ruby object is converted to long and then back (ListCtrl.i): > VALUE get_item_data(int row) > { > if ( row < 0 || row >= self->GetItemCount() ) return Qnil; > long item_data = self->GetItemData(row); > if ( item_data == 0 ) return Qnil; > return (VALUE)item_data; > } > > VALUE set_item_data(int row, VALUE ruby_obj) > { > if ( row < 0 || row >= self->GetItemCount() ) > { > rb_raise(rb_eIndexError, "Uninitialized item"); > } > long item_data = (long) ruby_obj; > bool result = self->SetItemData(row, item_data); > if ( result ) > return Qtrue; > return Qnil; > } >From this information you provided, I belive that the wxListCtrl#set_item_data and wxListCtrl#get_item_data need a Integer based value, and the way Alex has interpreted this to work, is to convert the Ruby Object into a pointer to it, so that the data can be saved to the wxListCtrlItem, and then later retrived via converting the pointer back into a Ruby Object, and returning the value of it. However, all that is being returned, is either nil, or corrupt data. There is two options for this. One option, is to correct the way set_item_data and get_item_data in the backend, /OR/ modify the Ruby Side of the Code, using a class attribute for ListCtrlItem, to store the data in a hash, with the item instance as the key, and the data as the value, and then overloading the set_item_data/get_item_data to code that will simply set and fetch the data from the hash. Just my two cents. Also, sending this to the Development list to, so that way, it's on both lists. Mario Steele From fabio.petrucci at gmail.com Wed Sep 5 04:43:26 2007 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Wed, 5 Sep 2007 10:43:26 +0200 Subject: [wxruby-users] centering MessageDialog Message-ID: Hi, is there any way to center the default Wx::MessageDialog or Wx::message_box on parent (owner) instead of screen? I haven't found any constant other than Wx::DEFAULT_POSITION. thanks for your help. fabio. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070905/41f95385/attachment.html From alex at pressure.to Wed Sep 5 17:27:54 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 05 Sep 2007 22:27:54 +0100 Subject: [wxruby-users] listctrl set_item_data In-Reply-To: References: <46DD211D.8080207@pressure.to> Message-ID: <46DF1F5A.3030206@pressure.to> Bela Babik wrote: > Created a bug report: > http://rubyforge.org/tracker/index.php?func=detail&aid=13676&group_id=35&atid=218 > Thanks for the test case. This is now fixed in SVN. The problem was that controls loaded from XRC weren't getting allocated the right mark functions to protect related items from GC. This would have affected quite a lot of classes, so should fix numerous possible crashers when using XRC. I also corrected the documentation to show that any ruby object can be used as item_data (as with other similar classes) cheers alex From alex at pressure.to Wed Sep 5 17:32:01 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 05 Sep 2007 22:32:01 +0100 Subject: [wxruby-users] centering MessageDialog In-Reply-To: References: Message-ID: <46DF2051.2040307@pressure.to> Fabio Petrucci wrote: > is there any way to center the default Wx::MessageDialog or > Wx::message_box on parent (owner) instead of screen? Dialogs have a centre_on_parent method, inherited from Wx::Window, which should do what you want cheers alex From fabio.petrucci at gmail.com Thu Sep 6 03:56:00 2007 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Thu, 6 Sep 2007 09:56:00 +0200 Subject: [wxruby-users] centering MessageDialog In-Reply-To: <46DF2051.2040307@pressure.to> References: <46DF2051.2040307@pressure.to> Message-ID: Ciao Alex, i've found that method but it doesn't work, this is what i did: md = Wx::MessageDialog.new(parent, message, title, Wx::OK|Wx::ICON_EXCLAMATION) md.centre_on_parent() md.show_modal() is it the right sequence? thank you. fabio. On 9/5/07, Alex Fenton wrote: > > Fabio Petrucci wrote: > > is there any way to center the default Wx::MessageDialog or > > Wx::message_box on parent (owner) instead of screen? > Dialogs have a centre_on_parent method, inherited from Wx::Window, which > should do what you want > > cheers > 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/20070906/fed84ae2/attachment.html From alex at pressure.to Thu Sep 6 04:05:17 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 06 Sep 2007 09:05:17 +0100 Subject: [wxruby-users] centering MessageDialog In-Reply-To: References: <46DF2051.2040307@pressure.to> Message-ID: <46DFB4BD.4050004@pressure.to> Fabio Petrucci wrote: > Ciao Alex, > i've found that method but it doesn't work, this is what i did: > > md = Wx::MessageDialog.new(parent, message, > title, Wx::OK|Wx::ICON_EXCLAMATION) > md.centre_on_parent() > md.show_modal() It looks right to me and something similar works. Could you send a complete test case and platform/version info please? cheers alex From fabio.petrucci at gmail.com Thu Sep 6 04:46:22 2007 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Thu, 6 Sep 2007 10:46:22 +0200 Subject: [wxruby-users] centering MessageDialog In-Reply-To: <46DFB4BD.4050004@pressure.to> References: <46DF2051.2040307@pressure.to> <46DFB4BD.4050004@pressure.to> Message-ID: ...here is an example tested on win xp, wxruby 1.9.0: begin require 'wx' rescue LoadError => no_wx_err begin require 'rubygems' require 'wx' rescue LoadError raise no_wx_err end end include Wx DIALOGS_MODAL = 19 class MyFrame < Frame def initialize(parent, title, pos, size) super(parent, -1, title, pos, size) evt_menu(DIALOGS_MODAL) {|event| on_modal_dlg(event) } end def on_modal_dlg(event) md = Wx::MessageDialog.new(self, "Should be centered on parent...", "centered", Wx::OK|Wx::ICON_INFORMATION) md.centre_on_parent() md.show_modal() end end class MyApp < App def on_init() frame = MyFrame.new(nil, "Centered dialog example", Point.new(20, 20), Size.new(400, 300)) # Make a menubar file_menu = Menu.new file_menu.append(DIALOGS_MODAL, "Mo&dal dialog\tCtrl-W") menu_bar = MenuBar.new menu_bar.append(file_menu, "&File") frame.set_menu_bar(menu_bar) frame.show() end end app = MyApp.new() app.main_loop() On 9/6/07, Alex Fenton wrote: > > Fabio Petrucci wrote: > > Ciao Alex, > > i've found that method but it doesn't work, this is what i did: > > > > md = Wx::MessageDialog.new(parent, message, > > title, Wx::OK|Wx::ICON_EXCLAMATION) > > md.centre_on_parent() > > md.show_modal() > It looks right to me and something similar works. Could you send a > complete test case and platform/version info please? > > cheers > 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/20070906/21d0f82f/attachment.html From alex at pressure.to Thu Sep 6 05:25:43 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 06 Sep 2007 10:25:43 +0100 Subject: [wxruby-users] centering MessageDialog In-Reply-To: References: <46DF2051.2040307@pressure.to> <46DFB4BD.4050004@pressure.to> Message-ID: <46DFC797.6050401@pressure.to> Fabio Petrucci wrote: > ...here is an example tested on win xp, wxruby 1.9.0: > Looks like this won't work with MessageDialog on Windows; see this thread on the wx mailing list: http://lists.wxwidgets.org/archive/wx-users/msg14354.html http://lists.wxwidgets.org/archive/wx-users/msg14355.html If it really must be centred, you could derive a class from Wx::Dialog cheers alex From fabio.petrucci at gmail.com Thu Sep 6 05:49:36 2007 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Thu, 6 Sep 2007 11:49:36 +0200 Subject: [wxruby-users] centering MessageDialog In-Reply-To: <46DFC797.6050401@pressure.to> References: <46DF2051.2040307@pressure.to> <46DFB4BD.4050004@pressure.to> <46DFC797.6050401@pressure.to> Message-ID: Ok... i can get by, thanks again. cheers fabio. On 9/6/07, Alex Fenton wrote: > > Fabio Petrucci wrote: > > ...here is an example tested on win xp, wxruby 1.9.0: > > > Looks like this won't work with MessageDialog on Windows; see this > thread on the wx mailing list: > > http://lists.wxwidgets.org/archive/wx-users/msg14354.html > http://lists.wxwidgets.org/archive/wx-users/msg14355.html > > If it really must be centred, you could derive a class from Wx::Dialog > > cheers > 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/20070906/8b95eb70/attachment.html From mario at ruby-im.net Fri Sep 7 02:15:29 2007 From: mario at ruby-im.net (Mario Steele) Date: Fri, 07 Sep 2007 01:15:29 -0500 Subject: [wxruby-users] Ruby IDE with wxRuby Message-ID: <46E0EC81.3010509@ruby-im.net> Hello All, There seems to have been a lot of interest in getting wxScintilla incorperated, and I think most of us who want it, want it so we can create an editor, so to avoid multiple projects comming out with the same goal (Not really that bad of a problem....), I'm going to kick start this, and ask that anyone interested in developing a Editor with wxRuby and wxScintilla, to send me an Email off list, and I'll establish an Email List for us to talk about with getting an IDE together. More programmers on a project definatly can help out. Make sure you use the email address that you want to receive the emails from the list on, when you email me. L8ers, Mario Steele From alex at pressure.to Fri Sep 7 04:01:11 2007 From: alex at pressure.to (Alex Fenton) Date: Fri, 07 Sep 2007 09:01:11 +0100 Subject: [wxruby-users] Ruby IDE with wxRuby In-Reply-To: <46E0EC81.3010509@ruby-im.net> References: <46E0EC81.3010509@ruby-im.net> Message-ID: <46E10547.1080909@pressure.to> Mario Steele wrote: > There seems to have been a lot of interest in getting wxScintilla > incorperated, and I think most of us who want it, want it so we can > create an editor I'm glad we fixed wxStyledTextCtrl. I've just scratched the surface and finding it a very handy alternative to TextCtrl + TE_RICH2 for my own apps - much better cross-platform consistency and lots more features. It would be interesting to see how else it can be used. You might want to look into the FreeRIDE project [1] which is a Ruby IDE in ruby. It uses FXRuby + FXScintilla, but they originally intended to switch to wxRuby once it was ready. From experience it's not usually that hard to rewrite FXRuby to wxRuby GUI code. Development seems to have faltered and there's some discussion on their list [2] about what the unique 'sell' of FreeRIDE is given the alternatives from lightweight (eg SCITE) to traditional (Emacs and vi) to heavyweight (NetBeans, Eclipse + DLTK or RDT, Aptana). cheers alex [1] http://freeride.rubyforge.org/wiki/wiki.pl [2] http://rubyforge.org/pipermail/freeride-devel/2007-June/000599.html From lancecarlson at gmail.com Fri Sep 7 10:29:49 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Fri, 7 Sep 2007 10:29:49 -0400 Subject: [wxruby-users] Ruby IDE with wxRuby In-Reply-To: <46E10547.1080909@pressure.to> References: <46E0EC81.3010509@ruby-im.net> <46E10547.1080909@pressure.to> Message-ID: <49f64a900709070729sf9e8fe8j44261650f11a3b23@mail.gmail.com> What about Hamr? We need help :) On 9/7/07, Alex Fenton wrote: > Mario Steele wrote: > > There seems to have been a lot of interest in getting wxScintilla > > incorperated, and I think most of us who want it, want it so we can > > create an editor > I'm glad we fixed wxStyledTextCtrl. I've just scratched the surface and > finding it a very handy alternative to TextCtrl + TE_RICH2 for my own > apps - much better cross-platform consistency and lots more features. It > would be interesting to see how else it can be used. > > You might want to look into the FreeRIDE project [1] which is a Ruby IDE > in ruby. It uses FXRuby + FXScintilla, but they originally intended to > switch to wxRuby once it was ready. From experience it's not usually > that hard to rewrite FXRuby to wxRuby GUI code. > > Development seems to have faltered and there's some discussion on their > list [2] about what the unique 'sell' of FreeRIDE is given the > alternatives from lightweight (eg SCITE) to traditional (Emacs and vi) > to heavyweight (NetBeans, Eclipse + DLTK or RDT, Aptana). > > cheers > alex > > [1] http://freeride.rubyforge.org/wiki/wiki.pl > [2] http://rubyforge.org/pipermail/freeride-devel/2007-June/000599.html > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From lancecarlson at gmail.com Fri Sep 7 10:30:31 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Fri, 7 Sep 2007 10:30:31 -0400 Subject: [wxruby-users] Ruby IDE with wxRuby In-Reply-To: <49f64a900709070729sf9e8fe8j44261650f11a3b23@mail.gmail.com> References: <46E0EC81.3010509@ruby-im.net> <46E10547.1080909@pressure.to> <49f64a900709070729sf9e8fe8j44261650f11a3b23@mail.gmail.com> Message-ID: <49f64a900709070730sa723b82oe9c92d32c63fc4da@mail.gmail.com> hamr.rubyforge.org On 9/7/07, Lance Carlson wrote: > What about Hamr? We need help :) > > On 9/7/07, Alex Fenton wrote: > > Mario Steele wrote: > > > There seems to have been a lot of interest in getting wxScintilla > > > incorperated, and I think most of us who want it, want it so we can > > > create an editor > > I'm glad we fixed wxStyledTextCtrl. I've just scratched the surface and > > finding it a very handy alternative to TextCtrl + TE_RICH2 for my own > > apps - much better cross-platform consistency and lots more features. It > > would be interesting to see how else it can be used. > > > > You might want to look into the FreeRIDE project [1] which is a Ruby IDE > > in ruby. It uses FXRuby + FXScintilla, but they originally intended to > > switch to wxRuby once it was ready. From experience it's not usually > > that hard to rewrite FXRuby to wxRuby GUI code. > > > > Development seems to have faltered and there's some discussion on their > > list [2] about what the unique 'sell' of FreeRIDE is given the > > alternatives from lightweight (eg SCITE) to traditional (Emacs and vi) > > to heavyweight (NetBeans, Eclipse + DLTK or RDT, Aptana). > > > > cheers > > alex > > > > [1] http://freeride.rubyforge.org/wiki/wiki.pl > > [2] http://rubyforge.org/pipermail/freeride-devel/2007-June/000599.html > > _______________________________________________ > > wxruby-users mailing list > > wxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From mario at ruby-im.net Fri Sep 7 20:20:08 2007 From: mario at ruby-im.net (Mario Steele) Date: Fri, 07 Sep 2007 19:20:08 -0500 Subject: [wxruby-users] Ruby IDE with wxRuby In-Reply-To: <46E10547.1080909@pressure.to> References: <46E0EC81.3010509@ruby-im.net> <46E10547.1080909@pressure.to> Message-ID: <46E1EAB8.7040709@ruby-im.net> Hey Alex, I've used FreeRIDE before, and am not so much a fan of it. Design and all, is alright, but I'm looking for something a bit more solid. Plus, I'm looking at the possibility of incorperating other stuff into the IDE. Like taking advantage of the wxAUI for one, and creating a XRC Developer to be included with the editor, to bring an all in one application to do just about anything with wxRuby. Giving it something that other IDE's doesn't really have. Mario Steele Alex Fenton wrote: > Mario Steele wrote: > >> There seems to have been a lot of interest in getting wxScintilla >> incorperated, and I think most of us who want it, want it so we can >> create an editor >> > I'm glad we fixed wxStyledTextCtrl. I've just scratched the surface and > finding it a very handy alternative to TextCtrl + TE_RICH2 for my own > apps - much better cross-platform consistency and lots more features. It > would be interesting to see how else it can be used. > > You might want to look into the FreeRIDE project [1] which is a Ruby IDE > in ruby. It uses FXRuby + FXScintilla, but they originally intended to > switch to wxRuby once it was ready. From experience it's not usually > that hard to rewrite FXRuby to wxRuby GUI code. > > Development seems to have faltered and there's some discussion on their > list [2] about what the unique 'sell' of FreeRIDE is given the > alternatives from lightweight (eg SCITE) to traditional (Emacs and vi) > to heavyweight (NetBeans, Eclipse + DLTK or RDT, Aptana). > > cheers > alex > > [1] http://freeride.rubyforge.org/wiki/wiki.pl > [2] http://rubyforge.org/pipermail/freeride-devel/2007-June/000599.html > _______________________________________________ > 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/20070907/d2ea6f91/attachment.html From mario at ruby-im.net Fri Sep 7 20:23:37 2007 From: mario at ruby-im.net (Mario Steele) Date: Fri, 07 Sep 2007 19:23:37 -0500 Subject: [wxruby-users] Ruby IDE with wxRuby In-Reply-To: <49f64a900709070729sf9e8fe8j44261650f11a3b23@mail.gmail.com> References: <46E0EC81.3010509@ruby-im.net> <46E10547.1080909@pressure.to> <49f64a900709070729sf9e8fe8j44261650f11a3b23@mail.gmail.com> Message-ID: <46E1EB89.8070300@ruby-im.net> Hello Lance, I've looked over your code for Hamr. And I'm sorry, but I'm not much of a MVC fan, when it comes to developing Applications. To much of a learning curve for me, as I've tried working with Ruby On Rails, and could never peg down what I wanted to do, to get something done. Guess it comes from my previous experience with working with other programming languages. Mario Steele Lance Carlson wrote: > What about Hamr? We need help :) > > On 9/7/07, Alex Fenton wrote: > >> Mario Steele wrote: >> >>> There seems to have been a lot of interest in getting wxScintilla >>> incorperated, and I think most of us who want it, want it so we can >>> create an editor >>> >> I'm glad we fixed wxStyledTextCtrl. I've just scratched the surface and >> finding it a very handy alternative to TextCtrl + TE_RICH2 for my own >> apps - much better cross-platform consistency and lots more features. It >> would be interesting to see how else it can be used. >> >> You might want to look into the FreeRIDE project [1] which is a Ruby IDE >> in ruby. It uses FXRuby + FXScintilla, but they originally intended to >> switch to wxRuby once it was ready. From experience it's not usually >> that hard to rewrite FXRuby to wxRuby GUI code. >> >> Development seems to have faltered and there's some discussion on their >> list [2] about what the unique 'sell' of FreeRIDE is given the >> alternatives from lightweight (eg SCITE) to traditional (Emacs and vi) >> to heavyweight (NetBeans, Eclipse + DLTK or RDT, Aptana). >> >> cheers >> alex >> >> [1] http://freeride.rubyforge.org/wiki/wiki.pl >> [2] http://rubyforge.org/pipermail/freeride-devel/2007-June/000599.html >> _______________________________________________ >> 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/20070907/7247428c/attachment.html From bureaux.sebastien at neuf.fr Sun Sep 9 12:14:10 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Sun, 09 Sep 2007 18:14:10 +0200 Subject: [wxruby-users] ColourDialog Message-ID: <000501c7f2fc$74eb8160$0201a8c0@SN111194970311> Bonjour Alex. Je voudrais savoir si il est possible de sauvegarder les couleurs quand on se sert de "ColourDialog"? merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070909/194febf3/attachment.html From alex at pressure.to Sun Sep 9 15:35:12 2007 From: alex at pressure.to (Alex Fenton) Date: Sun, 09 Sep 2007 20:35:12 +0100 Subject: [wxruby-users] ColourDialog In-Reply-To: <000501c7f2fc$74eb8160$0201a8c0@SN111194970311> References: <000501c7f2fc$74eb8160$0201a8c0@SN111194970311> Message-ID: <46E44AF0.2070602@pressure.to> Salut Sebastien wrote: > Bonjour Alex. Je voudrais savoir si il est possible de sauvegarder les > couleurs quand on se sert de "ColourDialog"? [Is it possible to save the colours when using Wx::ColourDialog?] Oui, c'est possible. Quand on cr?e un ColourDialog, on peut donner un objet de ColourData comme le deuxi?me argument au 'new'. Avec cet objet, on peut nommer le couleur pre-choisi, et aussi dix-sept autres choix. On retrouve les couleur qui est choisi avec ColourDialog#get_colour_data. Voyez on_choose_colour dans sample/dialogs/dialogs.rb [Yes, you can - when creating a ColourDialog, you can give a ColourData object as the second argument. This object can specify the pre-selected main colour, and up to sixteen custom colours to. You can retrieve the chosen colour by calling ColourDialog#get_colour_data See the method on_choose_colour in sample/dialogs/dialogs.rb] alex From alex at pressure.to Tue Sep 11 03:49:59 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 11 Sep 2007 08:49:59 +0100 Subject: [wxruby-users] wxRuby 1.9.1, wxSugar 0.1.17 Message-ID: <46E648A7.8010705@pressure.to> I'm very happy to announce that new versions of wxRuby and wxSugar are now available. == CHANGES == * Merged nice ruby-style syntax options into core wxRuby * Re-added support for StyledTextCtrl (Scintilla) component * Added BitmapComboBox and RendererNative classes * Fixed nasty bug which could cause instability in XML-loaded layouts * Numerous other fixes and new methods in existing classes * Figured out how to build on AMD-64 Linux * Upgraded binary builds to be based on latest wxWidgets 2.8.5 * New and updated samples and docs A full ChangeLog is included with the download. For fuller information on the new syntax options, see http://wxruby.rubyforge.org/doc/wxruby_intro.html . == INSTALLATION == gem install wxruby NOTE: if you're using wxSugar in existing code, please upgrade to the latest version at the same time as installing wxRuby 1.9.1 (gem install wx_sugar) NOTE: We currently have binary builds for Linux (Intel) Windows (Intel) and OS X (Intel and PPC) We hope to have Linux (AMD64) added shortly. == KNOWN ISSUES == http://rubyforge.org/tracker/?group_id=35 == NEXT STEPS == For 1.9.2, we're considering adding some additional syntax options from wxSugar, then freezing the API. With some luck, 1.9.2 might be a 2.0 release candidate. == CREDITS == As ever, this version's only possible thanks to collaboration from the core dev team and other participants. Particular thanks to: Sean Long for ongoing support and providing many binary builds; Glenn Davy for working through the AMD 64 build process; Roy Sutton, who did the original work on wxScintilla; and to all those who filed bugs, answered queries and took part in surveys & discussions on the mailing lists. From pooster at gmail.com Tue Sep 11 14:52:11 2007 From: pooster at gmail.com (Scruffy Poo) Date: Tue, 11 Sep 2007 13:52:11 -0500 Subject: [wxruby-users] LayoutConstraints upgrade path Message-ID: Hey there. I have an application that I developed with an older branch of wxruby some time ago, and I made heavy use of the LayoutConstraints class. I've been looking around, but so far haven't found much in the way of advice for this scenario. Is there any existing documentation as to updating such applications? Thanks, Ess -- SO not teh 1337 From alex at pressure.to Tue Sep 11 17:59:35 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 11 Sep 2007 22:59:35 +0100 Subject: [wxruby-users] LayoutConstraints upgrade path In-Reply-To: References: Message-ID: <46E70FC7.6040500@pressure.to> Scruffy Poo wrote: > I have an application that I developed with an older branch of wxruby > some time ago, and I made heavy use of the LayoutConstraints class. > I've been looking around, but so far haven't found much in the way of > advice for this scenario. Is there any existing documentation as to > updating such applications? > I haven't seen any such documentation unfortunately. The upgrade path is to use Wx::Sizer. These are fully supported in wxRuby and are used by all the major IDE packages so aren't going anywhere. I haven't used LayoutConstraints so don't really know how these classes work beyond the limited documentation. But from skimming: - Where you want to position one widget in top-bottom or left-right sequence to another, instead of using LayoutConstraint#left_of etc, with Sizers you create a BoxSizer with Wx::VERTICAL or Wx::HORIZONTAL, and then add widgets to it in the order you want them to appear. - Where you want to size one widget relative to one another, you pass proportion arguments to Sizer#add. So if you want one widget to be twice the size of the other, you give the larger widget proportion 2, the other proportion 1. You can use proportion 0 to give a widget a minimum "natural" size and retaining that size as the containing parent is resized. There is a Sizer tutorial on the wxRuby wiki which is a bit dated but might help. Also you might look into the "arrange" methods of wxSugar which make working with Sizers simpler and more reliable. hth alex From alex at pressure.to Wed Sep 12 03:48:33 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 12 Sep 2007 08:48:33 +0100 Subject: [wxruby-users] screenshots & wxruby apps Message-ID: <46E799D1.8070208@pressure.to> Hi I've added a page to the wiki to show some screenshots opf the wxRuby samples: http://wxruby.rubyforge.org/wiki/wiki.pl?ScreenShots I'd like to get some screenshots for OS X to add to this, if anyone could supply them please. It would be nice to show the minimal sample for all three platforms, plus perhaps some of the ones that aren't included there. Also if you have a wxRuby app that you'd like to mention and show off on the website, drop me a line cheers alex From ruby at schmidtwisser.de Fri Sep 14 12:48:27 2007 From: ruby at schmidtwisser.de (Gregor Schmidt) Date: Fri, 14 Sep 2007 18:48:27 +0200 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <46E799D1.8070208@pressure.to> References: <46E799D1.8070208@pressure.to> Message-ID: <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> Hi, I'm not sure if somebody already answered. So I compiled the desired screenshots for OS X (10.4). Unfortunately the Scintilla sample does not work on my machine, so this screenshot is missing. Feel free to use the others for any purpose. Cheers, Gregor On 9/12/07, Alex Fenton wrote: > Hi > > I've added a page to the wiki to show some screenshots opf the wxRuby > samples: > > http://wxruby.rubyforge.org/wiki/wiki.pl?ScreenShots > > I'd like to get some screenshots for OS X to add to this, if anyone > could supply them please. It would be nice to show the minimal sample > for all three platforms, plus perhaps some of the ones that aren't > included there. > > Also if you have a wxRuby app that you'd like to mention and show off on > the website, drop me a line > > cheers > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- A non-text attachment was scrubbed... Name: wxruby screenshots.zip Type: application/zip Size: 262510 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20070914/75fbc403/attachment-0001.zip From lancecarlson at gmail.com Fri Sep 14 12:52:34 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Fri, 14 Sep 2007 12:52:34 -0400 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> Message-ID: <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> Yea I had problems with the Scintilla example as well. I don't have time to report the error, but is anyone else having problems? On 9/14/07, Gregor Schmidt wrote: > Hi, > > I'm not sure if somebody already answered. So I compiled the desired > screenshots for OS X (10.4). Unfortunately the Scintilla sample does > not work on my machine, so this screenshot is missing. > > Feel free to use the others for any purpose. > > Cheers, > > Gregor > > On 9/12/07, Alex Fenton wrote: > > Hi > > > > I've added a page to the wiki to show some screenshots opf the wxRuby > > samples: > > > > http://wxruby.rubyforge.org/wiki/wiki.pl?ScreenShots > > > > I'd like to get some screenshots for OS X to add to this, if anyone > > could supply them please. It would be nice to show the minimal sample > > for all three platforms, plus perhaps some of the ones that aren't > > included there. > > > > Also if you have a wxRuby app that you'd like to mention and show off on > > the website, drop me a line > > > > cheers > > alex > > _______________________________________________ > > 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 > > From lancecarlson at gmail.com Fri Sep 14 12:52:34 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Fri, 14 Sep 2007 12:52:34 -0400 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> Message-ID: <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> Yea I had problems with the Scintilla example as well. I don't have time to report the error, but is anyone else having problems? On 9/14/07, Gregor Schmidt wrote: > Hi, > > I'm not sure if somebody already answered. So I compiled the desired > screenshots for OS X (10.4). Unfortunately the Scintilla sample does > not work on my machine, so this screenshot is missing. > > Feel free to use the others for any purpose. > > Cheers, > > Gregor > > On 9/12/07, Alex Fenton wrote: > > Hi > > > > I've added a page to the wiki to show some screenshots opf the wxRuby > > samples: > > > > http://wxruby.rubyforge.org/wiki/wiki.pl?ScreenShots > > > > I'd like to get some screenshots for OS X to add to this, if anyone > > could supply them please. It would be nice to show the minimal sample > > for all three platforms, plus perhaps some of the ones that aren't > > included there. > > > > Also if you have a wxRuby app that you'd like to mention and show off on > > the website, drop me a line > > > > cheers > > alex > > _______________________________________________ > > 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 > > From ruby at schmidtwisser.de Fri Sep 14 13:13:12 2007 From: ruby at schmidtwisser.de (Gregor Schmidt) Date: Fri, 14 Sep 2007 19:13:12 +0200 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> Message-ID: <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> On 9/14/07, Lance Carlson wrote: > Yea I had problems with the Scintilla example as well. I don't have > time to report the error, but is anyone else having problems? I can report if you like. ------------------------- The error occured in the 1.9.0 gem and seems to be fixed in 1.9.1 ------------------------- I entered "ruby scintilla.rb" in the samples/text folder. This produced the following error: scintilla.rb:54:in `initialize': uninitialized constant Wxruby2::Scintilla (NameError) from scintilla.rb:169:in `new' from scintilla.rb:169:in `on_init' from scintilla.rb:177:in `main_loop' from scintilla.rb:177 line 54 reads: @sci = Wx::Scintilla.new(self) In the current gem the same line reads: @sci = Wx::StyledTextCtrl.new(self) Everything solved. Just update to the current version of the gem. Cheers, Gregor From ruby at schmidtwisser.de Fri Sep 14 13:34:33 2007 From: ruby at schmidtwisser.de (Gregor Schmidt) Date: Fri, 14 Sep 2007 19:34:33 +0200 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> Message-ID: <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> Attached you may find an update of the minimal screenshot - now the window got focus - and a screenshot of the scintilla example app. Cheers, Gregor -------------- next part -------------- A non-text attachment was scrubbed... Name: wxruby screenshots update.zip Type: application/zip Size: 36277 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20070914/73b4ea38/attachment-0001.zip From sean.m.long at gmail.com Fri Sep 14 17:21:40 2007 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 14 Sep 2007 14:21:40 -0700 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> Message-ID: > ------------------------- > The error occured in the 1.9.0 gem and seems to be fixed in 1.9.1 > ------------------------- If I remember correctly when I built the 1.9.0 gems for OS X (Intel & PPC) and Windows Scintilla was not included. With gem 1.9.1 and beyond Scintilla will be included standard, unless that decision is changed down the line for size reasons. If you do have problems with the 1.9.1 gem and Scintilla let us know. Thanks Sean From sean.m.long at gmail.com Fri Sep 14 17:31:48 2007 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 14 Sep 2007 14:31:48 -0700 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> Message-ID: What did you use to take the screen shot? I used the grab window function in Preview.app and it would not grab the focus. I will try updating the pictures, yesterday I could not get it to work and had to have Alex do it for me. Thanks for the screenshots Sean On 9/14/07, Gregor Schmidt wrote: > Attached you may find an update of the minimal screenshot - now the > window got focus - and a screenshot of the scintilla example app. > > Cheers, > > Gregor > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > From ruby at schmidtwisser.de Sat Sep 15 03:03:15 2007 From: ruby at schmidtwisser.de (Gregor Schmidt) Date: Sat, 15 Sep 2007 09:03:15 +0200 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> Message-ID: <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> On 9/14/07, Sean Long wrote: > What did you use to take the screen shot? I used the grab window > function in Preview.app and it would not grab the focus. I'm using a dashboard widget called Screenshot Plus. There is also a keyboard shortcut to capture the current window, but I always forget it. Cheers, Gregor From lancecarlson at gmail.com Sat Sep 15 12:32:01 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Sat, 15 Sep 2007 12:32:01 -0400 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> Message-ID: <49f64a900709150932l45657078l3e28ba3a1180e13c@mail.gmail.com> I'm using wxruby2 preview 0.0.40 and Scintilla isn't working. Should I be using wxruby 1.9.1? On 9/15/07, Gregor Schmidt wrote: > On 9/14/07, Sean Long wrote: > > What did you use to take the screen shot? I used the grab window > > function in Preview.app and it would not grab the focus. > > I'm using a dashboard widget called Screenshot Plus. There is also a > keyboard shortcut to capture the current window, but I always forget > it. > > Cheers, > > Gregor > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From lancecarlson at gmail.com Sat Sep 15 12:37:39 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Sat, 15 Sep 2007 12:37:39 -0400 Subject: [wxruby-users] Problems with 1.8.6 Message-ID: <49f64a900709150937m61c101b1o9e4918d51e36df6e@mail.gmail.com> Hi all, Recently a user of my editor (Hamr) reported that while using ruby 1.8.6 on windows, the close button would re-open the entire application once and quit. I heard that 1.8.6 has had problems with SOAP because it double posts. Is there something completely screwed up in 1.8.6 or did I make a programming error? :) -TIA From sean.m.long at gmail.com Sat Sep 15 13:43:24 2007 From: sean.m.long at gmail.com (Sean Long) Date: Sat, 15 Sep 2007 10:43:24 -0700 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <49f64a900709150932l45657078l3e28ba3a1180e13c@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> <49f64a900709150932l45657078l3e28ba3a1180e13c@mail.gmail.com> Message-ID: Yes upgrading to wxRuby 1.9.1 will allow you to use Scintilla and also contains many fixes since the 0.0.40 release, mainly dealing with memory leaks and crashes. Sean On 9/15/07, Lance Carlson wrote: > I'm using wxruby2 preview 0.0.40 and Scintilla isn't working. Should I > be using wxruby 1.9.1? From sean.m.long at gmail.com Sat Sep 15 13:48:42 2007 From: sean.m.long at gmail.com (Sean Long) Date: Sat, 15 Sep 2007 10:48:42 -0700 Subject: [wxruby-users] Problems with 1.8.6 In-Reply-To: <49f64a900709150937m61c101b1o9e4918d51e36df6e@mail.gmail.com> References: <49f64a900709150937m61c101b1o9e4918d51e36df6e@mail.gmail.com> Message-ID: What version of wxRuby are you using when getting this problem? Please update to the 1.9.1 release and see if the problem is still present. I believe I am still using 1.8.4 on my windows machine (not at that machine right now to confirm) and it works fine. You may want to try 1.8.4 or 1.8.5 and see if you still are experiencing the problem, I really need to update my Windows system to the current Ruby release to test this. thanks for pointing this potential problem out Sean On 9/15/07, Lance Carlson wrote: > Hi all, > > Recently a user of my editor (Hamr) reported that while using ruby > 1.8.6 on windows, the close button would re-open the entire > application once and quit. I heard that 1.8.6 has had problems with > SOAP because it double posts. Is there something completely screwed up > in 1.8.6 or did I make a programming error? :) > > -TIA > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From sean.m.long at gmail.com Sat Sep 15 15:24:12 2007 From: sean.m.long at gmail.com (Sean Long) Date: Sat, 15 Sep 2007 12:24:12 -0700 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> Message-ID: Found the shortcut: type CMD-SHIFT-4, then SPACE and select the window you want to take a picture of. Sean > I'm using a dashboard widget called Screenshot Plus. There is also a > keyboard shortcut to capture the current window, but I always forget > it. > > Cheers, > > Gregor > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From lancecarlson at gmail.com Sat Sep 15 16:01:17 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Sat, 15 Sep 2007 16:01:17 -0400 Subject: [wxruby-users] Problems with 1.8.6 In-Reply-To: References: <49f64a900709150937m61c101b1o9e4918d51e36df6e@mail.gmail.com> Message-ID: <49f64a900709151301r2586abdcs274021b18b18d6e3@mail.gmail.com> I wasn't experiencing any problems on my system (Ubuntu with ruby 1.8.5) and so I figured it was a 1.8.5 problem (I also run wxruby preview 0.0.40) On 9/15/07, Sean Long wrote: > What version of wxRuby are you using when getting this problem? Please > update to the 1.9.1 release and see if the problem is still present. > > I believe I am still using 1.8.4 on my windows machine (not at that > machine right now to confirm) and it works fine. You may want to try > 1.8.4 or 1.8.5 and see if you still are experiencing the problem, I > really need to update my Windows system to the current Ruby release to > test this. > > > thanks for pointing this potential problem out > > Sean > > On 9/15/07, Lance Carlson wrote: > > Hi all, > > > > Recently a user of my editor (Hamr) reported that while using ruby > > 1.8.6 on windows, the close button would re-open the entire > > application once and quit. I heard that 1.8.6 has had problems with > > SOAP because it double posts. Is there something completely screwed up > > in 1.8.6 or did I make a programming error? :) > > > > -TIA > > _______________________________________________ > > 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 > From chauk.mean at gmail.com Sat Sep 15 16:27:13 2007 From: chauk.mean at gmail.com (Chauk-Mean P) Date: Sat, 15 Sep 2007 22:27:13 +0200 Subject: [wxruby-users] wxRuby 1.9.1 and id accessor consistency problem Message-ID: Hi all, wxRuby 1.9.1 introduced great Rubish style accessors (x.label as a synonym for x.get_label). I just found that get_id has no corresponding Rubish style id accessor. For a CheckListBox or a StaticText (I haven't checked for other kind of controls), id just returns the Ruby object_id. This is very confusing and not consistent with other accessors. Chauk-Mean. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070915/1a0cd313/attachment.html From lancecarlson at gmail.com Sat Sep 15 20:09:52 2007 From: lancecarlson at gmail.com (Lance Carlson) Date: Sat, 15 Sep 2007 20:09:52 -0400 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: References: <46E799D1.8070208@pressure.to> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> Message-ID: <49f64a900709151709t73545e47s12faf026e6002348@mail.gmail.com> I was under the assumption that wxruby2-preview was the later release because it said wxruby2 haha... I guess this is not the case and 1.9.1 will continue to be the latest ? If this is true then somehow the wxruby2 release should be deprecated from the site to discourage users from downloading it. On 9/15/07, Sean Long wrote: > Found the shortcut: type CMD-SHIFT-4, then SPACE and select the window > you want to take a picture of. > > Sean > > > I'm using a dashboard widget called Screenshot Plus. There is also a > > keyboard shortcut to capture the current window, but I always forget > > it. > > > > Cheers, > > > > Gregor > > _______________________________________________ > > 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 > From bureaux.sebastien at neuf.fr Sun Sep 16 05:50:09 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Sun, 16 Sep 2007 11:50:09 +0200 Subject: [wxruby-users] evt_close Message-ID: <000501c7f846$f86d2490$0201a8c0@SN111194970311> Salut Alex. Quand j'utilise: evt_close() {|event| on_sortie} def on_sortie @fich1 = nil end dans mon application, ?a d?sactive compl?tement la fermeture. Pourquoi? J'aimerai pouvoir cr?er un ?venement ? la fermeture de mon application, quand je la ferme avec window manager, qui pourrait me permettre d'initialiser ma variable. Quel est la chose que je ne fait pas correctement? A quand un livre complet sur wxruby? merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070916/33cd2021/attachment.html From alex at pressure.to Sun Sep 16 13:13:16 2007 From: alex at pressure.to (Alex Fenton) Date: Sun, 16 Sep 2007 18:13:16 +0100 Subject: [wxruby-users] wxRuby 1.9.1 and id accessor consistency problem In-Reply-To: References: Message-ID: <46ED642C.5050302@pressure.to> Chauk-Mean P wrote: > wxRuby 1.9.1 introduced great Rubish style accessors (x.label as a > synonym for x.get_label). > I just found that get_id has no corresponding Rubish style id accessor. > > For a CheckListBox or a StaticText (I haven't checked for other kind > of controls), id just returns the Ruby object_id. > This is very confusing and not consistent with other accessors. It's because Ruby defines the deprecated method Object#id that we didn't make it a nice accessor for wxRuby. But instead of Wx::Window#get_id you can use the method wx_id. Probably need to update the documentation on this point; sorry for the confusion. alex From alex at pressure.to Sun Sep 16 13:41:03 2007 From: alex at pressure.to (Alex Fenton) Date: Sun, 16 Sep 2007 18:41:03 +0100 Subject: [wxruby-users] evt_close In-Reply-To: <000501c7f846$f86d2490$0201a8c0@SN111194970311> References: <000501c7f846$f86d2490$0201a8c0@SN111194970311> Message-ID: <46ED6AAF.7050300@pressure.to> Sebastien wrote: [when using the following code...] > evt_close() {|event| on_sortie} > def on_sortie > @fich1 = nil > end > > dans mon application, ?a d?sactive compl?tement la fermeture. Pourquoi? [...this completely disactivates closing the application - why?] Br?vement, tu dois tu servir de 'event.skip' dans on_sortie: evt_close { | event | on_sortie(event) } def on_sortie(event) @fich1 = nil event.skip end event.skip() dit ? wxRuby de continuer et faire ce qu'il aurait fait - en ce cas, fermer le Frame. Il est dessin? comme ca pour qu'on puisse bloquer des evenements - par exemple, si on veut demander si un fichier devrait enregistr? avant la fermeture. [ Basically, you have to call event.skip in the event handling method on_sortie. event.skip tells wxRuby to continue and process the event as it would have done - in this case, close the Frame. It's designed like this so one can block events - for example, to ask if a file should be saved before closing a window. > A quand un livre complet sur wxruby? [When might there be a book on wxRuby?] Peut-?tre, apr?s nous avons fini wxRuby 2.0! [Maybe, after we have finished wxRuby 2.0] alex From chauk.mean at gmail.com Sun Sep 16 16:52:32 2007 From: chauk.mean at gmail.com (Chauk-Mean P) Date: Sun, 16 Sep 2007 22:52:32 +0200 Subject: [wxruby-users] wxRuby 1.9.1 and id accessor consistency problem In-Reply-To: References: Message-ID: *Alex Fenton* wrote : >It's because Ruby defines the deprecated method Object#id that we didn't >make it a nice accessor for wxRuby. But instead of Wx::Window#get_id you >can use the method wx_id. wx_id is almost as long typing as get_id :-) I thought that Object#id has been made obsolete in favor of Object#object_id because id is generally used by as an "application id". This is exactly the case for wxRuby, id means wxRuby id not the object_id. Consequently, I don't think there is a problem to define an id accessor may be at Wx::Window level. > >Probably need to update the documentation on this point; > In any case, this would be a good idea. Chauk-Mean. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070916/354cd07e/attachment.html From alec at arlross.demon.co.uk Mon Sep 17 06:00:19 2007 From: alec at arlross.demon.co.uk (Alec Ross) Date: Mon, 17 Sep 2007 11:00:19 +0100 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> <49f64a900709140952q2e1f0e1el2853b870d7fe728b@mail.gmail.com> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> Message-ID: For me, on XP, its: Ctrl + Alt + Prt Screen // window w/focus Ctrl + Prt Screen // entire screen I too forget these;( But I do remember that it is some such combination, involving Prt Screen, and get the required one by experiment, whenever wanted. Alec In message , Sean Long writes >Found the shortcut: type CMD-SHIFT-4, then SPACE and select the window >you want to take a picture of. > >Sean > >> I'm using a dashboard widget called Screenshot Plus. There is also a >> keyboard shortcut to capture the current window, but I always forget >> it. >> >> Cheers, >> >> Gregor >> _______________________________________________ >> 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 -- Alec Ross From sean.m.long at gmail.com Tue Sep 18 03:41:43 2007 From: sean.m.long at gmail.com (Sean Long) Date: Tue, 18 Sep 2007 00:41:43 -0700 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709140948p794910e5t76c58d4f69d39278@mail.gmail.com> Message-ID: Gregor, Just uploaded the pics you provided. Thanks Sean On 9/14/07, Gregor Schmidt wrote: > Hi, > > I'm not sure if somebody already answered. So I compiled the desired > screenshots for OS X (10.4). Unfortunately the Scintilla sample does > not work on my machine, so this screenshot is missing. > > Feel free to use the others for any purpose. > > Cheers, > > Gregor > > On 9/12/07, Alex Fenton wrote: > > Hi > > > > I've added a page to the wiki to show some screenshots opf the wxRuby > > samples: > > > > http://wxruby.rubyforge.org/wiki/wiki.pl?ScreenShots > > > > I'd like to get some screenshots for OS X to add to this, if anyone > > could supply them please. It would be nice to show the minimal sample > > for all three platforms, plus perhaps some of the ones that aren't > > included there. > > > > Also if you have a wxRuby app that you'd like to mention and show off on > > the website, drop me a line > > > > cheers > > alex > > _______________________________________________ > > 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 > > From alec at arlross.demon.co.uk Tue Sep 18 05:53:39 2007 From: alec at arlross.demon.co.uk (Alec Ross) Date: Tue, 18 Sep 2007 10:53:39 +0100 Subject: [wxruby-users] installation on i586-linux [was: wxRuby 1.9.1, wxSugar 0.1.17] In-Reply-To: <46E648A7.8010705@pressure.to> References: <46E648A7.8010705@pressure.to> Message-ID: In message <46E648A7.8010705 at pressure.to>, Alex Fenton writes ... >gem install wxruby > Great. Many, many thanks to yourself and all involved. FWIW, I've just, in the last min, installed it on an i586-linux box. The nearest option being i686-linux. I hope that this will be ok, and that nothing has been compiled assuming any instructions not available on a 586. If this is expected to be ok, perhaps the install menu might reassure the reader by including 586 as well? Anyway, thanks again. Regards, Alec -- Alec Ross From alec at arlross.demon.co.uk Tue Sep 18 06:23:45 2007 From: alec at arlross.demon.co.uk (Alec Ross) Date: Tue, 18 Sep 2007 11:23:45 +0100 Subject: [wxruby-users] Installation and use question (linux) [was installation ... ] Message-ID: ... >... >>gem install wxruby >> >Great. Many, many thanks to yourself and all involved. > >FWIW, I've just, in the last min, installed it on an i586-linux box. >The nearest option being i686-linux. Another newbie question from me, I'm afraid. The gem installs reported successful install; but I can't find wxruby. (Using 'find /' with -name, -ilname etc.) So what more do I need to do? I ran the gem install from my home directory, and expected that perhaps I'd need to add path(s). But obviously I need to do something(s) else and/or differently. TIA for any help. Regards, Alec -- Alec Ross From alex at pressure.to Tue Sep 18 06:32:31 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 18 Sep 2007 11:32:31 +0100 Subject: [wxruby-users] Installation and use question (linux) [was installation ... ] In-Reply-To: References: Message-ID: <46EFA93F.6040104@pressure.to> Alec Ross wrote: > ... > >... > >>gem install wxruby > >> > >Great. Many, many thanks to yourself and all involved. > > > >FWIW, I've just, in the last min, installed it on an i586-linux box. > >The nearest option being i686-linux. > I don't think this should be a problem, but I'm not sure. The names of the gems are automatically generated and they can cause problems if they are changed. I make the linux gems on Ubuntu 7.4 and if someone could tell me how to get it make i386-linux or similar I'd be happy to do that. > Another newbie question from me, I'm afraid. The gem installs reported > successful install; but I can't find wxruby. (Using 'find /' with > -name, -ilname etc.) So what more do I need to do? I ran the gem > install from my home directory, and expected that perhaps I'd need to > add path(s). But obviously I need to do something(s) else and/or > differently. wxRuby's library and samples will be installed in path/to/ruby/lib/ruby/1.8/gems/wxruby-1.9.1/ eg /usr/local/lib/ruby/... You don't need to add these paths anywhere. As with any library being used from a gem, you need to tell ruby to allow libraries to be loaded by rubygems. There are several ways to do this, but briefly, you can do it on the command line: ruby -rubygems my_wxruby_script.rb or at the start of the ruby script, before you load wx require 'rubygems' require 'wx' hth alex From alec at arlross.demon.co.uk Tue Sep 18 06:46:58 2007 From: alec at arlross.demon.co.uk (Alec Ross) Date: Tue, 18 Sep 2007 11:46:58 +0100 Subject: [wxruby-users] Installation and use question (linux) [was installation ... ] In-Reply-To: <46EFA93F.6040104@pressure.to> References: <46EFA93F.6040104@pressure.to> Message-ID: In message <46EFA93F.6040104 at pressure.to>, Alex Fenton writes >Alec Ross wrote: ... [snip v. clear and useful advice] Many thanks for your help (and patience), Alex Alec -- Alec Ross From alec at arlross.demon.co.uk Tue Sep 18 08:36:02 2007 From: alec at arlross.demon.co.uk (Alec Ross) Date: Tue, 18 Sep 2007 13:36:02 +0100 Subject: [wxruby-users] Installation and use question (linux) [was installation ... ] In-Reply-To: <46EFA93F.6040104@pressure.to> References: <46EFA93F.6040104@pressure.to> Message-ID: <0gMh2pNyY87GFw+o@arlross.demon.co.uk> ... >wxRuby's library and samples will be installed in >path/to/ruby/lib/ruby/1.8/gems/wxruby-1.9.1/ eg /usr/local/lib/ruby/... Or, in my case, subdirectories of /usr/lib/ruby/gems/1.8/gems/wxruby-1.9.1-i686-linux/samples/ , on openSUSE 10.2 (In case this helps another SuSE user.) Tks again, Alec -- Alec Ross From chauk.mean at gmail.com Thu Sep 20 05:08:00 2007 From: chauk.mean at gmail.com (Chauk-Mean P) Date: Thu, 20 Sep 2007 11:08:00 +0200 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events Message-ID: Hi all, Here is an excerpt of code (with the new syntax from upcoming wxRuby 1.9.2) : evt_checklistbox(my_checklist, :on_checklistbox) evt_listbox(my_checklist, :on_listbox) evt_listbox(my_list, :on_listbox) def on_checklistbox(event) checklist = event.event_object # puts "listbox - event : item[#{event.int}] checked : #{event.checked?}" puts "listbox - event : item[#{event.selection}] checked : #{checklist.checked?(event.selection)}" end def on_listbox(event) puts "listbox - event : item[#{event.selection}] '#{event.string}' - selected : #{event.selection?}" end my_checklist is a CheckListBox and my_list is a ListBox. - Trouble 1 : When I select AND when I unselect an item in my_checklist or my_list, the on_listbox is called and displays : - the index (through event.selection) and the text (through event.string) of the item both when the item is selected AND when the item is unselected. - one can know if an item is actually selected through the event.selection? (or is_selection) call. This is fine and this is what I expect but the wxRuby documentation states that : "CommandEvent#get_selection Integer get_selection() Returns item index for a listbox or choice selection event (not valid for a deselection). CommandEvent#get_string String get_string() Returns item string for a listbox or choice selection event (not valid for a deselection)." => Question : The documentation contradicts the actual behaviour which I find correct. Is the documentation incorrect ? - Troubles 2 & 3 : When I check and when I uncheck an item in my_checklist, the on_checklistbox is called and displays : - the index (through event.int or event.selection) of the item that is checked or unchecked. - event.checked? doesn't tell whether the item is checked or not (see the ommented line). I had to go through the CheckListBox object and calls checked? with the index (see the uncommented line). => Question : The wxRuby documentation states that : "CommandEvent#get_int Integer get_int() Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox." Are int and selection synonyms or is one of them is the normal way for accessing the index of a checked/unchecked item from a CheckListBox ? Again the doc is not clear as int is expected to work only for a selection and not the deselection. => Other question : Is there a bug that makes checked? not working for an event of CheckListBox ? Sorry for this long post. Cheers. Chauk-Mean. From alex at pressure.to Thu Sep 20 07:29:14 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 20 Sep 2007 12:29:14 +0100 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events In-Reply-To: References: Message-ID: <46F2598A.3080209@pressure.to> Chauk-Mean P wrote: ... > the wxRuby documentation states that : > "CommandEvent#get_selection > Integer get_selection() > Returns item index for a listbox or choice selection event (not valid > for a deselection). > ... > The documentation contradicts the actual behaviour which I find correct. > Is the documentation incorrect ? > On Win32 I see the same as you, ie the desirable behaviour that these work whether it's a selection or a deselection, and also whether multiple selections are permitted (see the doc for get_extra_long). But the current wxWidgets documentation [1] still has the statement about GetSelection and GetString being invalid for deselections. I don't know whether this is a wxWidgets doc error, or a warning that this is not guaranteed across platforms. Which have you tested on? > - event.checked? doesn't tell whether the item is checked or not > (see the ommented line). I had to go through the CheckListBox object > and calls checked? with the index (see the uncommented line). > I took a look at the way wxWidgets implements this, and CommandEvent#is_checked is only meant to work with (a single) CheckBox - it will not work with a CheckListBox. To be fair, the docs do state this, but rather subtly. So for a CheckListBox it must be done by calling the Window's checked? method, as you have done. > Are int and selection synonyms or is one of them is the normal way for > accessing the index of a checked/unchecked item from a CheckListBox ? > Again the doc is not clear as int is expected to work only for a > selection and not the deselection. > Yes, they are synonyms and the C++ methods do the same thing internally. I would be inclined to deprecate one but I find both names a bit inadequate, since get_selection may be returning the id of an item being checked or unchecked, not selected. The is_selection method does disambiguate these correctly though. As with much of the docs we inherited from Wx it's doubtless comprehensive and mostly accurate but also a bit short on the overall picture for each class. Happily it's easy to patch the wxRuby docs... alex [1] http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html#wxcommandeventgetselection From chauk.mean at gmail.com Thu Sep 20 08:03:59 2007 From: chauk.mean at gmail.com (Chauk-Mean P) Date: Thu, 20 Sep 2007 14:03:59 +0200 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events In-Reply-To: <46F2598A.3080209@pressure.to> References: <46F2598A.3080209@pressure.to> Message-ID: 2007/9/20, Alex Fenton : > Chauk-Mean P wrote: > > ... > > the wxRuby documentation states that : > > "CommandEvent#get_selection > > Integer get_selection() > > Returns item index for a listbox or choice selection event (not valid > > for a deselection). > > > ... > > The documentation contradicts the actual behaviour which I find correct. > > Is the documentation incorrect ? > > > On Win32 I see the same as you, ie the desirable behaviour that these > work whether it's a selection or a deselection, and also whether > multiple selections are permitted (see the doc for get_extra_long). I don't understand the added value of get_extra_long as is_selection gives the same information. > > But the current wxWidgets documentation [1] still has the statement > about GetSelection and GetString being invalid for deselections. I don't > know whether this is a wxWidgets doc error, or a warning that this is > not guaranteed across platforms. Which have you tested on? I understand. I'm running on Win32. > > - event.checked? doesn't tell whether the item is checked or not > > (see the ommented line). I had to go through the CheckListBox object > > and calls checked? with the index (see the uncommented line). > > > I took a look at the way wxWidgets implements this, and > CommandEvent#is_checked is only meant to work with (a single) CheckBox - > it will not work with a CheckListBox. To be fair, the docs do state > this, but rather subtly. So for a CheckListBox it must be done by > calling the Window's checked? method, as you have done. OK even if it's a pity :-). > > Are int and selection synonyms or is one of them is the normal way for > > accessing the index of a checked/unchecked item from a CheckListBox ? > > Again the doc is not clear as int is expected to work only for a > > selection and not the deselection. > > > Yes, they are synonyms and the C++ methods do the same thing internally. OK. > I would be inclined to deprecate one but I find both names a bit > inadequate, since get_selection may be returning the id of an item being > checked or unchecked, not selected. The is_selection method does > disambiguate these correctly though. If agree. For a "selection event", selection is meaningful. For a "check event", both int and selection are not appropriate. I would propose to add the more general name index (get_index) which is both meaningful for a selection and a check. Thus, the same method may be used for the two kinds of event. selection and int methods may be kept for "compatibility reasons" with wxWidgets. > > As with much of the docs we inherited from Wx it's doubtless > comprehensive and mostly accurate but also a bit short on the overall > picture for each class. Happily it's easy to patch the wxRuby docs... It would be great if wxRuby doc clarifies these subtle things. Chauk-Mean. From alex at pressure.to Thu Sep 20 09:01:23 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 20 Sep 2007 14:01:23 +0100 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events In-Reply-To: References: <46F2598A.3080209@pressure.to> Message-ID: <46F26F23.6090508@pressure.to> Chauk-Mean P wrote: > 2007/9/20, Alex Fenton : > >> But the current wxWidgets documentation [1] still has the statement >> about GetSelection and GetString being invalid for deselections. I don't >> know whether this is a wxWidgets doc error, or a warning that this is >> not guaranteed across platforms. Which have you tested on? >> > > I understand. I'm running on Win32. > I'll try on Linux later, but don't have a OS X machine at the moment. >> I would be inclined to deprecate one but I find both names a bit >> inadequate, since get_selection may be returning the id of an item being >> checked or unchecked, not selected. The is_selection method does >> disambiguate these correctly though. >> > > If agree. For a "selection event", selection is meaningful. > For a "check event", both int and selection are not appropriate. > > I would propose to add the more general name index (get_index) which > is both meaningful for a selection and a check. Yes, that was my first thought for a name for such a method. > It would be great if wxRuby doc clarifies these subtle things. > It would. We do try and write overviews, eg the recently updated event handling one*. The focus of the small dev team is naturally enough on the core library right now; small contributions to the docs are thus really welcome. cheers alex * http://wxruby.rubyforge.org/svn/trunk/wxruby2/doc/textile/eventhandlingoverview.txtl From chauk.mean at gmail.com Thu Sep 20 09:50:48 2007 From: chauk.mean at gmail.com (Chauk-Mean P) Date: Thu, 20 Sep 2007 15:50:48 +0200 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events In-Reply-To: <46F26F23.6090508@pressure.to> References: <46F2598A.3080209@pressure.to> <46F26F23.6090508@pressure.to> Message-ID: 2007/9/20, Alex Fenton : > > It would be great if wxRuby doc clarifies these subtle things. > > > It would. We do try and write overviews, eg the recently updated event > handling one*. The focus of the small dev team is naturally enough on > the core library right now; small contributions to the docs are thus > really welcome. > I will be glad to contribute to the documentation. Can you give me a link to a HOW TO for contributing to the doc. Cheers. Chauk-Mean. From alex at pressure.to Thu Sep 20 10:33:01 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 20 Sep 2007 15:33:01 +0100 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events In-Reply-To: References: <46F2598A.3080209@pressure.to> <46F26F23.6090508@pressure.to> Message-ID: <46F2849D.5090805@pressure.to> Chauk-Mean P wrote: > I will be glad to contribute to the documentation. > Can you give me a link to a HOW TO for contributing to the doc. > Thank you. I quickly put together this page: http://wxruby.rubyforge.org/wiki/wiki.pl?DocumentingWxRuby Alex From alex at pressure.to Thu Sep 20 17:57:50 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 20 Sep 2007 22:57:50 +0100 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events In-Reply-To: References: <46F2598A.3080209@pressure.to> Message-ID: <46F2ECDE.6040807@pressure.to> Chauk-Mean P wrote: > 2007/9/20, Alex Fenton : > >> But the current wxWidgets documentation [1] still has the statement >> about GetSelection and GetString being invalid for deselections. I don't >> know whether this is a wxWidgets doc error, or a warning that this is >> not guaranteed across platforms. Which have you tested on? >> > > I understand. I'm running on Win32. > I just tried this out on Linux/GTK and indeed get_selection and get_string are empty when it's a deselection event. So wxWidget's docs are correct and you shouldn't rely on this working if you want to use this cross-platform. Also committed the get_index alias to core alex From chauk.mean at gmail.com Thu Sep 20 18:26:01 2007 From: chauk.mean at gmail.com (Chauk-Mean P) Date: Fri, 21 Sep 2007 00:26:01 +0200 Subject: [wxruby-users] Troubles with ListBox and CheckListBox events In-Reply-To: <46F2ECDE.6040807@pressure.to> References: <46F2598A.3080209@pressure.to> <46F2ECDE.6040807@pressure.to> Message-ID: 2007/9/20, Alex Fenton : > > I just tried this out on Linux/GTK and indeed get_selection and > get_string are empty when it's a deselection event. So wxWidget's docs > are correct and you shouldn't rely on this working if you want to use > this cross-platform. > Thanks for the information. > Also committed the get_index alias to core That's great. Chauk-Mean. From sean.m.long at gmail.com Tue Sep 25 19:27:07 2007 From: sean.m.long at gmail.com (Sean Long) Date: Tue, 25 Sep 2007 16:27:07 -0700 Subject: [wxruby-users] screenshots & wxruby apps In-Reply-To: <49f64a900709151709t73545e47s12faf026e6002348@mail.gmail.com> References: <46E799D1.8070208@pressure.to> <2a50c7540709141013na289790ha7f6b5414fb4a680@mail.gmail.com> <2a50c7540709141029jadeab3ei40ce39b65a91838e@mail.gmail.com> <2a50c7540709141033r3d7ce173jb3b935b52628b3c6@mail.gmail.com> <2a50c7540709141034q538f8b96yba0454ac59e4c433@mail.gmail.com> <2a50c7540709150002u20acccb4t6c802ee3a4cb1c94@mail.gmail.com> <2a50c7540709150003r33d000endc7f106ddc24395e@mail.gmail.com> <49f64a900709151709t73545e47s12faf026e6002348@mail.gmail.com> Message-ID: The old wxruby2-preview gems are no longer listed when using the gem command, thanks for pointing this confusion out. Sean On 9/15/07, Lance Carlson wrote: > I was under the assumption that wxruby2-preview was the later release > because it said wxruby2 haha... I guess this is not the case and 1.9.1 > will continue to be the latest ? If this is true then somehow the > wxruby2 release should be deprecated from the site to discourage users > from downloading it. > > On 9/15/07, Sean Long wrote: > > Found the shortcut: type CMD-SHIFT-4, then SPACE and select the window > > you want to take a picture of. > > > > Sean > > > > > I'm using a dashboard widget called Screenshot Plus. There is also a > > > keyboard shortcut to capture the current window, but I always forget > > > it. > > > > > > Cheers, > > > > > > Gregor > > > _______________________________________________ > > > 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 > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >