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 > category / subclass of a typedef enum

category / subclass of a typedef enum
Thread Tools
Gametes
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Aug 24, 2006, 10:50 AM
 
So, I am trying to create a subclass of NSCell. Trouble is, I can't use [cell setType:myType] because, even if I have a const int myType = 3, there is an existing definition for NSCellType

typedef enum _NSCellType {
NSNullCellType = 0,
NSTextCellType = 1,
NSImageCellType = 2
} NSCellType;

and the class automatically rejects types > 2. How can I create a category for NSCellType that includes types 3, 4, 5, etc ? should I just overwrite the declaration in my header? That seems rude though...
you are not your signature
     
Gametes  (op)
Mac Elite
Join Date: Sep 2000
Location: Norfolk, Va
Status: Offline
Reply With Quote
Aug 24, 2006, 10:53 AM
 
Nope, redeclaration of typedefs and enumerators is a definite compiler no-no.
you are not your signature
     
   
 
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 03:46 AM.
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.,