[Mono-osx] [MonoMac] Forget to call super?
Geoff Norton
gnorton at novell.com
Thu Jan 27 21:04:23 EST 2011
Ok I looked into this, its a 100% harmless cosmetic warning. Because of how we instantiate and keep proxy objects alive we basically end up doing this in this case:
[view alloc]
[view retain]
[view initWithFrame:]
NSView has a built in guard to make sure nothing is called before initWithFrame: so the fact that we retain it before that causes this warning to happen.
Its completely harmless, and I'll develop a workaround to retain in our trampolines after the super call, but its nothing to worry about in the interim.
-g
On 2011-01-17, at 2:11 AM, kjpou wrote:
> Miguel
>
> Here is a self-contained test case.
>
> It creates a custom view called BaseView.
>
> Actually while playing around with this it does not matter if initWithFrame method is defined or not.
>
> Hopefully it is just a case of me doing something wrong.
>
> Kenneth
>
> On 1/15/11 5:37 PM, Miguel de Icaza wrote:
>> Hello,
>>
>> Can you provide a self-contained test case?
>>
>> Miguel
>>
>> On Sat, Jan 15, 2011 at 2:59 AM, kjpou<kjpou at pt.lu> wrote:
>>> Hello everyone
>>>
>>> Whenever the NSView's initWithFrame method is called the following
>>> message is displayed:
>>>
>>> 2011-01-15 08:52:21.960 KeyFrameMoveAView[8246:613]
>>> KeyFrameView(0x613180) - NSView not correctly initialized. Did you
>>> forget to call super?
>>>
>>> Here is the definition:
>>>
>>> [Export("initWithFrame:")]
>>> public KeyFrameView(RectangleF frame) : base(frame)
>>> {
>>> // your code here
>>> }
>>>
>>> All the programs work without a problem but still get this message.
>>> Also noticed it brought up on IRC as well.
>>>
>>> Is the definition not correct or should we be using a different method?
>>>
>>> There is another one that gives the same message but can not remember
>>> the name right now.
>>>
>>> Kenneth
>>> _______________________________________________
>>> Mono-osx mailing list
>>> Mono-osx at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>>
> <CallSuper.zip>_______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
More information about the Mono-osx
mailing list