views:

70

answers:

1

How can I solve "cannot find interface declaration 'someEnumeration', superclass of 'interfaceName'" error?

What steps will reproduce the problem?

  1. Compiling Wsdl2ObjC

  2. Targeting groupwise.wsdl file

  3. Fixing non-valid file names of output csource code like ".h" + ".m" and objects inside source files

  4. Moving up one of the @interface BEFORE it was used futher in code!

What is the expected output? Something working

What do you see instead?

33 errors. "Inherited" from only 3 similar Inheritances of a typedef enum object by a class. All errors are typical:

typedef enum types_StatusTrackingOptions {
 types_StatusTrackingOptions_none = 0,
 types_StatusTrackingOptions_None,
 types_StatusTrackingOptions_Delivered,
 types_StatusTrackingOptions_DeliveredAndOpened,
 types_StatusTrackingOptions_All,
} types_StatusTrackingOptions;

types_StatusTrackingOptions types_StatusTrackingOptions_enumFromString(NSString *string);
NSString * types_StatusTrackingOptions_stringFromEnum(types_StatusTrackingOptions enumValue);
@interface types_StatusTracking : types_StatusTrackingOptions { ...

and here I'm having error "cannot find interface declaration for 'types_StatusTrackingOptions', superclass of 'types_StatusTracking'".

What version of the product are you using? On what operating system? Wsdl2ObjC - rev 168, OS - Mac OS X 10.6.2, iPhone SDK - 3.2, Simulator - v. 3.1.2 - 3.1.3, wsdl - for GroupWise v.8, NDK released 2008-12-23, wsdl and xsd files are attached.

P.S. GroupWise.wsdl + .xsd files could be downloaded from http://code.google.com/p/wsdl2objc/issues/detail?id=99

A: 

What are you (they?) trying to do? You cannot inherit from an enum. Only Objective-C classes can be inherited.

Perhaps you want composition instead of inheritance?

@interface types_StatusTracking : NSObject {
   types_StatusTrackingOptions options;
}
@property (assign) types_StatusTrackingOptions options;
...
@end
KennyTM
Thanks!I understood that Wsdl2ObjC converter and their respective authors made nonsense when was inheriting class from enum.Well, I'll try this, maybe this will work...
Paul V