|
|
#1 |
|
Cocoa programming according to OSX Version
In Cocoa using Obj C programming"
I found some of the methods like NSFileManager's "createDirectoryAtPath:withIntermediateDirectories:attributes:error:" works only with OSX 10.5 and above. There are few other methods similar to that. In my application, I want to check the OSX Version and depending on the version, I want to implement the code accordingly. Is it possible to check the OSX version programatically and implement the code? |
|
|
|
0
|
|
|
#2 |
|
Well you have to build it against the appropriate SDK, why not just stick with the 10.4 methods?
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me |
|
|
|
0
|
|
|
#3 |
|
|
0
|
|
|
#4 | |
|
Quote:
I am planning to migrate from 10.4 to 10.5 and so if my code consists of functions that can be used directly that works on 10.5, it might work faster. |
||
|
|
0
|
|
|
#5 | |
|
Quote:
Also, functions such as the one you describe are added for ease of use and to improve functionality, not performance. Check the documentation. Unless Apple says that a method is deprecated. you can use it and be sure that it will work on the current system and at least in the next major revision of OS X. So, you can use "createDirectoryAtPath:attributes:error" without worrying about having to use one or another. This function will work on OS X 10.0 and later. It's best not to implement version-specific code until you really need to. If you really need to implement a function because it allows you to do something that otherwise you couldn't, then you should do it. Otherwise, you tend to break compatibility with earlier versions of OS X, and to restore it, you will need to write more error-prone code. Just a thought.
__________________
Oramind: Articles, reviews Techlology and Art
If you don't like it, program it. |
||
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Applescript with cocoa | Renmusxd | Mac Programming | 0 | Nov 16, 2010 11:06 PM |
| How much do i need to know to read cocoa programming for mac osx? | thekrazykid | Mac Programming | 1 | Jan 4, 2009 10:42 PM |
| Migration from OSX Version 10.4.11 to OSX Leopard Server | rjtmacturner | Mac OS X Server, Xserve, and Networking | 4 | Dec 2, 2008 11:11 AM |
| How to change IP address via cocoa program/ other program | KenLin | Mac Programming | 10 | Jul 5, 2007 05:04 AM |
| OSX versions of these Windows Programs? | Steve Jobless | Mac Basics and Help | 3 | Sep 25, 2006 09:52 PM |
All times are GMT -5. The time now is 10:03 AM.








Linear Mode

