tool tips & lost mouse click
tool tips & lost mouse click
- Subject: tool tips & lost mouse click
- From: Mark Dawson <email@hidden>
- Date: Thu, 12 May 2005 10:25:29 -0700
I worked on some test code to add real time notes using tool tips (similar to the ruler's marker). However, I've run into 2 problems:
(1) When running the code, if I click on my document (which turns on a tool tip for information display), then click on my panel, that first click on the panel is "lost"--doesn't seem to go to the panel. I haven't figured out where its going, but taking out the help code allows it to pass through.
(2) (Maybe related to (1)) I can't seem to find a way to make the tool tip text go away immediately. While I call "remove", the tool tip doesn't disappear until the next screen refresh (which is reasonable); however, I'd like it to go away on mouse up (when I call the "remove"). Is there a way to "goose" just that clip area to redraw?
I added the code to the "Sketch" example program:
in the
- (BOOL)createWithEvent: method, I added the help
NSHelpManager *helpManager = [NSHelpManager sharedHelpManager];
while (1) {
theEvent = [[view window] nextEventMatchingMask:(NSLeftMouseDraggedMask | NSLeftMouseUpMask | NSMouseMovedMask)];
point = [view convertPoint:[theEvent locationInWindow] fromView:nil];
pointInScreen = [NSEvent mouseLocation];
...
[helpManager setContextHelp:[self resizeTipText:&flags] forObject:self];
[helpManager showContextHelpForObject:self locationHint:pointInScreen];
...
}
[helpManager removeContextHelpForObject:self];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden