Can anyone help me with this Objective-C?

Miscellaneous Forums/MacOS X Discussion/Can anyone help me with this Objective-C?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi,

I've been trying to make an equivalent Mac OS X function as alternatives to the ScreenToClient() and ClientToScreen() Windows API functions and am finding it extremely hard picking up the language. Basically what I would like to do is to get the absolute screen co-ordinates of a point when I pass a position within a panel, and vice-verse (i.e. get the relative position of a absolute screen point from a specific panel).

I've currently got the following...

Working Code At Bottom of Thread

However as soon as it calls the external function, the program crashes... The code is taken from some sample code around the web where it apparently works.

Many thanks for all your help,


Seb