Notes on Porting New versions provide new features, but may have the unfortunate side-effect of breaking many existing applications. This document is intended to provide a step-by-step guide to updating your Swarm applications to use the latest version as quickly and painlessly as possible. This document contains detailed examples for porting versions equal to, or later than, Swarm 1.0.5. Users trying to port from versions earlier than 1.0.5, are advised to first view the compatibility section of the 1.0.5 swarmdocs. First perform those changes in sequence, (i.e. if you have apps compatible with Swarm 1.0.3 - first make the 1.0.3 => 1.0.4 changes, followed by the 1.0.4 => 1.0.5 changes) and then perform the changes described here. You may notice that some of the changes overlap as earlier versions may have merely deprecated some functionality, whilst later versions actually disabled it. This has been done to phase new functionality in, and old functionality out over several releases, so the user isn't hit with an enormous burden every minor release. We intend that most application changes should be covered, but given that we can never know in advance how a user has employed the software, we cannot guarantee that all potential application changes will be covered in the document explicitly. Key for changes:
|
The Arguments protocol has moved from the objectbase library to the defobj library. If you were subclassing from the Arguments class you will now need to subclass from Arguments_c and import the defobj.h header file.
The ListShuffler class has been moved from simtools to collections. You must now import collections.h. Alternatively you can use the new [beginPermuted: aZone] index creation method on a collection from the Collection protocol in place of the ListShuffler protocol.
The -setLabels:: and -setColors:: methods in the Histogram protocol now each must be given a new count: (unsigned)labelCount and count: (unsigned)colorCount argument, respectively. So, for example, the code formerly in MarketObserverSwarm.m in the market application was:
[useHisto setLabels: pred]; [useHisto setColors: predictorColors]; |
[useHisto setLabels: pred count: numPredictorsToShow]; [useHisto setColors: predictorColors count: numPredictorsToShow]; |