robotools/defconAppKit

TestApp uses NibClassBuilder, dropped in XCode 4+

adrientetar opened this issue · 9 comments

TestApp uses NibClassBuilder, dropped in XCode 4+

@typemytype @typesupply @adrientetar any pointers on how to fix this?

The line just needed to be deleted. I just pushed a change that lets the app launch. Beyond launching, um, I don't know if it still works. I haven't touched this in years.

It's not that simple. I have recent versions of setuptools and pyobjc. The app compiles but crashes on launch, because NibClassBuilder is still referenced. Removing it allows the app to launch, but then it crashes later, upon opening a UFO. Traceback below. Doesn't seem like it has anything to do with nib loading though. I'll try to look into it.

Traceback (most recent call last):
  File "/TestApp/dist/DefconAppKitTest.app/Contents/Resources/DefconAppKitTest.py", line 35, in readFromFile_ofType_
    window = self.vanillaWindowController = DefconAppKitTestDocumentWindow(font)
  File "/TestApp/dist/DefconAppKitTest.app/Contents/Resources/DefconAppKitTest.py", line 82, in __init__
    deleteCallback=self.collectionViewDeleteCallback, selfDropSettings=selfDropSettings, selfApplicationDropSettings=dropSettings)
  File "defconAppKit/controls/glyphCollectionView.pyc", line 143, in __init__
  File "defconAppKit/controls/glyphCellView.pyc", line 90, in initWithFrame_cellRepresentationName_detailWindowClass_
AttributeError: 'super' object has no attribute 'initWithFrame_'

Try changing that line to:

self = super(DefconAppKitGlyphCellNSView, self).alloc().initWithFrame_(frame)

There was a time ages ago when PyObjC was kinda flaky about the alloc call. It could have been the last time I worked on this branch.

Replaced line 90 and now the error is:

AttributeError: 'super' object has no attribute 'alloc'

Good times!

(And people wonder why the next MetricsMachine isn't finished.)

This works:

self = DefconAppKitGlyphCellNSView.alloc().initWithFrame_(frame)

The app compiles and launches, but then it freezes when switching to the GlyphCollectionView or GlyphView tabs. The traceback is now this:

Traceback (most recent call last):
  File "defconAppKit/controls/glyphCellView.pyc", line 332, in drawRect_
  File "defcon/objects/base.pyc", line 338, in getRepresentation
TypeError: GlyphCellFactory() takes at least 4 arguments (5 given)

I'll keep digging and report back if I get stuck.

@miguelsousa Looking at this, I think the root cause here may be that you're using the UFO3 branch of defcon and not the UFO3 branch of defconAppKit.

@benkiel you're right, this last error is caused by that. Thanks!