Skip navigation.
 
mlNSMutableAttributedString's setBaseWritingDirection problem
FROM : Dmitry Markman
DATE : Sun Jun 15 22:57:12 2008

Hi, all

I have a problem with the NSMutableAttributedString's 
setBaseWritingDirection method

here is a code

        NSMutableAttributedString *attrString = [[[NSAttributedString 
alloc] initWithString:textString attributes:stringAttributes] 
autorelease];
        NSRange attrStringRange = NSMakeRange(0,[[attrString string] 
length]);
        @try {
            [attrString 
setBaseWritingDirection:NSWritingDirectionNatural
                                          range:attrStringRange];
        } @catch (NSException *exception) {
            NSLog(@"main: Caught %@: %@", [exception name], 
[exception  reason]);
        }
I'm getting exception
2008-06-15 16:39:06.465 Gateways[14812:10b] *** -
[NSConcreteAttributedString setBaseWritingDirection:range:]: 
unrecognized selector sent to instance 0x10248ab0

NSLog output is

2008-06-15 16:41:48.676 Gateways[14812:10b] main: Caught 
NSInvalidArgumentException: *** -[NSConcreteAttributedString 
setBaseWritingDirection:range:]: unrecognized selector sent to 
instance 0x10248ab0


I can see content of the attrString in the debugger - it looks ok
attrStringRange is ok too


compiler didn't get any warning about recognising selector

some settings of my project are

SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk
MACOSX_DEPLOYMENT_TARGET = 10.5


I have
Xcode 3.0
Mac OS X 10.5.3

thanks




Dmitry Markman

Related mailsAuthorDate
mlNSMutableAttributedString's setBaseWritingDirection problem Dmitry Markman Jun 15, 22:57
mlRe: NSMutableAttributedString's setBaseWritingDirection problem Ken Thomases Jun 15, 23:13
mlRe: NSMutableAttributedString's setBaseWritingDirection problem Dmitry Markman Jun 16, 00:01