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: WebObjects 5.4 is out.



On Oct 26, 2007, at 4:18 PM, Art Isbell wrote:

Also, the use of Java generics in the API declarations in the WO 5.4 frameworks may generate lots of warnings in your custom WO 5.3 code.

Actually, the following statement refused to compile under WO 5.4 (error, not warning). This uses pure WO framework API, none of my custom API:


entity .setClassProperties (entity .classProperties ().arrayByAddingObjectsFromArray(entity.primaryKeyAttributes()));

The error: "The method arrayByAddingObjectsFromArray(NSArray<EOProperty>) in the type NSArray<EOProperty> is not applicable for the arguments (NSArray<EOAttribute>)". Say what?! An EOAttribute is an EOProperty!

	My workaround:

NSMutableArray<EOProperty> classProperties = entity.classProperties().mutableClone();
classProperties.addObjectsFromArray(entityL.primaryKeyAttributes());
entity.setClassProperties(classPropertiesL);


The cause of this compiler error has been confirmed to be a WO 5.4 bug related to an improper declaration involving Java generics. Genericizing one's code correctly can be tricky stuff, but I think that most of such bugs can be worked around until they're fixed.

Aloha,
Art

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

This email sent to email@hidden
References: 
 >WebObjects 5.4 is out. (From: Q <email@hidden>)
 >Re: WebObjects 5.4 is out. (From: Mike Schrag <email@hidden>)
 >Re: WebObjects 5.4 is out. (From: Simon McLean <email@hidden>)
 >Re: WebObjects 5.4 is out. (From: Mike Schrag <email@hidden>)
 >Re: WebObjects 5.4 is out. (From: Anjo Krank <email@hidden>)
 >Re: WebObjects 5.4 is out. (From: Mike Schrag <email@hidden>)
 >Re: WebObjects 5.4 is out. (From: Art Isbell <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.