[baseten-users] Newbie question on app in tutorial
Tuukka Norri
tuukka.norri at karppinen.fi
Sat Nov 28 15:05:32 EET 2009
Hi!
Dany Wu kirjoitti 28.11.2009 kello 13.19:
> For one, according the tutorial NSImageView "data" binding is deprecated - unfortunately I can't quite figure out what else I was supposed to use. For now I have left the NSImageView object not bound to anything.
Sounds strange – Cocoa Bindings Reference [1] doesn't mention anything about the binding having been deprecated, and Interface Builder also displays the binding. Did you get a compiler warning or something similar?
The image view isn't particularly important in the tutorial. It's there to demonstrate that storing and fetching binary data is relatively easy.
[1] http://developer.apple.com/mac/library/documentation/Cocoa/Reference/CocoaBindingsRef/CocoaBindingsRef.html
> I have wired everything up per the tutorial and tried running the build - here's my next problem. The app itself froze - I see the icon on the dock and it says "Application Not Responding". Being a newbie I have no idea what's going on and where to start looking for problems. If I was to debug it where do I put the breakpoint?
If the Dock or Activity Monitor tells that an application isn't responding, it means that the main thread's run loop hasn't run for a while (for Cocoa applications anyway). This can happen if a method gets called and does some intensive work, but since the tutorial application is in question, there might be some error condition that we haven't taken into account.
You can interrupt the application without placing a breakpoint by clicking the pause button in Xcode's debugger. The debugger shows the call stack in in a table view but is nice enough to allow selecting all the rows and copying them as plain text. If you send the stack traces, I can try to make a better guess on what's going on. The problem is probably caused by something happening in the main thread but it's probably better to send all of them anyway. You can select the active thread by clicking on the table view's header.
--
Best regards,
Tuukka Norri
MK&C
More information about the baseten-users
mailing list