Can anyone help me with the correct process for taking the generated macOS project in Fire to being a document based app using storyboards please? I’ve gone round in circles trying to figure this out and not making much headway.
My only experience in doing this before Fire is in Xcode, where it generate all the basic artefacts needed for a document based app. As such there may be better way’s to think about this so happy to hear if so!
it should be pretty straight-forward and work basically the same as it would in an Xcode project — you’ll create a descendant from NSDocument where you implement the right methods to read/write your project, along with a view, and then all you need to do is register that in the Info.plist.
Examples from Fire itself:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>sln</string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>com.remobjects.fire.sln</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>Project-Icon-White</string>
<key>CFBundleTypeName</key>
<string>Fire Solution</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSTypeIsPackage</key>
<integer>0</integer>
<key>NSDocumentClass</key>
<string>SolutionDocument</string>
</dict>
...
``
where SolutionDocument is the NSDocument Descendant class I implemented, and where I overrode these two methods:
Thanks Marc, as always! Would be good to see an example that doesn’t use storyboards to achieve the document model Apple implement. Might help me piece together what’s going on under all these artefacts!
Deleted my question as on reflection I didn’t think it was fair to ask you. One of my biggest challenges with the Apple ecosystem is it’s not transparent how much of the routing and behaviours happen in an app.
Trying to find out why now, in the example provided, we don’t get the click on window title to bring down the save as panel.