Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax error in header file




On Apr 26, 2008, at 00:56, Ryan Chapman wrote:

I'm sure this is simple, but I'm new to Obj-C, so I can't figure it out.
I've modified the QuartzLines Cocoa project to test drawing lines as
flyweights. I've created a singleton factory called KCLineFactory that
stores an NSMutableDictionary of KCLine objects



I'm getting the following compiler error:

*/Users/ryan/Downloads/QuartzLines/KCLineFactory.h:20: error: syntax error
before 'KCLine'*

My guess is that KCLine.h also #imports KCLineFactory.h, so you get a circular reference type of situation. The fix for this is to remove #import "KCLine.h" and instead use @class KCLine.



-- Jens Ayton

Today, we celebrate the first glorious anniversary
of the Information Purification Directives.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden

This email sent to email@hidden
References: 
 >Syntax error in header file (From: "Ryan Chapman" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.