NSAttributedString returns a tuple, not an NSAttributedString
Michael Thon <[email protected]>
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
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 ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev