PDA

View Full Version : API calls




Peebee
Aug 25, 2008, 07:31 AM
Hi all,

I'm new to this forum.
I'm here because I want to port one of my Windows applications to Mac OS X
It's the client side program of a remote admin program (www.remotepass.com) and I need all sorts of api calls to peek into the system.
I only bought a few books recently (Maxc OSX Internals and Cocoa programming for MAC OS X) but they don't help much :D
I don't know if this is the correct forum, but any help is appreciated.
I also need a MAC to write the software. :)
Is ther some guide available to select a Mac ?(for programming only)

thanks

Paul



liptonlover
Aug 25, 2008, 07:44 AM
I can't help you too much because I'm not the most experienced one here in any measure, but I can answer a few questions.

This is the correct part of the correct forum. Everyone here is very helpful and you'll get answers quickly.

You're going to need an intel mac. A laptop or mac-mini hooked up to a monitor will work, but if you can afford a bigger desktop computer the screen size is helpful. You'll probably have a lot of windows open, especially while you're learning.

I have a bazillion bookmarks for programming documents and websites. Here they all are:
http://www.cocoalab.com/
http://osx.hyperjeff.net/reference/CocoaArticles.php
http://www.cocoadev.com/
http://www.cocoadevcentral.com/
http://www.cocoabuilder.com/archive/bydate
http://www.stepwise.com/
https://developer.apple.com/mac/index.php
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
http://www.mac-developer-network.com/
http://theocacao.com/
http://www.macdevnet.com/index.php/articles/beginners
http://macapper.com/2007/09/16/guide-programming-cocoa/
http://www.cprogramming.com/
http://mitpress.mit.edu/sicp/full-text/book/book.html
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdMOM.html
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Layers.html#//apple_ref/doc/uid/TP40006082
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/Domains.html
http://developer.apple.com/documentation/Cocoa/Conceptual/AppFileMgmt/Tasks/UsingASavePanel.html#//apple_ref/doc/uid/20000774
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/CoreAnimation_Cookbook/Articles/Drawing.html
https://developer.apple.com/documentation/cocoa/conceptual/objectivec/objc.pdf
http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/Archiving.html
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/chapter_1_section_1.html#//apple_ref/doc/uid/TP30001163-CH1-SW2

More specific things you may want to try is cocoalab's becomeanxcoder tutorial... it's the first link in the list above. Their tutorial is great and assumes you have no programming knowledge so anyone can use it. It's a little outdated but not too hard to figure out the differences.
I don't remember where to register but there's the cocoa-dev developers mailing list. That's useful, just make sure you ask the right questions. They don't like C questions and stuff like that.
Google is one of your best friends. I have trouble finding information there, but I know it can be done because the people here usually answer my questions with a google search of theirs.

Good luck!
Nate

gnasher729
Aug 25, 2008, 07:46 AM
Is ther some guide available to select a Mac ?(for programming only)

You can basically pick an Macintosh that is being sold today. They all have plenty of power for any software development that you would be doing. You can download the complete MacOS X software development tools from Apple, start at developer.apple.com.

You might look at a MacMini for the lowest cost if you have a keyboard and monitor available to have the lowest possible cost. I would probably recommend a MacBook; you can attach a monitor that you have as a second monitor, and you can go for the cheapest model then buy RAM and a bigger harddrive elsewhere to get a very powerful machine. That way it is also very suitable to run both MacOS X and Windows and/or Linux, either by dual-booting or by running them simultaneously.

Cromulent
Aug 25, 2008, 08:01 AM
I have a bazillion bookmarks for programming documents and websites.

That's nothing :).

Peebee
Aug 25, 2008, 08:28 AM
That's a lot to read !
I'm not even sure which programming language to use.
In Windows, I mostly use Delphi which is true RAD and OOP.
Cocoa uses objective-C and that's a completely different approach.
I thinks it's gonna take a while before I make my final desision ...

Thanks,

Paul

lee1210
Aug 25, 2008, 09:23 AM
That's a lot to read !
I'm not even sure which programming language to use.
In Windows, I mostly use Delphi which is true RAD and OOP.
Cocoa uses objective-C and that's a completely different approach.
I thinks it's gonna take a while before I make my final desision ...

Thanks,

Paul

If you want to write a modern OS X application, there is not much of a decision. You'll have to use Objective-C/Cocoa for at least the GUI part of the app. There is a bridge for Python now, so that is also an option, though you'll still probably need to touch a little Objective-C.

Other than the GUI, you can use whatever you'd like for the backend as long as you can link it with Objective-C. That could be plain C, C++, Fortran, Java via JNI, and I'm sure quite a few others that I am not familiar with. But again, if you are needing to get into the guts of OS X (not just the BSD-like, POSIX-y part) you'll have to do it with Cocoa.

The other option is Carbon using C/C++, but this API is quickly falling by the wayside, so it would really be best to just start with Cocoa now.

-Lee

P.S. With Interface Builder you do have a lot of "visual" control over the GUI design and connections, and XCode provides a decent editor and good integration with the compilers used and Interface Builder. I don't know if there's an official definition of RAD (What's rapid, exactly?), but Objective-C is definitely an Object-Oriented language, and Cocoa is built around that.

liptonlover
Aug 25, 2008, 10:13 AM
I did have more... but I weeded out a lot that I don't use as much.

If you're from an OOP background already, ObjC shouldn't be too hard for you to learn... I got into it from BASIC. (Which I still regret having learned...)

Can you really get deep into the system with just ObjC and Cocoa? I thought that always required you to be a hacker pretty much...

Peebee
Aug 25, 2008, 11:06 AM
If you want to write a modern OS X application, there is not much of a decision. You'll have to use Objective-C/Cocoa for at least the GUI part of the app. There is a bridge for Python now, so that is also an option, though you'll still probably need to touch a little Objective-C.

Other than the GUI, you can use whatever you'd like for the backend as long as you can link it with Objective-C. That could be plain C, C++, Fortran, Java via JNI, and I'm sure quite a few others that I am not familiar with. But again, if you are needing to get into the guts of OS X (not just the BSD-like, POSIX-y part) you'll have to do it with Cocoa.

The other option is Carbon using C/C++, but this API is quickly falling by the wayside, so it would really be best to just start with Cocoa now.

-Lee

P.S. With Interface Builder you do have a lot of "visual" control over the GUI design and connections, and XCode provides a decent editor and good integration with the compilers used and Interface Builder. I don't know if there's an official definition of RAD (What's rapid, exactly?), but Objective-C is definitely an Object-Oriented language, and Cocoa is built around that.


There are alternatives though and there's one that interest me besides cocoa: FreePascal.
You can compile applications for all operating systems with it.
Interfacing wit C calls is no problem.
This way, I could port the program to other operating systems also (Linux and Solaris)

As for RAD, I don't expect any language to be the same as Delphi as it is Ultra-RAD. You have thousands of components available and you can write your own without problems. You can get a full GUI application that connects to an Oracle DB with all detailed table views in a few minutes.

But this all is irrelevant here and I need a decision to make ...
Most important is to know all OS-specific api calls to set/change/contol the OS and I hope that this is the best place to find this information.

Thanks,

Paul

Cromulent
Aug 25, 2008, 01:45 PM
Most important is to know all OS-specific api calls to set/change/contol the OS and I hope that this is the best place to find this information.

The best place for that information is http://developer.apple.com/mac/ to be honest. While I'm sure people here would be only too happy to help out with specific problems, teaching the entirety of Mac OS X's APIs to you might be a little more than most members are prepared to do :).