How do I create an IMServicePlugin on OS X? No documentation on file structure - objective-c

Apple has provided good documentation on the protocols for IMServicePlugin.framework, but provides literally zero documentation on how this is compiled, in what format, what keys for the services plist are what, etc. Has anyone had experience with this? If so, are you aware of any documentation on the subject?

Apple has a sample plugin that implements IRC, you can find it here. I know that it says that it's legacy, but that's the only sample code you'll find I'm afraid.
If you want to build one from scratch, it's actually quite "simple": In Xcode, create a new project and select Bundle, link against the IMServicePlugIn.framework and make sure that your Principal Class conforms to the IMServicePlugIn. Then, well, do whatever you need to do. When in doubt about anything, the documentation is pretty extensive (but it seems like you've already found out about that).

Related

Need some explanation about interface in LibreOffice basic

I need to program something in LibreOffice Basic, but I've never done that before. I just have the basis in python, so it's really new for me.
I didn't find any recent documentation, so I'm reading the basic guide from 2010.
But there is a point I really don't understand, They speak about various interface but I don't succeed to understand their interest and when I should call it.
If you can explain it I would love it.
Thank you !
Don't go deeper, no need. To write working code in Basic, you do not need additional information - you just need to know the list of methods of each object, no more. Which interface provided this method to the object shouldn't bother you.
See chapter 3.6.4. Interfaces in Pitonyak's book. The list of available methods is easy to obtain using the MRI or Xray tool extension. MRI is convenient in that after an in-depth study of the object, you immediately get a piece of code ready for use.
(Unfortunately, this extension works extremely unstable with the latest versions of LibreOffice)
Update Video on YouTube
Python is very good when working with LibreOffice. See http://christopher5106.github.io/office/2015/12/06/openoffice-libreoffice-automate-your-office-tasks-with-python-macros.html.
You'll still need MRI or XrayTool and Pitonyak's book as explained by #JohnSUN. Also you'll want APSO and a reference such as https://wiki.openoffice.org/wiki/Python/Transfer_from_Basic_to_Python.
For a single small project though, Basic may be better as there are more examples available.

Where can I find up-to-date documentation about the WCF Web API?

I've been strugling with WCF to do REST the way I want it to work. And apparently so has quite a few others. I've heard about the WCF Web Api project, but wrongly dismissed it without looking too closely at it. Sadly, now that I'm looking at it I find that the documentation is rather outdated. Like, this blog post has some nice information, but classes have changed, parameters have changed, in short, design has changed.
So I've been using an old example of how to plug in Json.NET (newtonsoft) as my serializier, only to realize that after I had it working, it wouldn't work for my IErrorHandler. Further I had a problem with how to Deserialize a string from the uri template to an operation Type parameter.
It appears however that I should be able to solve these two problems (and presumably many others that I haven't stumbled over yet) by using the media formatter extension point and what's referred to as Processor<..>s in outdated documentation, which is now HttpOperationHandler<..>s unless I've missunderstood.
My problem is rather basic, I can't figure out how to correctly configure my IIS-hosted app to use my operation handler, assuming I've implemented it correctly. Since it feels rather dumb to ask for instructions on such a basic thing, I'll rather ask where I can find some documentation on how to do this sort of thing? (Explanations are welcome of course.)
I'm not after seing which classes exist, or what their methods are named with what parameters. I can see all that in my object browser. I need documentation for the overall design, and/or examples implicitly describing things like:
How do the different classes in the API fit together?
How can I configure from web.config?
Must I rather do a custom HttpServiceHostFactory?
What and how are you meant to use the framework?
How should I extend to reach what sort of goals?
How should I configure to place the extensions in effect?
From the lack of answers I assume the documentation quite simply isn't ready.
I was looking for it on the codeplex site under the Documentation tab, and found outdated stuff.
However, after familiarizing myself a bit with Codeplex I found out that the good stuff was in this Discussion section. Searching a bit in there helped a lot to be honest.
Concerning config-file configuration, I didn't find anything, so I'm assuming this will be added as the last thing before official release. Meaning I'll use the HttpConfiguration in a custom HttpServiceHostFactory for now.
The trick about the HttpOperationHandlers was twofold: Firstly I was throwing an exception in my operation and hadn't implemented a global HttpErrorHandler yet. (Doh!) Secondly I didn't know that the parameter name of HttpOperationHandler<..>.OnHandle had to match the name of the operation parameter.

Xcode 4 built-in help for your own files

Xcode 4 has a very nice built-in help/documentation that you can access e.g. by alt-clicking an identifier in the code, or by opening the help panel in the right sidebar. However, this only works for classes and methods provided by Apple. Is there a way to write some kind of documentation comments (e.g. like the Javadoc comments in Java) in your own code to make Xcode display them in those documentation panels?
http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/HeaderDoc/intro/intro.html
It's maintained by Apple so it should be well supported. I never actually used it, may try it later.
Ok, it looks like there's no good tool really... there are a few different ones, but they're imperfect and difficult to configure. I couldn't get Doxygen or Appledoc to work, and the tool mentioned by Avizzv92 is referred to as "a pile of poo" elsewhere, so I'd rather not try it... :)
Info that I've found:
How do you document your source code in Xcode?
http://wangling.me/2010/07/documentation-set-generation-tool-in-xcode-is-wanted/
http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
http://www.gentlebytes.com/home/appledocapp/
http://lists.apple.com/archives/xcode-users/2011/Apr/msg00238.html

GNUstep NSString.m file

I'm using GNUstep to begin with learning Objective-C.
I could find the header files for all, but don't know where to find its implementation files.
I was thinking, with that I can understand the whole programming style and many more.
I am working without mac , so if some body knows about any good tutorials , that i can use to identify structure of every Classes.
For instance, i have to parse an xml file, just to learn,
but don't know where to start.
Without IDE its hard to find out the sequence, and I don't have got access to any tutorials that best explains this, ( all that i get is in accordance with i-Phone and Cocoa. )
I'm concentrating on console programs, so that I can be thorough with the syntax and language.
Pls help me.
http://gnustep.org/ is the best resource for GNUstep related information, including source and documentation.
GNUStep has some tutorials and definitely the source code available.
You will find that there are small bits and pieces where Cocoa has moved on so GNUStep will not recognize new methods and things like properties or any new objective-2.0 stuff and so on.
Where ever you have the source installed, you can find NSString.m here
/path_to_my_src/gnustep/modules/core/base/Source/NSString.m

Documentation for Objective C and Cocoa APIs?

Super-newbie question!
I've been looking for a list of all the classes that come with Objective-C and Cocoa but can't seem to find one.
Hoping that it has matching methods and syntax(?) as well.
Be gentle with me!
Thanks,
Spencer.
I would start here: http://developer.apple.com/referencelibrary/Cocoa/index.html
The system is broken up into frameworks, so you will not find a single listing. It depends on which frameworks you include with your project. good luck.
If you're using XCode, there's a documentation browser (Help -> Documentation) that's searchable. If you want to browse by classes you can also do so here. You might need to subscribe or download the documentation first though.
I'm finding this very convenient for iPhone development at least, since I can just type in a class or method name and get its documentation very quickly. YMMV for Mac OS X documentation though since I haven't used that at all.