# Undefined method 'end\_edit\_label' in Wx::TreeCtrl

**URL:** <https://www.ruby-forum.com/t/undefined-method-end-edit-label-in-wx-treectrl/149918>\
**Category:** wxRuby\
**Created:** [October 1, 2008, 6:52am UTC](https://www.ruby-forum.com/t/undefined-method-end-edit-label-in-wx-treectrl/149918 "2008-10-01T06:52:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zzhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7cd45c/32.png) [@zzhan](https://www.ruby-forum.com/u/zzhan)\
**Post date:** [October 1, 2008, 6:52am UTC](https://www.ruby-forum.com/t/undefined-method-end-edit-label-in-wx-treectrl/149918/1 "2008-10-01T06:52:14Z")

</div>

Hi,

Maybe a documentation update.

#\<NoMethodError: undefined method ‘end\_edit\_label’ for  
#Wx::TreeCtrl:0xb381da4\>

I raised the following issue (similar) before, sometimes a Wx::Rect  
object sometimes passed as an event. I found more occurrences, still  
quite rare though.

Env: wxRuby 1.9.8 mswin32 on XP.

Cheers,  
Zhimin

---

<div class="post-metadata">

**Author:** ![zzhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7cd45c/32.png) [@zzhan](https://www.ruby-forum.com/u/zzhan)\
**Post date:** [October 1, 2008, 7:51am UTC](https://www.ruby-forum.com/t/undefined-method-end-edit-label-in-wx-treectrl/149918/2 "2008-10-01T07:51:12Z")

</div>

Hi Zhimin

Zhimin Z. wrote:

> Maybe a documentation update.
> 
> #\<NoMethodError: undefined method ‘end\_edit\_label’ for  
> #Wx::TreeCtrl:0xb381da4\>

Thanks for the report - this method’s missing from our headers. This  
won’t be hard to fix. Looking at the wxWidgets code, it seems to be  
differently defined on different platforms, so I will take a closer look  
and try out. Filed here:

[http://rubyforge.org/tracker/index.php?func=detail&aid=22251&group\_id=35&atid=218](http://rubyforge.org/tracker/index.php?func=detail&aid=22251&group_id=35&atid=218)

> I raised the following issue (similar) before, sometimes a Wx::Rect  
> object sometimes passed as an event. I found more occurrences, still  
> quite rare though.
> 
> Env: wxRuby 1.9.8 mswin32 on XP.

I’m pretty sure this is a similar memory allocation problem. A C++  
pointer address is re-used before Ruby’s GC has run, and the old ruby  
object linked to that pointer address (the Rect) is being passed to the  
handler, instead of the new one (the Event).

Do you happen to know if this is a new error since 1.9.8?

thanks  
alex

---

<div class="post-metadata">

**Author:** ![zzhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7cd45c/32.png) [@zzhan](https://www.ruby-forum.com/u/zzhan)\
**Post date:** [October 2, 2008, 4:54am UTC](https://www.ruby-forum.com/t/undefined-method-end-edit-label-in-wx-treectrl/149918/3 "2008-10-02T04:54:12Z")

</div>

Hi Alex,

> Do you happen to know if this is a new error since 1.9.8?

I can’t remember seeing this error (Rect =\> Event) in previous versions  
used (1.9.4 - 1.9.6).

Regards,  
Zhimin
