Error importing NSOutlineViewDataSource in PyObjC code

Discussion in 'Mac Programming' started by cjcaufield, Feb 28, 2009.

  1. macrumors newbie

    Joined:
    Feb 28, 2009
    #1
    Hi everyone, first post. :)

    I'm having a problem importing NSOutlineViewDataSource in a Python Cocoa application. The problem is easily reproduced by creating a new Python Cocoa application (document based), and adding the following to main.py just before AppHelper.runEventLoop():

    from AppKit import NSOutlineViewDataSource

    The error I get is:

    Traceback (most recent call last):
    File "/Users/colin/Desktop/Untitled/build/Debug/Untitled.app/Contents/Resources/main.py", line 19, in <module>
    from AppKit import NSOutlineViewDataSource
    ImportError: cannot import name NSOutlineViewDataSource

    Anyone know what the deal is? Thanks.
     
  2. thread starter macrumors newbie

    Joined:
    Feb 28, 2009
    #2
    Forgot to mention, my machine is running 10.5.6 and, as far as I know, everything is up to date.
     
  3. macrumors member

    Joined:
    Sep 17, 2008
    #3
    You can't import it and you don't need to import it.
     
  4. thread starter macrumors newbie

    Joined:
    Feb 28, 2009
  5. macrumors regular

    Joined:
    Oct 15, 2007
    #5
  6. thread starter macrumors newbie

    Joined:
    Feb 28, 2009

Share This Page