gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Base additions on iOS 4?


From: Richard Frith-Macdonald
Subject: Re: Base additions on iOS 4?
Date: Thu, 10 Feb 2011 08:39:54 +0000

On 8 Feb 2011, at 19:21, David Wetzel wrote:

> 
> Am 08.02.2011 um 02:13 schrieb Richard Frith-Macdonald:
>> I looked at your example, and the first thing I noticed (since it's near the 
>> start) was the +initialize method.
>> I understand that NSMapTable is not available in iOS (though looking at the 
>> OSX10.6 documentation I don't see where it's deprecated from 10.6 on as your 
>> comment says),
> 
> 
> http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html
> 
> NSMapTable
> (...)
> Availability
>       • Available in Mac OS X v10.0 through Mac OS X v10.4.
> 
> For Mac OS X v10.5 and later there is a NSMapTable class.
> But it does not exist on iOS.

Ah, I thought you meant that the class was deprecated in 10.6
Glad to hear it isn't.


>> and I can see why you replace it with an NSMutableDictionary, but your code 
>> then goes on to do a load of calls like:
>> [attrNames setObject:(void*)@"XML_ATTRIBUTE_CDATA"  
>> forKey:(void*)XML_ATTRIBUTE_CDATA];
> 
> good catch. in the same file I use:
> 
>      [nodeNames setObject:(void*)@"XML_ELEMENT_NODE" 
>                    forKey:[NSNumber numberWithInt:XML_ATTRIBUTE_CDATA]];
> 
> which should be the way to do it, right?

Yes, being careful to wrap integers in NSInteger objects lists you keep them in 
dictionaries.

>> As you are presumably (by my standards at least) an iOS expert, having 
>> ported to it, can you please let me know:
>> a. how to get gnustep-make on a snow-leopard system to target the iOS 
>> Foundation rather than the Cocoa Foundation or,
>> b. if you only used xcode, do you know what options we might need to add to 
>> gnustep-make to target iOS?
> 
> 
> I just created a new XCode project for iOS and copied the files from the GS 
> base into the project.
> My plan was not to run gnustep-make but just to keep the source files in sync 
> (not to fork them).
> So that I can just update -base and copy the new code into the XCode project.
> 
> On iOS, you cannot make your own frameworks or shared libs because every app 
> is change rooted.
> You have your own file system tree where you are stuck in.
> 
> So what I am doing is to create static libs which are linked into the final 
> app.

That's a shame I was hoping we would be able to get gnustep-make to 
cross-compile testcases for iOS, and then execute them inside the iPhone 
emulator, so that we could easily verify the actual behavior of classes in the  
Apple iOS implementation in the same way that we can for Foundation classes in 
OSX.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]