• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

I want to learn how to program an extension of control panel...

olePigeon

68040
OK, so, I know very little programming.  I took a C programming course in college, and I got a... well, I got a C.  I didn't really understand it all that well.

However, I have some very, very basic ideas for some projects I think I could work on and help me learn a little bit of code.  Absolutely nothing fancy.

For example, I would like to (from scratch) write a Control Panel and/or extension that just does a little icon animation when it loads.  That's it.  A little, relatively simple project.

What is the best programming IDE for the C language that I should use on a 68k Mac?  CodeWarrior?  Also, which books should I have on hand for programming a control panel or extension.

In any event, I'll have about a week of down time and I figured I utilize it.

Thanks!

oP

 
Also, I wanna stick with C.  No Pascal or Fortran.  I figure it's a good start, and I can move to other C-like languages afterward (if I need to.)

 
There's also a sample-code system extension from Apple developer support, circa 1990, that does exactly what you describe, and in the prescribed correct way. It was called ShowInitIcon. It was revised a couple of times over the years; when you're rooting around in it, make sure you have the version that correctly handles the case of the user's extension icons marching all the way across the screen and needing to start another line higher up.

 
Cool, thanks!  I'll try to find it.  I found an old copy of Learn C on the Macintosh and CodeWarrior.

Should Basilisk be OK for compiling and testing?  Or should I do it on my real computer?

 
Basilisk may not always be the most stable of options (protip: be sure to keep a copy of your virtual hard disk handy in case of unlikely but possible disaster), but I've found it to be perfectly fine for CodeWarrior. It's much faster than compiling code on the real hardware.

 
Symantic (? on spelling; makers of Norton and Think C) released a book "How to program in C for the Macintosh" in the mid 1990s. You could find it on Amazon, it has a navy blue cover. Also "Programming for the Macintosh for the complete dummy" is another book to look into; also from the mid 1990s.

In both books, they have "Thin C", Think C's "little sister" - a complete C Compiler on a 1.4M floppy disk. It wont do everything that Think C would do but it will get you started on the Mac OS environment.

Thing is this - In programming in C for the Mac, you also need ResEdit to make a Resource file. This Resource file determines your window sizes, resource identifications, etc. When you compile the program, you take your program text together with the resource file and let the compiler spit out the program for you. It is not as difficult as it may sound, it is just a bit more involved. For example - if you are printing "hello world", you must have the resource to open a window with an ID (lets say "001"), and the program flow to follow - open window resource 001 and print "hello world". And that's it.

And it's like that for all C compilers on the Mac OS before OSX.

 
Last edited by a moderator:
Back
Top