+ Reply
Results 1 to 5 of 5
  1. #1
    JLA
    JLA is offline
    Developer
    Join Date
    Oct 2007
    Posts
    224
    Thanks
    1
    Thanked 31 Times in 24 Posts

    Default ObjectiveC 2.0 support - toolchain?

    Does the toolchain GCC (specifically one compiled last November) support ObjectiveC 2.0 (e.g. the @property tag)?
    When compiling, I get a "Leopard only" warning...
    JLA

  2. #2
    Green Apple
    Join Date
    Sep 2007
    Posts
    43
    Thanks
    0
    Thanked 12 Times in 6 Posts

    No. Rather the iphone OS released so far does not support ObjC 2.0 (it's a half way point between Tiger and Leopard.) It sounds like the SDK beta 2.0 is ObjC 2.0 without garbage collection.

  3. #3
    JLA
    JLA is offline
    Developer
    Join Date
    Oct 2007
    Posts
    224
    Thanks
    1
    Thanked 31 Times in 24 Posts

    Thanks...but deg gommit...
    It seems that without garbage collection, ObjC2.0 is a glorified set of macros...
    I wish there were some way that properties could be parsed by a compiler and converted into the traditional ObjC1.0 methods behind the scenes.

  4. #4
    Green Apple
    Join Date
    Sep 2007
    Posts
    43
    Thanks
    0
    Thanked 12 Times in 6 Posts

    Huh, not sure what you mean. Preference/plist files can be loaded direct to dictionaries. I'm confused by your properties / ObjC comments.

  5. #5
    JLA
    JLA is offline
    Developer
    Join Date
    Oct 2007
    Posts
    224
    Thanks
    1
    Thanked 31 Times in 24 Posts

    I mean as far as I see it, the parts of ObjC that are new to 2.0 that I use are similar to macro...they don't offer much new functionality, but rather save time.

    Code:
    @property(retain, readwrite) NSObject* exampleProperty;
    ----
    @synthesize exampleProperty=myVariable;
    is (I assume) just like plugging in the code:
    Code:
    - (void) setExampleProperty: (NSObject*) aValue
    {
    [aValue retain];
    [myVariable release];
    myVariable=aValue;
    }
    
    -(NSObject*) exampleProperty
    {
    return myVariable;
    }
    Now I'm sure they do more stuff behind the scenes (serialization perhaps?), but I just wish an entire different runtime wasn't required. Would it be possible to implement the objC_setProperty(...) [etc] method to enable this behavior?
    Last edited by JLA; 04-11-2008 at 08:26 PM. Reason: grammar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts