RubyCocoa : DeprecatedStuff

Here is the list of APIs that have been deprecated in RubyCocoa.

The Symbol / Value / ... Messaging Syntax

When sending messages from Ruby to Objective-C, the symbol / value� syntax has been deprecated. A warning will now be printed each time you are using this syntax, and in the final release an exception will be thrown.

OSX::NSURL.alloc.initWithScheme('http', :host, 'www.apple.com', :path, '/macosx')  # BAD
OSX::NSURL.alloc.initWithScheme_host_path('http', 'www.apple.com', '/macosx')      # GOOD


As an alternative, we introduced a new method, objc_send:

OSX::NSURL.alloc.objc_send(:initWithScheme, 'http', :host, 'www.apple.com', :path, '/macosx')


Accessing Constants as Ruby Methods of the OSX Module

RubyCocoa now maps C constants as real Ruby constants of the OSX module, while before it was mapping them as Ruby methods. Trying to retrieve a constant by calling a method of the OSX module has been deprecated. A warning will now be printed each time you are using this syntax, and in the final release an exception will be thrown.

OSX.NSApp    # BAD
OSX.NSApp()  # BAD
OSX::NSApp   # GOOD


OSX.objc_symbol_to_obj

The OSX.objc_symbol_to_obj function has been obsoleted, because it was based on deprecated APIs and not used anymore in the project source code.

This method was there for historical reasons, and normally you should not need to use it. If you do, you will have to find a replacement.

String#nsenconding, String#to_nsstring and String#to_nsmutablestring

These methods have been deprecated, users should call #to_ns instead.
© 2001-2007 The RubyCocoa Project. Powered by Wikka Wakka Wiki 1.1.6.3
SourceForge.net Logo
Page was generated in 0.1545 seconds