[Pyobjc-dev] NSAttributedString returns a tuple, not an NSAttributedString
Brought to you by:
ronaldoussoren
From: Michael T. <mik...@gm...> - 2010-10-17 09:51:17
|
Hello - I am trying PyObjC for the first time and I discovered something that I don't understand. If I initialize an NSAttributedString like this: content = NSAttributedString.alloc().initWithPath_documentAttributes_(a_path, None) Then content contains a tuple, not an NSAttributedString. If I initialize is like this: content = NSAttributedString.alloc() a_tuple = content.initWithPath_documentAttributes_(a_path, None) Then content contains an attributed string from the contents of the file, and a_tuple contains a tuple. On the other hand NSAttributedString.alloc().init() returns an instance of NSAttributedString, as expected. So, apparently initWithPath_documentAttributes_() returns a tuple instead of an instance of NSAttributedString. My question is, is this by design (and thus, there is something about PyObjC that I don't understand) or is it a bug? Thanks Mike |