[kismac] r76 and xcode-2.2
- From: Beat Zahnd <beat.zahnd@xxxxxxxxxxxxx>
- To: kismac@xxxxxxxxxxxxx
- Date: Mon, 12 Dec 2005 09:26:59 +0100
Hi,
I tried to build GTDriver/KisMACnc on a fresh installed OS X 10.4.3
machine with xcode-2.2. It complained about the showMenu() function in
the BIGeneric subproject:
> AMRollOverButtonCell.m:687: error: nested functions are not supported
on MacOSX
After taking this function out I was able to build it. But since I have
no idea what it serves for I have not made any tests. So far KisMAC is
working fine...
Jim Berland: it seems you had the same problem. Try this diff
Greetings, Beat
--
Beat ZAHND
Physics Institute
University of Bern phone +41 31 631 3466
Sidlerstrasse 5 fax +41 31 631 4405
CH-3012 Bern (Switzerland) mailto:beat.zahnd@xxxxxxxxxxxxx
--- bi_76/KisMACng/Subprojects/BIGeneric/AMRollOverButtonCell.m 2005-12-10
16:24:33.000000000 +0100
+++ bi/KisMACng/Subprojects/BIGeneric/AMRollOverButtonCell.m 2005-12-10
19:21:34.000000000 +0100
@@ -681,15 +681,17 @@
return result;
}
+void showMenu(AMRollOverButtonCell *bc, NSRect cellFrame, NSView *
controlView, NSEvent *theEvent)
+{
+ NSPoint menuPosition = [bc menuPositionForFrame:cellFrame
inView:controlView];
+ // create event for pop up menu with adjusted mouse position
+ NSEvent *menuEvent = [NSEvent mouseEventWithType:[theEvent type]
location:menuPosition modifierFlags:[theEvent modifierFlags]
timestamp:[theEvent timestamp] windowNumber:[theEvent windowNumber]
context:[theEvent context] eventNumber:[theEvent eventNumber]
clickCount:[theEvent clickCount] pressure:[theEvent pressure]];
+ [NSMenu popUpContextMenu:[bc menu] withEvent:menuEvent
forView:controlView];
+}
+
- (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView
*)controlView untilMouseUp:(BOOL)untilMouseUp
{
- void showMenu()
- {
- NSPoint menuPosition = [self menuPositionForFrame:cellFrame
inView:controlView];
- // create event for pop up menu with adjusted mouse position
- NSEvent *menuEvent = [NSEvent mouseEventWithType:[theEvent
type] location:menuPosition modifierFlags:[theEvent modifierFlags]
timestamp:[theEvent timestamp] windowNumber:[theEvent windowNumber]
context:[theEvent context] eventNumber:[theEvent eventNumber]
clickCount:[theEvent clickCount] pressure:[theEvent pressure]];
- [NSMenu popUpContextMenu:[self menu] withEvent:menuEvent
forView:controlView];
- }
+ showMenu(self, cellFrame, controlView, theEvent);
BOOL result = NO;
//NSLog(@"trackMouse:inRect:ofView:untilMouseUp:");
@@ -702,7 +704,7 @@
if (localPoint.x >=
(am_textRect.origin.x+am_textRect.size.width)) {
done = YES;
result = YES;
- showMenu();
+ showMenu(self, cellFrame, controlView, theEvent);
}
}
BOOL trackContinously = [self startTrackingAt:currentPoint
inView:controlView];
@@ -748,7 +750,7 @@
} else { // show menu
done = YES;
result = YES;
- showMenu();
+ showMenu(self, cellFrame, controlView, theEvent);
}
} // ... while (!done)
return result;
Other related posts:
- » [kismac] r76 and xcode-2.2