Plugin writing in Swift
Posted: Sat Nov 11, 2017 10:36 am
Soooo... I decided to learn Swift by taking and converting the Sample plugin. So far so good because the plugin is loading and the methods are being called. The bad news is that I obviously suck at programming in Swift so I'm able to wipe DVDPedia out pretty much at will.
Ok, to get to the point of this post, perhaps there is a way to pin Plugin development information in one post at the top of a forum? I was digging around to find information on debugging approaches (I've never debugged a plugin on Mac before) . Also, there are a lot of dead links to samples, probably because of the evolution of the API. Yet sometimes even old code may be useful. Actually, what may be even better is to have a github repository.
Best practices I'd like to have in the 'pinned post' if such happens are:
1.) In your debug copy of the app (DVDPedia in my case), remove all the plugins except for IMDB, Wikipedia, and whatever plugin is most useful for your locale. This cuts down on clutter.
2.) Make sure you build the example and run it under the debugger prior to working on your own plugin. This will illuminate you as to the requirements for debugging plugins on the Mac.
3.) Copy the script from the build phase titled 'Quit Copy Launch'. It will save you time and aggravation.
4.) Be very aware of any preconceived notions lingering from previous experiences you may have regarding plugin APIs. They will lead you astray.
In case anyone cares, after my initial brush, Swift strikes me as a complete mess of a language. Though, I do have to say that it is, from appearance only, less verbose than Objective-C, that lack of verbosity is only because the explosion of operators and weird syntactical constructs that exist in, I think, the interest of less typing...
Heh... Its probably the only thing where they have focused on function to the exclusion of form. I betcha Mr Ives had no idea. Otherwise it have been named 'Shiny' instead of Swift.
I'd hate to see the BNF for this strong typed but lazy language.
However, in case I'm only reacting because of my preconceived notions, I will stick with it. Knowing Apple, they are going to deprecate Objective-C at some point.
Yes, for all those who are wondering, without gainful occupation I have a great deal of time on my hands. Thats why I'm going through app comparisons, learning to fully exploit Devonthink and Tinderbox and now the Pedias, finally attempting to gain control of my library, sad attempts at writing humorous forum posts when I'm stuck waiting on something in one of the other projects, exploring new versions of old and favorite programming languages (Smalltalk!), and learning a couple of new ones: All at the same time.
Yay, its Veterans day. Wait.. its on a Saturday and I don't have a job anyways... Damn... I never seem to get to use my benefits.
Ok, to get to the point of this post, perhaps there is a way to pin Plugin development information in one post at the top of a forum? I was digging around to find information on debugging approaches (I've never debugged a plugin on Mac before) . Also, there are a lot of dead links to samples, probably because of the evolution of the API. Yet sometimes even old code may be useful. Actually, what may be even better is to have a github repository.
Best practices I'd like to have in the 'pinned post' if such happens are:
1.) In your debug copy of the app (DVDPedia in my case), remove all the plugins except for IMDB, Wikipedia, and whatever plugin is most useful for your locale. This cuts down on clutter.
2.) Make sure you build the example and run it under the debugger prior to working on your own plugin. This will illuminate you as to the requirements for debugging plugins on the Mac.
3.) Copy the script from the build phase titled 'Quit Copy Launch'. It will save you time and aggravation.
4.) Be very aware of any preconceived notions lingering from previous experiences you may have regarding plugin APIs. They will lead you astray.
In case anyone cares, after my initial brush, Swift strikes me as a complete mess of a language. Though, I do have to say that it is, from appearance only, less verbose than Objective-C, that lack of verbosity is only because the explosion of operators and weird syntactical constructs that exist in, I think, the interest of less typing...
Heh... Its probably the only thing where they have focused on function to the exclusion of form. I betcha Mr Ives had no idea. Otherwise it have been named 'Shiny' instead of Swift.
I'd hate to see the BNF for this strong typed but lazy language.
However, in case I'm only reacting because of my preconceived notions, I will stick with it. Knowing Apple, they are going to deprecate Objective-C at some point.
Yes, for all those who are wondering, without gainful occupation I have a great deal of time on my hands. Thats why I'm going through app comparisons, learning to fully exploit Devonthink and Tinderbox and now the Pedias, finally attempting to gain control of my library, sad attempts at writing humorous forum posts when I'm stuck waiting on something in one of the other projects, exploring new versions of old and favorite programming languages (Smalltalk!), and learning a couple of new ones: All at the same time.
Yay, its Veterans day. Wait.. its on a Saturday and I don't have a job anyways... Damn... I never seem to get to use my benefits.