Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Silly NSView Question (cocoa/xcode)

Silly NSView Question (cocoa/xcode)
Thread Tools
Warhaven
Dedicated MacNNer
Join Date: Jul 2002
Status: Offline
Reply With Quote
Mar 11, 2011, 05:29 PM
 
I can't figure out why my subclassed NSView isn't initializing. Clearly, I'm missing something. I created the class files and created an instance of it in Interface Builder. However, nothing's happening. I tried keeping it as simple possible just to test adding my own view, but no go...

CustomView.h:
Code:
#import <Cocoa/Cocoa.h> @interface CustomView : NSView { } @end
CustomView.m
Code:
#import "CustomView.h" @implementation CustomView - (void) awakeFromNib { NSLog(@"Hello!"); // Not seeing my Hello. :( } - (void) dealloc { [super dealloc]; } @end
     
Warhaven  (op)
Dedicated MacNNer
Join Date: Jul 2002
Status: Offline
Reply With Quote
Mar 11, 2011, 05:54 PM
 
Ok, now it's working. I reloaded all the class files in IB and that seemed to fix the problem. *shrug*
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:34 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,