What's New in 0.2.2
Introduction
The previous release - Release Notes - 0.2.1 - was primarily a compatibility release. There were a few improvements, but most of the updates in it were related to getting things working under Panther, and dealing with the related issues of coping with multiple, incompatible versions of libperl in common use.
This release is different, and includes a number of new features and additions that were previously only included in the 0.3-pre series of experiments, along with some things that are wholly new.
-
Seamless bridging of collection types
CamelBones now offers seamless, two-way bridging of Perl arrays with NSArray objects, and Perl hashes with NSDictionary objects. Cocoa functions and methods that take NSArray or NSDictionary objects as arguments can be passed references to their Perl equivalents instead. Similarly, Cocoa functions and methods that return NSArray or NSDictionary objects will now, if called in list context, return their Perl equivalents.
See Collections for more.
-
Better OO support for Cocoa structures
Cocoa NSPoint, NSRange, NSRect, and NSSize structures are now available from Perl as objects, with accessor methods providing an easy way to work with their components.
See Structs for more.
-
Support for Cocoa constants and global strings
Most global constants, enumerations, and strings are now exported to Perl as consts. What this means is no more searching for the correct numerical values to use in Objective-C header files, or writing little Objective-C programs that print the values of global strings.
-
Improved UTF-8 support for Panther/Perl 5.8
For recent enough Perls (i.e. 5.8.0 and above), CamelBones now has better support for Unicode text. All text is passed to and returned from Cocoa functions and methods as UTF-8 encoded Unicode.
-
Cleaner outlet declarations
Thanks to code contributed by Tom Insam, there is a cleaner new way to declare outlets and automatically generate accessor methods that work with them.
See Outlets for more.
-
Cleaner method declarations
Methods can now be declared using subroutine attributes instead of the less elegant older means of adding them to %OBJC_EXPORT.
-
NSString objects
NSString objects can now be treated as objects.
-
The usual suspects
Last but not least, there have been the usual round of miscellaneous bug fixes and documentation improvements. There has also been some major reorganization and clean-up of the source code.
