[Gtk-sharp-list] Custom CellRendererText problem help!

dabatla dabatla at gmail.com
Mon Oct 27 04:06:13 EDT 2008


Hi Christian, the problem only occurs when trying to call base.Render(...)
from a child class of CellRendererText. If I do the same thing with
CellRenderer, then it works! ?????

I really don't understand why this is giving problems.

I found that someone else posted the same problem at
http://lists.ximian.com/pipermail/gtk-sharp-list/2005-January/005301.html,
but this was in 2005. I couldn't find a bug posted in bugzilla about it, so
I would like to make sure that it really is a bug.

I'm only allowed to use the released version, 2.01 for windows :-(

any ideas? thanks


Christian Hoff wrote:
> 
> No idea what problem you're experiencing here; overriding Render in my 
> custom cell renderer(derived directly from Gtk.CellRenderer) worked. 
> Overriding Activate is known not to work, but I hopefully will get that 
> patch finished in my approaching holidays :-) .
> 
> What version of Gtk# are you using? It's always a good idea to update to 
> the latest version 2.12.2 or use SVN.
> 
> If the problem still occurs, please file a bug 
> report(www.mono-project.com/Bugs).
> 
> Christian
> 
> dabatla schrieb:
>>
>> When implementing the code below, I get the following exception : 
>> "Attempted to read or write protected memory. This is often an indication
>> that other memory is corrupt."
>>
>> Any ideas? any workarounds?
>>
>>
>> class MyCellRenderer : CellRendererText {
>> protected override void Render(Drawable window, Widget widget, Rectangle
>> background_area, Rectangle cell_area, Rectangle expose_area,
>> CellRendererState flags) {
>>          base.Render(window, widget, background_area, cell_area,
>> expose_area, flags);
>>          //This point is never reached for some reason?????
>>      }
>> }
> 
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-CellRendererText-problem-help%21-tp20148483p20183277.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list