AMTourky / CocoaBindingDryView-ReusableViews

A view of type DryView allows to have as many views (and nested views) using cocoa binding without code at all
Apache License 2.0
5 stars 0 forks source link

Trying to implement in a PreferencePane, won't run. #2

Open Lord-Kamina opened 7 years ago

Lord-Kamina commented 7 years ago

I was trying to use the DRYViews in a Prefpane, but I just can't get it to work, and haven't even been able to debug it because apparently the issue is way too early to even get to any breakpoints.

This is all I've got to go by:

2017-02-08 10:46:53.112 System Preferences[1282:13045] -[SwiftDefaultApps.DRYView initWithBundle:]: unrecognized selector sent to instance 0x60000018f7d0 2017-02-08 10:46:53.112 System Preferences[1282:13045] [NSPrefPaneBundle instantiatePrefPaneObject] (/Users/Koji/Library/PreferencePanes/SwiftDefaultApps.prefpane): error occurred during instantiation.

Lord-Kamina commented 7 years ago

Actually nevermind this, I had just forgotten to update the PrincpalClass in my Info.plist. I blame the lack of caffeine.

Anyway, I wonder about that other issue I opened...

Lord-Kamina commented 7 years ago

Reopening... it turns out, it runs if I set NSPreferencePane as the owner and main class. If I use a custom class inheriting from NSPreferencePane, I get the error.

That is, of course, unless I remove DryView.swift from the project, so clearly there is a connection here.

Lord-Kamina commented 7 years ago

Jeez this is kinda frustrating and makes no fucking sense. It appears the error is triggered by "DryViews.swift" being above my main file in the Build Phases "Compile Sources" step.

kristate commented 6 years ago

@Lord-Kamina wow thanks! you saved me some headaches here on a completely different project. (Found this via Google)