• 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
IB 3.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IB 3.0


  • Subject: IB 3.0
  • From: Scott F Bayes <email@hidden>
  • Date: Sat, 10 Nov 2007 22:52:45 +0900

Hi all,

I've been going in circles for 2-3 hours now, trying to follow an old screensaver example from MacTech with Leopard's Xcode and IB instead of 2.x. I can get the screensaver portion working with no problem, but trying to build the config sheet in IB 3 has me in a lather. It's pretty clear to me how to accomplish the tasks in 2.x flavours of IB, but 3 has me at a standstill.

My screensaver class SoSView, comes straight off ScreenSaverView, started by creating a ScreenSaver project in Xcode 3. Because of this, there is not a pre-existing nib in the project.

I'm having a number of problems with the nib and IB:

- whether I add a new nib (or xib) to the project from Xcode, or start a new nib from IB and tell it to read the .h file, I can't seem to get IB to recognize SOSView. When starting from Xcode with File > New file, the green light comes on in the nib window in IB, SoS.xcodeproj is displayed next to the light, and clicking on it jumps me to the project in Xcode, but when I want to set any of my views' or windows' classes to SoSView, I can't see SoSView in the list, though many familiar NS classes do show up. File > Synchronize with Xcode from IB doesn't change the situation. My understanding from reading this list recently is that I need to dragon drop a control/view/window, then change its custom Class with the "i" tab of the inspector; is that correct?

- if I start my nib from Xcode, with File > New File > Interface Builder > Cocoa > nib > Application nib or Empty nib, the new nib joins the nib files group, and all seems hunky-dory, except for the above Custom Class problem. The green light comes on in IB. But if I start with New in IB and choose an Empty or Window template, I can't for the life of me seem to associate it with the Xcode project after that. File > Read Class Files... doesn't cause the green light to shine, though it processes the .h without comment or error. Nib Info panel shows N/A for Project name and Project folder; Save to the project dir doesn't change the situation. What's the magic?

- the old instructions say to set the class of File's Owner to your SSView sub-class, then CTL-drag from File's Owner to the window to connect the IBOutlet designated for the window. No Joy, no outlet available (of course, since File's Owner's class is still NSObject!). I've never had to deal with File's Owner before (well once, for a delegate). I assume that if I can ever get my custom class set for File's Owner, I'll be able to see the outlet from SoSView and connect it there, just as in 2.x. Does that sound right?

Anyway, this is a much steeper learning curve than I'd expected for IB, given that I've been working on another project with 2 windows, lots of panels, and dozens of controls for 6 mo. Seems like Apple might have wanted to create a doc "For experienced 2.x Xcode/IB users - how to accomplish the same things in Leopard". From the list traffic, I see that I'm not the only one struggling. The documentation for IB seems rather obtuse when viewed from the "experienced developer" POV: I had to skim through tons of "this is why nibs are used" and such like, hoping I wasn't missing useful stuff. The useful stuff (i.e. new stuff or new way of doing something, useful for existing developers) seems to have a density of about 20% in those initial chapters, which is why I think a condensed version for folks generally familiar with Xcode/IB development platforms and some of the theory behind them would be justifiable.

I think once I get past this rough patch, Im going to really like The Leopard's Way, coz all the pieces seem to be there, ready to work together. The brain just has to reconfigure a bit.

Hasta MaƱana,


ScottB_______________________________________________

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


  • Prev by Date: Re: NSView / Drag and Drop: Any API or constants to detect the start of a drag?
  • Next by Date: Sending events to other applications
  • Previous by thread: Trouble with NSURLCache
  • Next by thread: Sending events to other applications
  • Index(es):
    • Date
    • Thread