Help with Macintosh programming

macintosh programming, mac programming, mac os programming, mac os x programming, mac programming language, mac programing

Archive for June, 2010

Basic C Compiler Wanted.


I’m looking for a really easy, simple, basic C compiler.  MPW, and
Codewarrior, while excellent in many ways, just don’t suit when doing little
"Hello, world" type programs.

I want to compile and run some source files with max 40lines in them,
perhaps drag and drop, something along the lines of Javac and Jbindery for

Any suggestions for a really easy (free or shareware) compiler?



posted by admin in Uncategorized and have No Comments

ResolveAlias and underlying data structures

I have a problem with storing an AliasRecord to disk (into the Preferences
NavChooseFile delivers the FSSpec, AECoerceDesc, AEGetNthPtr and NewAlias
delivers the AliasHandle. To store those Aliases on disk I have a
preferences struct, which shall store the AliasRecord. And later to retrieve
the Alias I have to convert the struct into an AliasHandle again. It seems
that from the Handle into the struct is easy but how can I make an Handle
out of my struct? NewHandle? myAliasHandle = &&myAliasRecord is rejected by
the compiler.
Thanks for help
Robert Welz

posted by admin in Uncategorized and have Comment (1)

How do i recognize the the video card as the main screen?


Let’s assume that my machine has two video card and two monitors.

I’m tring to recognize "programmatic" which video card is the main screen.

I’m using the Name Registry to learn about the video cards
       and the Quickdraw.h (GetMainDevice) to learn about the main screen.

How do i make the connections between the two … how can i compare between
the two, so i’ll know who (main screen) is who (video card).


posted by admin in Uncategorized and have No Comments

How to make a Docklet?


Anyone found any documentation on how to make docklets?


posted by admin in Uncategorized and have Comment (1)

Setting OSX file permissions from OS9?

Is there a way (using the Carbon API under OS9) to access and change the
Unix-style file permissions (i.e. drwxrwxrwx) of a file/directory on an
OS-X HFS+ volume? I’ve tried using ::PBSetForeignPrivsSync(), and get a
-50 result (I’m guessing this is because the volume that the file is on
is HFS+ format, not UFS).

I’m attempting to copy an application bundle from one machine to
another, and the ‘x’ permissions of the actual executable file aren’t
being set, resulting in the application bundle being unlaunchable. The
app doing the copying is a PowerPlant Carbon application, and the bundle
being copied is an OSX-only application bundle.

Any help would be appreciated.

- Paul

posted by admin in Uncategorized and have Comments (4)


Hi everyone,

Sorry for asking such a dumb question, but my CD drive is broken and I
cannot consult IM. Does anyone remember offhand what the "Stationary
Aware when opening Docs" flag does exactly when set in the SIZE

I have just added a new BNDL section to my app to create Stationaries,
and whether this flag was on or off, it made no difference to my app
opening the doc normally. I had to internally code some additional
prohibition code to avoid altering the doc.

Thanks much.

Ioannis Galidakis
"Blessed are those who don’t have faith,
yet, have seen." Joannis 1:1.

posted by admin in Uncategorized and have No Comments

To Programmers of Internet Applications

Hi – this is Drew Saur from The Mac Orchard here. I just want to take a
moment to ask that any programmers who have recently released Internet
applications for the Mac – most importantly Carbon and Cocoa
applications – to please write me at ds… with the
details of your work, including any relevant URLs.

The Mac Orchard, for those of you who are not familiar with it, is
basically a complete repository of all known and *useful* Internet
applications for the Mac. The Orchard has been around since 1995, and
many users and networking professionals are aware of it, but many
programmers are not (as I have been finding out recently). Hence, this
post, which is the first of its type in the Mac programming newsgroups.

If you have an Internet application, then you really want to make sure
it’s listed on The Mac Orchard. Only then will you be sure that the
Orchard’s very active (and evangelical) community will get the word
about your application.

There’s no catch. Listings have always been and always will be free
(the Orchard is more a labor of love than anything else). By doing
this, you’re helping me make the Orchard a more useful tool for all of
its regular visitors, as well as getting the word out to new potential

Thanks very much for your attention, and I look forward to hearing
about all the great things you are developing!

Best regards,


The Mac Orchard –  
Essential Internet Applications since 1995

posted by admin in Uncategorized and have No Comments

Help; Carbonizing problem, sound and graphics out of sync


I’m Carbonizing my app and it works OK under 9.1 but under OSX it

My code does-

1. frame a rectangle say in blue
2. play some AIF sound (about a 2 second sound)
3. frame a rectangle in the background colour to erase the first

But the first rect gets drawn then erased before the sound plays. I had a
similar problem in Windoze but was fixed by disabling GDI buffering. Is
there something like that I need for OSX?

Any help appreciated.


posted by admin in Uncategorized and have Comment (1)

commad line support


There is a command line support when writing Win32 App,

for example:
someApp.exe /name=32632 /format=1

Is there something similar on the Mac?


posted by admin in Uncategorized and have Comment (1)

[Q]] command-line from within Classic

I rely very heavily on the application "MATLAB" whose manufacturers stopped
supporting the Mac a couple of years ago (o ye of little vision!). So if I
switch to OS X, it will probably only run under Classic, if at all. It does,
however, allow you to write your own Shared Libraries, using a C API, to
extend its functionality.

What I want to do is to make this errant app communicate with the rest of
the system using command-line calls. So, what I need to do is this: write a
C routine that can run within Classic, but which includes calls to the ANSI
C system() and getenv() functions (or something like them) that effectively
"escape" from the Classic envelope and communicate with a shell process
running in the surrounding OS X environment.

From the research I’ve done, it looks as if I would need to use something
called the "Carbon" API, and I have started wading through megs and megs of
design guidelines and porting instructions. Mostly they talk about toolbox
calls I’ve never used or heard of, and I have yet to find any mention of
whether system() is supported in this way, or whether there is an

In the meantime, I’d be really grateful if someone could tell me how this
story ends: is it possible, in principle, to do what I want to do?  Then I
would know whether to move to OS X now, and whether or not to spend my time
on this.

Thanks in advance for any hints, or pointers to documentation,


remove the q’s from my email address if
you would like to reply to me directly

posted by admin in Uncategorized and have No Comments