[AD] [ alleg-Bugs-2380931 ] Deprecation warnings (OS X)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #2380931, was opened at 2008-12-03 03:39
Message generated for change (Settings changed) made by eglebbk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2380931&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Mac OSX
Group: 4.9
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Evert Glebbeek (eglebbk)
Assigned to: Nobody/Anonymous (nobody)
Summary: Deprecation warnings (OS X)

Initial Comment:
When compiling src/macosx/main.m and src/macosx/hidman.m, a warning similar to this one is generated:

warning: ‘lossyCString’ is deprecated (declared at /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:346)

This is apparently deprecated from 10.4 onward. At the moment, Allegro supports 10.3+. There are two alternatives listed on http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instm/NSString/lossyCString:
cStringUsingEncoding (10.4+)
dataUsingEncoding:allowLossyConversion (10.0+)
The former seems easier to work with, but we'd then need to keep the call to lossyCString for 10.3.

----------------------------------------------------------------------

>Comment By: Evert Glebbeek (eglebbk)
Date: 2009-03-15 00:07

Message:
Now uses UTF8 internally, so use UTF8String instead.

----------------------------------------------------------------------

Comment By: Evert Glebbeek (eglebbk)
Date: 2009-03-15 00:07

Message:
Now uses UTF8 internally, so use UTF8String instead.

----------------------------------------------------------------------

Comment By: Peter Wang (tjaden)
Date: 2008-12-05 01:03

Message:
File Added: nothing

----------------------------------------------------------------------

Comment By: Peter Hull (peterhull90)
Date: 2008-12-04 22:46

Message:
I've used dataUsingEncoding:allowLossyConversion as that seems to be the
only way to do a lossy conversion. Actually the uses of lossyCString in
hidman.m will disappear anyway. The use in main.m is to handle the case
where the user double clicks a file that is associated with an Allegro app.
It patches in the filename to argv[1]. However, what encoding should we use
there - ASCII or UTF-8? Does all of allegro work with UTF-8? Is it OK that
argv is (I think) supposed to be ascii?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2380931&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/