[Wxruby-development] Fix for crash at exit

Alex Fenton
Sat, 17 Mar 2007 23:03:16 -0000

> 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