|
From: Jonathan P. <jp...@dc...> - 2006-02-22 12:52:36
|
> with #display i get only that in the XCode's Run log : > > [Session started at 2006-02-22 13:13:49 +0100.] > <NSButton: 0x69d0f0><NSButton: 0x4b3210><NSButton: > 0x4bba30><NSButton: 0x6dfc70><NSButton: 0x689400><NSButton: > 0x4b47a0><NSButton: 0x6899e0><NSButton: 0x6e5080> > BookmarksMerge has exited with status 0. Hehe - it's calling the ruby method 'display'. Try 'oc_display' instead. This bypasses any ruby methods defined. > then i went to "discardEventsMatchingMask:beforeEvent:" and applied > to a NSWindow as a receiver : > > @mainWindow.discardEventsMatchingMask_beforeEvent > (OSX::NSAnyEventMask, OSX::NSKeyUpMask) Ah, I realise now that discartEvents... won't work here. Instead look at "- (NSEvent *)nextEventMatchingMask:(unsigned int) mask untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue: (BOOL)flag" and call it repeatedly with dequeue:YES and try different values for untilDate: NSDate.date, NSDate.distantFuture or NSData.distantPast. Stop calling it when it returns no events. |