Custom View loops in sendEvent
Custom View loops in sendEvent
- Subject: Custom View loops in sendEvent
- From: Rich Van Deren (äèä) <email@hidden>
- Date: Tue, 19 Mar 2002 15:22:47 -0800
I have been lost for a couple of days so I thought that I would ask for
help.
My multi-document application was working great until I added another
window with a custom view.
It looks like I lost some connections to the main application somehow.
I can catch the sendEvent with the debugger in the window class however
nothing 'super' catches it. My main window and new view window do not
respond to anything, no close no toolbar no scroll. Checked all the
connections in IB that I can think of. I used TexShop as an example to
view a PDF.
I also threw in some Java code to process my PDF. Does not seem to be a
problem. This was an big plus for me to use Java when needed.
I know without the whole program it is impossible to 'see' my error,
but, if anyone could give me a direction I would be grateful.
Here is the code that leads to my problem
The notification comes from the Java code.
- (void)showPdfWindow:(NSNotification *)notification
{
NSRect topLeftRect;
NSPoint topLeftPoint;
[resumePdfWindow setTitle: @"my funny test"];
myImageType = isPDF;
[resumePdfCustomView setImageRep: [notification object] ]; // this
releases old one!
topLeftRect = [[notification object] bounds];
topLeftPoint.x = topLeftRect.origin.x;
topLeftPoint.y = topLeftRect.origin.y + topLeftRect.size.height - 1;
[resumePdfCustomView scrollPoint: topLeftPoint];
[resumePdfCustomView display]; // does not display the PDF
[resumePdfCustomView setNeedsDisplay:YES];
[resumePdfWindow makeKeyAndOrderFront: self];
}
displays a window with a toolbar, but, no PDF image and no response to
keyboard events.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.