Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bundles: debugging and more



On Tuesday, July 31, 2001, at 04:41 AM, Daniel Kdsmayr wrote:

I have an application that is designed in a way that most functionality sits inside of seperate Bundles. Like a "Viewer" bundle, one uses OpenGL, another uses Quartz, etc. Everything works fine ecxept 2 things:

1. How do I debug code that is inside a bundle? When I set a break point in Project Builder the code doesnt stop when I run the debugger. Of course, I run the debugger on the main app, since the bundle itself wont run...is there a way to do this?

Yes, in the "breakpoints" tab of PB, you can hit the "new" button, and type the name of the method you want to break on, eg: [MyClass methodIWantToBreakOn] This will set a GDB "future break" breakpoint, which GDB will attempt to resolve when any code is loaded.


2. When I have code inside the bundle and want to access resources contained in it, how would I get the path info for it? [NSBundle mainBundle] gives me the main app, not the bundle...

Classes within your bundle can call [NSBundle bundleForClass:[self class]] .

-jcr

"These kids today don't know the simple joy of saving four bytes of page-0 memory on a 6502" - unknown


References: 
 >Bundles: debugging and more (From: "Daniel Käsmayr" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.