Hi This is a very small patch that seems to solve that "Exit the app and get a segfault in return" problem. Another thing: bigdemo.rb:395 does item = event.get_item() if item.is_ok but get_item typemaps TreeItemId into a plain integer, so it doesn''t have is_ok method anymore, is there any wxruby2''yish solution to this kind of problem ? A.K. In case attachment gets scrubbed somewhere along the way: Index: fixdeleting.rb ==================================================================--- fixdeleting.rb (revision 889) +++ fixdeleting.rb (working copy) @@ -21,6 +21,7 @@ if(core_name == "App") found_app_constructor = false + wx_name = core_name else found_app_constructor = true end -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wx2.patch Url: http://rubyforge.org/pipermail/wxruby-development/attachments/20070317/bd536f80/attachment.pl
Artur Kuptel wrote:> This is a very small patch that seems to solve that "Exit the app and > get a segfault in return" problem.Thanks very much for the patch - waiting while it recompiles (50 mins...yawn) then will commit> Another thing: bigdemo.rb:395 does > item = event.get_item() > if item.is_ok > but get_item typemaps TreeItemId into a plain integer, so it doesn''t > have is_ok method anymore, is there > any wxruby2''yish solution to this kind of problem ?The recommeded in wxruby2 is just if not item.zero? # or if item > 0 We switched to using a plain Integer typemap for TreeItemId in 0.0.39 because it didn''t seem worth having directors et al for such a simple class. Guess I missed this bit of the sample, thanks for spotting it.> In case attachment gets scrubbed somewhere along the way:Attachments are permitted on this list cheers alex
Alex Fenton wrote:> Thanks very much for the patch - waiting while it recompiles (50 > mins...yawn) then will commit >I miss the days when I could ask swig to remove at least it''s runtime from the generated sources .> The recommeded in wxruby2 is just > > if not item.zero? > # or > if item > 0 > > We switched to using a plain Integer typemap for TreeItemId in 0.0.39 > because it didn''t seem worth having directors et al for such a simple > class. Guess I missed this bit of the sample, thanks for spotting it. >Problem would be solved if we could define singleton methods for Fixnums :) A.K.
Artur Kuptel wrote:> Alex Fenton wrote: > >> Thanks very much for the patch - waiting while it recompiles (50 >> mins...yawn) then will commit >> >> > I miss the days when I could ask swig to remove at least it''s runtime > from the generated sources . >Ah - so this isn''t possible any longer with current SWIG? I''ve seen it mentioned in the docs and had hoped we could take this approach in the near future to reduce the compile time and size of the binary. a
Alex Fenton wrote:> Ah - so this isn''t possible any longer with current SWIG? I''ve seen it > mentioned in the docs and had hoped we could take this approach in the > near future to reduce the compile time and size of the binary. > > a >Sadly -c/-noruntime option was removed some time ago, only thing that''s left from those good times is ''swig -ruby -external-runtime'', which sadly isn''t very helpful. I even thought about writing some preprocessor script to remove most of the runtime from .cpp files and writing a glue for generated files but doing it right would require a bit of time, which is unobtainable at the moment. A.K.
Artur Kuptel wrote:> Hi > This is a very small patch that seems to solve that "Exit the app and > get a segfault in return" problem.That''s worked a treat - committed, thanks. For info I''m still getting one in the grid and caret samples. I will investigate further but the error I''m getting (OS X 10.3 PPC) is: Program received signal EXC_BAD_ACCESS, Could not access memory. 0x030f0a4c in free_wxGridCellBoolRenderer(wxGridCellBoolRenderer*) () a
Maybe Matching Threads
- [1070] trunk/wxruby2/swig/fixdeleting.rb: Remove old, now unused, fixdeleting script
- [890] branches/wxruby2/wxwidgets_282/swig/fixdeleting.rb: Fix crash on exit (Artur Kuptel)
- [1017] trunk/wxruby2/Changelog: Update changelog with 0.0.40 changes
- [887] branches/wxruby2/wxwidgets_282/swig/fixdeleting.rb: Deleting fix for specific Director classes (Artur Kuptel)
- [835] trunk/wxruby2/doc/textile: Updated documentation about TreeItemId