• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom View initialization: where?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom View initialization: where?


  • Subject: Re: Custom View initialization: where?
  • From: Andy Lee <email@hidden>
  • Date: Fri, 2 May 2008 23:29:33 -0400

The doc I found says there are *two* ways a custom view is initialized. One uses initWithFrame:, the other doesn't. Are you sure your case is the first case? It sounds like it, but I thought I'd double-check.

<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/SubclassingNSView/chapter_6_section_2.html#//apple_ref/doc/uid/TP40002978-CH7-SW20 >
(see the last two paragraphs)


--Andy

On May 2, 2008, at 10:49 PM, Graham Cox wrote:

On 3 May 2008, at 12:34 pm, Markus Spoettl wrote:

The view is instantiated correctly because it draws right. When I put the debugger breakpoint in initWithFrame: it doesn't get called. Is there something wrong with this?


No, not that I can see. Maybe you aren't actually running in the debugger for some reason - try NSLogging from inside initWithFrame: instead to see if it's called.



- (id)initWithFrame:(NSRect)frame;


BTW: you don't need to declare methods in @interface that are inherited from the superclass.



G.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Custom View initialization: where? (From: Markus Spoettl <email@hidden>)
 >Re: Custom View initialization: where? (From: Graham Cox <email@hidden>)
 >Re: Custom View initialization: where? (From: Markus Spoettl <email@hidden>)
 >Re: Custom View initialization: where? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Custom View initialization: where?
  • Next by Date: Re: Custom View initialization: where?
  • Previous by thread: Re: Custom View initialization: where?
  • Next by thread: Re: Custom View initialization: where?
  • Index(es):
    • Date
    • Thread