Compiling cocoa.macos.m under Leopard

BlitzMax Forums/MaxGUI Module/Compiling cocoa.macos.m under Leopard

DavidDC(Posted 2007) [#1]
BlitzMax 1.26, fresh syncmods, rebuild all modules. All proceeds to plan until we reach cocoa.macos.m, which returns the following compile errors

Compiling:cocoa.macos.m
/Applications/BlitzMax/mod/brl.mod/cocoamaxgui.mod/cocoa.macos.m: In function 'NSPopupMenu':
/Applications/BlitzMax/mod/brl.mod/cocoamaxgui.mod/cocoa.macos.m:2283: error: incompatible type for argument 4 of 'mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:'
/Applications/BlitzMax/mod/brl.mod/cocoamaxgui.mod/cocoa.macos.m:2283: error: incompatible type for argument 9 of 'mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:'
Build Error: failed to compile /Applications/BlitzMax/mod/brl.mod/cocoamaxgui.mod/cocoa.macos.m
Process complete


Any ideas anyone?

thanks

-David


DavidDC(Posted 2007) [#2]
To answer my question:

Open cocoa.macos.m jump to line 2283 and replace the Nils with zeroes in time:Nil and pressure:Nil

-David


DavidDC(Posted 2007) [#3]
In addition: the error

2007-10-26 20:39:09.524 Main.debug[2346:717] Message sent to an NSImage that was alloc'ed but not yet initialized! Break on -[NSImage _failsafeAllocAuxiliaryStorage] to debug. This will be logged only once.

Can be fixed courtesy Brucey (surprise, surprise) via:


find -

NSImage *NSPixmapImage(bbpixmap *pix){


Look for this line :

image=[[NSImage alloc];

and change to

image=[[NSImage alloc] initWithSize:NSMakeSize(pix->width, pix->height)];

- David


SebHoll(Posted 2007) [#4]
Can you post these in the Mac OS X discussion thread too, so that we have all the fixes for Brucey in one place?

Thanks