cocoa - Replacing CMNewProfileSearch with non-deprecated, 64-bit code -
I have an existing code that uses CMNewProfileSearch , then change the color profile on that system Finding their names and full path. Unfortunately, CMNewProfileSearch is deprecated in Mac OS X 10.5 and 64-bit applications are unavailable while compiling.
The ColorSync Manager 2.5 reference to read, this new method is
- Is this true?
- Is there a way of coco to do this instead of I instead?
- Anyone got a sample code?
Thanks.
-
Yes, as you point out, the following says:
The CMNewProfileSearch function does not take full advantage of the search of customized search available with ColorSync version 2.5. Use CMIterateColorSyncFolder instead.
-
CMIterateColorSyncFolderis the official way to do this, apart from it, also the customized method is. -
From:
Edit: the NewCMProfileIterateUPP and DisposeCMProfileIterateUPP .
// the callback routine during a trip through the profile from the profile is modified with the details called // // static Osiar Profailitret (Simprofailitretdeta * Info, Records * Refton) {NSMUTABELARRA = ARR = (NSMUtABELRA * RAFFON; Profile * prof = [profile profile description data data: info]; If (professor) [array addObject: prof]; Return noir; } // Return an array of all profiles // + (NSArray *) array OphaFlofile {NSMutableArray * profs = [[NSMutableArray arrayWithCapacity: 0] retained]; CMIterateColorSyncFolder (ProfileInternet, Faucet, 0L, Profess); Return (NSARRA *) Profess; } It turns out that NewCMProfileIterateUPP and is not required DisposeCMProfileIterateUPP , therefore I can not tell anything not return Am Instead, that which can be defined with the signing of the callback function over profile matches Intet then you can send the callback function directly into the CMIterateColorSyncFolder .
I have tested my changes in Mac OS X 10.5, it works as expected.
Comments
Post a Comment