|
From: Yvon T. <tho...@fr...> - 2006-02-22 13:16:45
|
Le 22 f=E9vr. 06 =E0 13:52, Jonathan Paisley a =E9crit : > > Hehe - it's calling the ruby method 'display'. Try 'oc_display' =20 > instead. This bypasses any ruby methods defined. #oc_display works fine. however, something surprising to me is when a button is disabled, it =20 still memorizes click on it, only the view is changing. that's Cocoa design :[ (i never had such behaviour with Java-Swing...) > >> then i went to "discardEventsMatchingMask:beforeEvent:" and =20 >> applied to a NSWindow as a receiver : >> >> @mainWindow.discardEventsMatchingMask_beforeEvent=20 >> (OSX::NSAnyEventMask, OSX::NSKeyUpMask) > > Ah, I realise now that discartEvents... won't work here. > > Instead look at "- (NSEvent *)nextEventMatchingMask:(unsigned int)=20 > mask untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:=20= > (BOOL)flag" and call it repeatedly with dequeue:YES and try =20 > different values for untilDate: NSDate.date, NSDate.distantFuture =20 > or NSData.distantPast. Stop calling it when it returns no events. > ok, i need to investigate further on that point. Yvon |