[MonoTouch] Still IntPtr Constructor issues

Rene Ruppert rene.ruppert at googlemail.com
Wed Dec 7 15:03:34 EST 2011


And there's one more thing I would like to add: If I put a breakpoint in SetSelected() of the cell I can see that it is called constantly (even for cells constructed without using the IntPtr) but the interesting thing is that the call stack is always pretty small and does not show where the call is coming from.
It contains these two lines and that's it:

MonoTouch.UIKit.UIApplication.Main (args={string[0]}, principalClassName="UIApplicationMain", delegateClassName="AppDelegateIPad") in 

/Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:29
Browser.Application.Main (args={string[0]}) in /Users/Krumelur/Documents/Develop/.../Main.cs:15

So something seems to trigger it magically.

René

Am 07.12.2011 um 20:55 schrieb Rene Ruppert:

> Hi,
> 
> I'm still struggling with the IntPtr Constructor issue I started on SO.
> I got a bit further meanwhile.
> 
> The case is: I'm subclassing UITableViewCell and do not provide the IntPtr:ctor.
> 
> By adding the ctor and breaking in there I figured out what ObjC wants my class to do: it is calling void SetSelected ( bool selected, bool animated ).
> 
> This means "something" wants to select my cell. I looked through my code and found exactly ONE place where I call SelectRow(). I commented that out and STILL it goes through the ctor and to SetSelected().
> 
> What are my options now? Does UITableViewCell maybe always require the IntPtr ctor?
> What could possibly still select a row in a UITableView besides SelectRow()?
> 
> René
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111207/de2d1df1/attachment.html 


More information about the MonoTouch mailing list