I don't think you want to be mix-and-matching c/max code like that. It's certainly not likely to work the way you think it will ;-)
Since you appear to be trying so hard to get this working...
your cocoa code:
your max code :
or something like that...
:o)
Since you appear to be trying so hard to get this working...
your cocoa code:
void ccGetWindowOrigin(int * x, int * y){ NSApplication *myApp = [NSApplication sharedApplication]; NSWindow *myWindow = [myApp keyWindow]; NSRect myFrame = [myWindow frame]; *x = myFrame.origin.x; *y = myFrame.origin.y; };
your max code :
Extern Function ccGetWindowOrigin(x:int ptr, y:int ptr) End Extern Type TAccuratePoint Field X# Field Y# Function Update:TAccuratePoint() Local this:TAccuratePoint = new TAccuratePoint ccGetWindowOrigin(varptr this.X, varptr this.Y) return this End Function End Type ... Local p:TAccuratePoint = TAccuratePoint.Update() ...
or something like that...
:o)