I find it hard to find some working examples of Cocoa/Carbon framework functions, whereas there are well documented function prototypes from Apple.
For example, LSOpenItemsWithRole function has well defined prototype, but I guess some examples would be a great help for a mac programming beginners like me.
How can I find some working examples for Cocoa/Carbon API? Doesn't Apple provide that? MSDN has good working examples, I expect similar thing from Apple.
You can find some sample code on Apple's developer site, and some of it can also be found within the Xcode documentation viewer. In fact in some cases, but probably not enough, you'll see links to sample code right at the bottom of the API documentation.
Related
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.
I'm a beginner in dojo. First of all is everything javascript based? For example to create a form I have to use JavaScript or HTML tags?
Also I cannot understand their documentation and tutorials. It's very confusing.
Is there a proper website (other then dojo itself) that has good tutorials?
You can use Dojo's components's (widgets) in two ways. Programmatic and declaritive. The programmatic way (what you are talking about) is by defining widgets through the use of javascript. With declaritive you can define them using HTML markup. David Walsh has a nice short writeup and if you search for "declaritive programmatic dojo" you'll find some questions and answers on the matter:
https://davidwalsh.name/dojo-widget
Difference between programmatically vs declaratively created widgets in dojo?
Declarative coding or programmatic coding in Dojo Projects?
Declarative or programatic approach in DOJO?
If you're having trouble with the tutorials on the Dojo website, i suspect you're better off, first diving into some basic beginner javascript tutorials before trying to learn a framework like Dojo. I concur with the comment Ferry made on your question, there are no better resources than the actual Dojo website. I recommend following every tutorial, starting with the Hello Dojo tutorial and working your way up so that you don't miss out on the basic concepts which you'll need when you read the harder tutorials. Good luck!
For your first question: dojo is javascript-based platform that provide you with a basic javascript library and a bunch of basic widgets (UI controls like button, dialogue, layouts,...), and some extra things. However, you don't really have to use dojo all the time: you still can use dojo to manipulate a html form button; it's just dojo button comes with extra functionalities and might save you some time.
For the second question, I agree with iH8 that dojo website is the best place to start. There are three different ways dojo websites can help you:
Look at the tutorial: Basic steps on how to set it up and use provided functionalities as-is
Look at thetoolkit api: This provides a very detailed view of dojo javascript object (See what extra things you can do with dojo objects)
Look at the nightlytest: I found this very helpful in term of showing me what can be done outside of the tutorial (i.e. how to use things you found in the api)
Other than these, you can look at existing implementation to learn about the toolkit.
Basically, this is how I am learning Dojo. Without more-specific questions, it's hard to tell what is confusing about the tutorial. I would recommend you give it a try and post a question: everyone here will be willing to help you.
I recommend starting with some video tutorial like this.
When you understand the concept, you can try to copy and paste some code from Dojo documentation tutorials or Reference Guide, because all books are out-of-date.
Also you may find some useful information on IBM-related sites like http://www.ibm.com/developerworks because IBM invested in Dojo and uses it for its products.
If you have enough resources ($) you can take participation in Workshops (sitepen.com/workshops)
I am just a beginner in Titanium and searching for few sample source code to learn from and run. Downloading and working with kitchen sink or with the API is a big pain, to understand as well as to work with.
Although everything is there in both and they have given sample but that seems like not an implementation. I just want to have some source code to learn how, when and where to use the elements? How things work, how are they integrated etc.
Usually at the Q&A section there are samples of code. Just search what you are looking for: http://developer.appcelerator.com/questions/newest
The Wiki provides examples: http://wiki.appcelerator.org/display/guides/Home
Even this website provides code samples, check out the Titanium Tag: https://stackoverflow.com/questions/tagged/titanium
And last, but not least, there seem to be more and more code samples in the API Docs: http://developer.appcelerator.com/apidoc/mobile/latest
Good luck!
As an option, you can find good application samples on CodeCanyon. They're not free but you can learn a lot by examining how to start from scratch to build an application like;
Simple Foursquare like apps
Photo gallery apps
TODO apps etc.
http://codecanyon.net/category/mobile/titanium
I found this Forging Titanium series on Vimeo.com to be one of the best. Just watch out this complete series. Beside providing you with basics and advanced limelight on elements and functionality, also provide link to many github public repository we can follow and get numerous sample codes.
Could anybody suggest a good open source (as in I can see the source, license irrelevant) webkit-sharp-based application? I've been wanting to jump into development with webkit-sharp and gtk-sharp, but I haven't found much of any documentation on webkit-sharp. I thought a good application example is as good as any documentation.
For anybody else that has this issue, a good application I just found is the sample app included with the source. For anybody answering, I didn't think about checking the source for samples when I posted this. The name of the sample is called FunnyBrowser.cs.
Here's mine:
https://github.com/dmulder/owa_browse
There don't seem to be many examples around of anyone using this. I've been looking through the docs at http://webkitgtk.org/reference/webkitgtk/stable to figure it out.
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.