Re: Bug with two buttons in a view.
Re: Bug with two buttons in a view.
- Subject: Re: Bug with two buttons in a view.
- From: Sheehan Olver <email@hidden>
- Date: Wed, 18 Dec 2002 21:57:23 -0600
Yeah, I couldn't reproduce it in your app, I even recreated as much of
the gui that I had as I could. If you want the source code of my app,
email me. Here's what I get back by pausing during the freeze. Don't
ask me why there are two threads, since I haven't created any.
Thread-1:
0 semaphore_wait_signal_trap
1 _pthread_cond_wait
2 -[NSViewHierarchyLock lockForWriting]
3 -[NSView addSubview:]
4 -[NSBrowser drawRect:]
5 -[NSView _drawRect:clip:]
14 -[NSView displayIfNeeded]
15 -[NSCell trackMouse:inRect:ofView:untilMouseUp:]
Thread-2:
0 semaphore_wait_signal_trap
1 _pthread_cond_wait
2 -[NSViewHierarchyLock lockForWriting]
3 -[NSView addSubview:]
4 -[NSBrowser drawRect:]
5 -[NSView _drawRect:clip:]
6 -[NSView _lightWeightRecursiveDisplayInRect:]
(7 through 10 same as 6)
11 -[NSButtonCell(NSDefaultButtonIndicatorPrivate) heartBeat:]
12 -[NSWindow(NSWindow_Theme) heartBeat:]
13 -[NSUIHeartBeat _heartBeatThread:]
14 forkThreadForFunction
15 _pthread_body
On Wednesday, December 18, 2002, at 08:18 PM, Kurt Revis wrote:
I may have found a bug, but I wanted to make sure it wasn't something
I just was missing. In a view in Project Builder I had two buttons,
one
called "Merge" with button equiv being return and one called "Next"
with no button equiv. I connected the "Merge" button to an action
mergePressed: in my controoler, and "Next" to an action called
nextPressed:. nextPressed just had an NSLog statement, as I was trying
to figure out the problem, so I took all the actual logic out. So in
this case, the "Merge" button worked perfectly, but the "Next" button
would freeze the whole app, before printing anything out. I tried
debugging it, and when I paused the app while frozen it was in the
middle of a semaphore wait, which seemed weird because it's a single
threaded app, but maybe that has to do with the implementation of
AppKit. Finally, I tried removing the key equivalent of the "Merge"
button, and sure enough everything worked as expected. Anyone have any
ideas?
I can't reproduce this according to your description. I just created
a new project, created a Controller class, and set things up the way
you describe in IB. The app works fine.
So something else you're doing must be broken. The full backtrace
would be useful.
Here's my test app:
<CocoaButtons.tar.gz>
--
Kurt Revis
email@hidden
_______________________________________________
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.