Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 29, 2007, 04:43 AM   #1
satyam90
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
Access controls in NSView

Hi, I am using Cocoa with Obj-C on XCode 2.4.1
I have a 4 views (with different controls in each of the view) added to NIB and accessing it through Controller. I am able to show different views whenever toolbar buttons are clicked.
I want to set the controls with some default values at the time of showing the view. For setting these controls in views, apart from awakeFromNib & windowDidLoad what are the other methods where I can set the controls. Will there be anything like constructor for view? How to set?

satya.
satyam90 is offline   0 Reply With Quote
Old Nov 29, 2007, 05:07 AM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
NSViews are initialized via the initWithFrame: method. They get called awakeFromNib if they are loaded from a nib, but you can't always rely on that, so use initWithFrame.
kainjow is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting 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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Rotate a NSView and make it's origin point starts from the bottom left corner smokyonion Mac Programming 2 May 25, 2011 01:33 PM
How would I access a label on another view controller? KiranPanesar iPhone/iPad Programming 11 Apr 19, 2011 10:15 AM
How to draw line in NSView? Sergio10 Mac Programming 4 Apr 10, 2009 11:36 AM
Mouse Events in NSView Chandhu Mac Programming 2 Feb 28, 2008 04:09 AM
Airport Printer help, access control. SpaceMagic Mac Peripherals 1 Oct 10, 2005 02:57 PM


All times are GMT -5. The time now is 04:06 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC