Re: Quick Model of Framework
Re: Quick Model of Framework
- Subject: Re: Quick Model of Framework
- From: Andrew Pontious <email@hidden>
- Date: Fri, 13 May 2005 14:25:42 -0700
On May 13, 2005, at 1:33 PM, Tom Harrington wrote:
I'm seeing inconsistent results trying to get a "Quick Model" of
classes in a framework.
If I select, for example, Foundation or CoreData frameworks, no
problem. I get a quick model right away.
If I add AddressBook.framework to the project, no go. If I select it
and choose Quick Model, I get a blank class model.
What's the story? How can I get quick models of any Apple framework,
and why doesnt AddressBook work for me?
Short answer:
Add the line:
#include <AddressBook/AddressBook.h>
somewhere in your source code and save the file. (Note adding that
line to the pre-compiled header file (*.pch) isn't enough.)
You shouldn't even need to rebuild the project index, though that
can't hurt.
Now, make your class model of AddressBook.framework, and you'll see
your classes.
To test this, I added that line to the main.m file of a stock Cocoa
Application Xcode project, after I'd already added the framework to
the project. The classes showed up.
Long answer:
The Class Modeling Tool relies on the Xcode index for its
information, and the index relies on what's referred to in the source
code.
The reason Foundation/AppKit/CoreData work is because there is usually a
#include <Cocoa/Cocoa.h>
line around somewhere, and that umbrella header includes all the
above frameworks' umbrella headers.
A quick way to tell if the index knows about a framework's classes is
to look at the project-wide Class Browser, via the menu Project-
>Class Browser. If the classes don't show up there, they won't show
up in any class models for that project.
hope that helps,
-- Andrew Pontious
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden