3 ms·
What I wonder is: can this style of development be used with Interface Builder?
by FreakyT 12y ago
What I wonder is: can this style of development be used with Interface Builder?
- sjtrny 12y agoWhy would you want that? You can programmatically defibe your interface with Swift/objective-C. JavaScript feels like a step backwards to me.
- Alphasite_ 12y agoBecause defining constraints in code is more of a faff than just doing it visually? Its also more immediate since (as far as I know) Xcode doesn't support anyform for edit and continue outside of Playgrounds.
- fatboy 12y agoIt's been possible to develop AppleScript-ObjC applications using Xcode and Interface Builder for several years. I think you define properties in the AS code that Interface Builder recognises as IBOutlets to allow you to connect it all up, so I'd expect there to be a similar thing set up for the new JS stuff.
- thegaw 12y agoYes, you can! Which is totally cool. There is a sample app written in JS that uses Xcode. They have it set up with a main.js file, they use the same ObjC.registerSubclass to create an AppDelegate. Then they have .xib for the interface. You can make the same connections from IB to the JS as you're used to. If you have an Apple Developer account, you can download the sample project here https://developer.apple.com/wwdc/resources/sample-code https://developer.apple.com/wwdc/resources/sample-code It's listed under "JavaScript for Automation Cocoa Application"