Re: Why would NSViewController loadView fail?

2009-08-31 Thread Jonathan Hess
On Aug 28, 2009, at 1:36 PM, Eric Gorr wrote: I am pretty sure I've got my .xib setup correctly, but when I call loadView on my View Controller, my application crashes. Unfortunately, I am not getting any useful information out of the crash. The only thing I appear to have is a stack trace

Re: Why would NSViewController loadView fail?

2009-08-31 Thread Jonathan Hess
I would try running with zombies. It sounds like one of the objects loaded by the NIB file is being over released. Jon Hess On Aug 31, 2009, at 1:55 PM, Eric Gorr wrote: On Aug 31, 2009, at 3:58 PM, Kyle Sluder wrote: On Mon, Aug 31, 2009 at 12:26 PM, Eric Gorr wrote: Building and runni

Re: Interface Builder .xib deployment/development targets

2009-09-16 Thread Jonathan Hess
On Sep 16, 2009, at 12:46 AM, Steve Cronin wrote: Folks; Got another report today from the field also a MacBookPro5,1 running 10.5.8 2009-09-16 03:01:53.954 XYZ[329:20b] Error loading /Library/ ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/ QXPScriptingAdditions: dlopen(/Lib

Re: Interface Builder .xib deployment/development targets

2009-09-16 Thread Jonathan Hess
spinning with a beach ball? If so, have you tried asking a user to sample the problem with "sample MyProgramName" from the terminal? That will tell you what your program is doing as it hangs. Jon Hess Steve On Sep 16, 2009, at 1:22 PM, Jonathan Hess wrote: On Sep 16, 2009, at 12:46

Re: Debugging IB 3.2 problem

2009-09-21 Thread Jonathan Hess
On Sep 21, 2009, at 11:54 AM, Robert Mullen wrote: I have a problem with IB 3.2 in one of my plugins. I get the following error message: ibtool failed with exception: Some objects didn't get the ibBeginArchivingDocument:withContext: callback. A class has probably overriden the method wit

Re: NSApplication's behavior

2009-10-01 Thread Jonathan Hess
On Sep 30, 2009, at 7:50 PM, Mark Hurley wrote: > Still learning the Cocoa Window Architecture... > Goal: I want to separate my MainWindow out of MainMenu.xib into its own > .xib: MainView.xib. > > 1) I create a new Cocoa Application (not document-based) > > 2) I create a MainWindow.xib and M

Re: Cannot get pixel color from NSBitmapImageRep

2009-10-01 Thread Jonathan Hess
On Oct 1, 2009, at 1:22 AM, David Hirsch wrote: > In the code below, the TIFF gets saved correctly (transparent but for the red > square), but when I query the pixel at (40,40) which should be in the middle > of the red square, I get a black pixel (r==g==b==a==0.0): > offscreenRep = [[NSB

Re: Problems calling a method from an IB-created instance...

2009-10-08 Thread Jonathan Hess
On Oct 5, 2009, at 12:59 PM, Jeff Diamond wrote: This concept is so fundamental, but I've seen no specific docs about it, and I haven't succeeded with this after almost 2 years of trying an reading every tutorial and mail list on the web. As near as I understand it, what Cocoa calls "outl

Re: pump event

2009-10-26 Thread Jonathan Hess
Perhaps you're looking for these methods: -[NSApplication currentEvent] -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] Documented here: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html Goo

Re: How to find all clipping siblings for a view?

2010-04-17 Thread Jonathan Hess
On Apr 16, 2010, at 10:47 AM, Kyle Sluder wrote: > On Fri, Apr 16, 2010 at 10:37 AM, Corbin Dunn wrote: >> You can't control it in IB (short of removing the view and adding it back >> in). But in code, you can just call -addSubview:positioned:relativeTo: to >> move views around in the Z order.

Re: How to find all clipping siblings for a view?

2010-04-17 Thread Jonathan Hess
On Apr 16, 2010, at 9:48 AM, Kyle Sluder wrote: >> It works OK with non layer-backed views in my experience, but you do get a >> build warning if sibling views overlap in a nib. Sibling views are drawn in >> the order they appear in the parent's list of subviews (or possibly the >> inverse or

Re: How to find all clipping siblings for a view?

2010-04-17 Thread Jonathan Hess
On Apr 17, 2010, at 12:50 PM, Alexander Bokovikov wrote: > > On 18.04.2010, at 1:29, Jonathan Hess wrote: > >> >> On Apr 16, 2010, at 10:47 AM, Kyle Sluder wrote: >> >>> On Fri, Apr 16, 2010 at 10:37 AM, Corbin Dunn wrote: >>>> You can&#x

Re: Cocoa/Objective-C flat name space problems

2010-05-06 Thread Jonathan Hess
On May 6, 2010, at 7:27 PM, Stephen Blinkhorn wrote: > Thanks Isaac, > > On 6 May 2010, at 16:35, Isaac Wankerl wrote: > >> With #2, you might want to investigate using ibtool and the --convert option >> to modify the nibs. Just from reading the man page, it looks like that >> might work if

Re: Outlets Not Connected In awakeFromNib

2011-03-09 Thread Jonathan Hess
On Mar 3, 2011, at 3:31 AM, Uli Kusterer wrote: > On 02.03.2011, at 10:54, Andreas Grosam wrote: >> I have a very basic custom UIViewController with its own associated nib >> file. This view controller is the "root view controller" of a Navigation >> Controller which is itself embedded within a

Re: Strange Problems with IBPlugin

2009-12-28 Thread Jonathan Hess
On Dec 26, 2009, at 9:38 PM, Carter Allen wrote: > Hello! > > Thanks in advance, I know this is a lot to ask. I am working on a framework > of custom classes for my own personal use, and it was going very well until > I started to work on the Interface Builder plugin part. Download the > non-wor

Re: Unembed Objects

2010-01-18 Thread Jonathan Hess
On Jan 18, 2010, at 3:50 PM, David Blanton wrote: > I have embeded two views in a split view then embeded that result with > another view in a split view to get a resulting vert splitter and horz > splitter. > > Now I would like to Uembed an cannot no matter what selections I do get > Uembed

Re: Adding NSMenuItem in IB

2009-06-01 Thread Jonathan Hess
On Jun 1, 2009, at 2:59 AM, Vijay Kanse wrote: Sorry for My Question, Actually i was dragging NSMenu from Library and I was trying to Add it as Sub Menu. Ah, the problem here is that NSMenu instances contain an array of NSMenuItem instances. NSMenuItem instances can each contain a single

Re: XIB and AppleGlot

2009-06-04 Thread Jonathan Hess
On Jun 4, 2009, at 6:28 AM, Eric Slosser wrote: (Sorry if this is OT, I couldn't find a better apple-hosted list...) How does one use AppleGlot and XIBs? I have an app, "My.app", that was previously localized. I'm working on version 2.0. My app is starting to use XIB files. These get co

Re: Should touch events related to a given view be implemented in the view or the view controller?

2009-06-04 Thread Jonathan Hess
Hey Michael - It might help to approach this problem with the idea of "If I had multiple view controllers using this view, how would I make that work best". Event handling is something you would normally manage at the UIView layer. After those events are handled, they're typically transla

Re: XIB and AppleGlot

2009-06-05 Thread Jonathan Hess
On Jun 5, 2009, at 3:38 AM, Eric Slosser wrote: On Jun 4, 2009, at 8:46 PM, Jonathan Hess wrote: On Jun 4, 2009, at 6:28 AM, Eric Slosser wrote: (Sorry if this is OT, I couldn't find a better apple-hosted list...) How does one use AppleGlot and XIBs? I have an app, "My.app&

Re: (newbie) help with combining navigation controller and tab bar controller

2009-06-05 Thread Jonathan Hess
Hey Beth - You should be able to drag a navigation controller from IB's Library directly into the on screen editor (window) for the UITabBarController. Assuming you started with the default tab bar controller, at this point you will have produced a document with this structure: MainWind

Re: selecting tab in a tabless NSTabView in IB

2009-06-07 Thread Jonathan Hess
On Jun 7, 2009, at 9:13 PM, Rob Keniger wrote: On 06/06/2009, at 6:08 AM, Stephen Blinkhorn wrote: Does anyone know if it is possible to change the current tab in a tabless NSTabView from within Interface Builder without having to go into the inspector and change tabless style to top tabs

Re: Interface Builder Questions...

2009-07-06 Thread Jonathan Hess
On Jun 28, 2009, at 12:59 PM, Phil Hystad wrote: I am new to Interface Builder and I am still trying to figure out some subtle details of how things work. And, my frustration level is growing because although I have access to a very rich set of documentation, a number of questions I have

Re: Saving NSArray of custom objects

2009-07-13 Thread Jonathan Hess
Hey dkj - The method -[NSArray writeToFile: atomically:] uses property list serialization, and property lists support a fixed set of types. You want to serialize your NSArray with an NSCoder, like NSKeyedArchiver, and then read it back in with NSKeyedUnarchiver. Take a look at these two m

Re: ibtool and genstrings do nothing

2009-07-16 Thread Jonathan Hess
ibtool -generate-strings-file MainWindow.nib MainWindow.xib Will invoke ibtool, and tell it to open MainWindow.xib and then read all the localizable strings out of that XIB, and then write them into the argument of the "-generate-strings-file" argument. So after running that command, ibtool

Re: UITextView Doesn't seem to function

2009-07-16 Thread Jonathan Hess
Have you verified that the "about" pointer is actually set to point to a text field? If it was nil, it would explain the behavior your describing. Jon Hess On Jul 16, 2009, at 6:52 PM, Development wrote: Ok, I have tried: about.text = @"About text"; and [about setText:@"About Text"] but

Re: devil of a time with an NSImageView

2009-08-19 Thread Jonathan Hess
What happens if you include this log to your setImage method? NSLog(@"image view: %@", boxPic); Also, rather than logging you should see if you can find the time to learn to use the debugger. It's much more efficient than printf debugging. Good Luck - Jon Hess On Aug 19, 2009, at 2:31 PM,

Re: devil of a time with an NSImageView

2009-08-19 Thread Jonathan Hess
tell it to load a NIB, but the NIB file also instantiates a second instance of the class because the File's Owner was misunderstood. Hope that helps - Jon Hess On Aug 19, 2009, at 5:28 PM, Jack Carbaugh wrote: The result is null. On Aug 19, 2009, at 8:04 PM, Jonathan Hess wrote:

Re: devil of a time with an NSImageView

2009-08-20 Thread Jonathan Hess
c. A couple of weeks ago on this list, one of our Apple experts (Luke, maybe, but I can't remember for sure) said to use the more specialized method (such as 'windowDidLoad') *instead of* the generic 'awakeFromNib', if the class has it. I missed that thread. Do you happen to know some keywo

Re: Cocoa/Objective-C flat name space problems

2010-12-05 Thread Jonathan Hess
On May 6, 2010, at 7:27 PM, Stephen Blinkhorn wrote: > Thanks Isaac, > > On 6 May 2010, at 16:35, Isaac Wankerl wrote: > >> With #2, you might want to investigate using ibtool and the --convert option >> to modify the nibs. Just from reading the man page, it looks like that >> might work if

Re: Conditionally modifying NIBs?

2008-05-14 Thread Jonathan Hess
On May 14, 2008, at 4:10 PM, Hamish Allan wrote: On Wed, May 14, 2008 at 11:25 PM, Mike Fischer <[EMAIL PROTECTED]> wrote: (I know this can be hacked, and that while verbose it's only xml. But I'd want my apps building in the next Xcode (sub-)release as well.) Sure, well, you can't eat

Re: Conditionally modifying NIBs?

2008-05-15 Thread Jonathan Hess
On May 15, 2008, at 4:25 AM, Mike Fischer wrote: Am 15.05.2008 um 02:20 schrieb Jonathan Hess: As for the original question, you can modify an IB file, to some extent, using ibtool --import and ibtool --export. For example, you might consider placing all of your views and objects in the

Re: connections and the nib lifecycle

2008-05-21 Thread Jonathan Hess
The documentation for awakeFromNib is correct. Are you sure these events are occurring in the order you think they are? If the interface isn't already loaded, awakeFromNib should be called from within the call to 'window' from 'test:' I would expect the order of the log message to be someth

Re: File's Owner

2008-05-23 Thread Jonathan Hess
John - I'd like to be able to describe the concept of File's Owner and First Responder to people clearly. I don't think I would have described it any differently than Key Thomases did early today. I've copied his explanation below. Did you find Ken's explanation helpful? Jon Hess On May

Re: IBPlugin error

2008-06-09 Thread Jonathan Hess
Hey Steve - You would encounter a similar problem if you directly launched an application built from a project that had an application and framework target where the application linked the framework. The reason for this is that frameworks have install paths. An Install path is a location a

Re: IBPlugin error

2008-06-09 Thread Jonathan Hess
On Jun 9, 2008, at 9:03 PM, Jonathan Hess wrote: Hey Steve - You would encounter a similar problem if you directly launched an application built from a project that had an application and framework target where the application linked the framework. The reason for this is that frameworks

Re: duplicating views

2008-06-17 Thread Jonathan Hess
Hey Torsten - It would probably be easiest to factor your view into a separate NIB and then load that nib multiple times. If you have reasons for not doing that, you could instead take the approach you suggested below. To get your outlets to roundtrip through the keyed archiver, you need

Re: nib and xib

2008-06-17 Thread Jonathan Hess
Hey William - This blog post explains XIB files quite nicely: http://speirs.org/2007/12/05/what-are-xib-files/ Jon Hess On Jun 16, 2008, at 5:54 PM, William Squires wrote: What's the difference? (assuming 'xib's aren't under NDA here...) ___ Coco

Re: unexpected nil outlet

2008-06-17 Thread Jonathan Hess
Hey William - Assuming everything else is correct, it looks like your problem is that you're poking at 'window' too early. Your object receives the init message before IB has a chance to establish connections. If you think about it, IB has to create all of the objects before it can connec

Re: NSArchiver question?

2008-06-26 Thread Jonathan Hess
Hey Damien - You should also consider using NSKeyedArchiver over NSArchiver. NSKeyedArchiver is much more flexible and handles archive versioning much better. Jon Hess On Jun 26, 2008, at 4:22 PM, Mike Abdullah wrote: Yes, it is your responsibility to implement the NSCoding protocol in

Re: initWithCoder in Nib object loading

2008-06-27 Thread Jonathan Hess
Hey John - If you're thinking about overriding initWithCoder: just to do post NIB loading instantiation, I would recommend overriding awakeFromNib instead. The objects in the NIB are sent the initWithCoder: message because they're actually being decoded from an archive. Conceptually initW

Re: class keeps track of object

2008-07-01 Thread Jonathan Hess
Han Daniel - You can use a global variable just like you would in C: static Foo *bar = nil; @implementation Foo + (id)bar { if (!bar) { bar = [[Foo alloc] init]; } return bar; } @end Thats the simple single threaded case. Things get much more interesting if you want to be

Re: Converting Windows RC to NIBs (was Re: Creating and App menu from Scratch)

2008-07-28 Thread Jonathan Hess
On Jul 16, 2008, at 3:38 AM, Uli Kusterer wrote: On 14.07.2008, at 14:53, Bill Royds wrote: Are there any good tools for porting Application menus and forms from other windowing systems (such as MS Windows or X or even Carbon) to Cocoa nibs? I have a number of applications that I would li

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Jonathan Hess
On Jul 28, 2008, at 11:44 AM, I. Savant wrote: If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? I'm racking my brains trying to think of a good reason to do this and am drawing a blank. I can, however, think

Re: Repositioning a content view w/in a window

2008-07-29 Thread Jonathan Hess
On Jul 28, 2008, at 3:29 PM, R.L. Grigg wrote: On Jul 26, 2008, at 3:15 AM, Michael Ash wrote: On Fri, Jul 25, 2008 at 11:08 PM, Henry McGilton (Starbase) <[EMAIL PROTECTED]> wrote: On Jul 25, 2008, at 6:50 PM, Michael Ash wrote: In fact I would go so far as to say that if you ever use -s

Re: Dragging a header file to XIB Dock

2008-07-30 Thread Jonathan Hess
Hey Nelson - The only time you should have to drag a header file to IB is if that header is used by your project, doesn't come from the system, and is not in your project either. A header in a second project that your main project depends on would be an example of this. Otherwise, if you'

Re: "backporting" nibs question / Rhapsody license anyone?

2008-08-04 Thread Jonathan Hess
I read the original question to mean that Lars was trying to get the NIB's from Rhapsody to run on Open Step. If so, I don't know of anyway to do this. It's largely the reason we use NSKeyedArchiver on Mac OS X instead of NSArchiver. Generally, we're pretty good about reading old binary for

Re: Properties and memory management

2008-08-04 Thread Jonathan Hess
Hey Mike - The implementation of the property will manage the retaining and the releasing. You only need to worry about sending retain and release messages manually if you access the instance variable directly (not through a property). The only place you would typically need to do that wo

Re: handling idle events

2008-08-05 Thread Jonathan Hess
Hey Jim - The typical way that I like to handle this is with these methods from NSRunLoop.h: @interface NSObject (NSDelayedPerforming) - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay inModes:(NSArray *)modes; - (void)performSelector:(SEL)aSe

Re: Bindings to display an NSArray of NSStrings as a single NSString?

2008-08-05 Thread Jonathan Hess
On Aug 5, 2008, at 7:27 PM, Erik Buck wrote: > You could add a category to NSArray... > > @implementation NSArray (ArrayOfStringsAsSingleString) > - (NSString *)arrayOfStringsAsSingleString { return [self > componentsJoinedByString:@", "]; } > @end > > ...and then bind to "values.arrayOfStrings

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-07 Thread Jonathan Hess
Hey Cyril - How are you adding the formatter to the text field? After you add the formatter, does it appear as a child of the text field in the document outline view? If not, that's your problem. Interface Builder maintains a tree of all of the objects in the document. If you do something l

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-08 Thread Jonathan Hess
er. Thanks again, Cyril. Le 8 août 08 à 07:05, Jonathan Hess a écrit : Hey Cyril - How are you adding the formatter to the text field? After you add the formatter, does it appear as a child of the text field in the document outline view? If not, that's your problem. Interface

Re: Newbie Question on "self"

2008-08-11 Thread Jonathan Hess
On Aug 11, 2008, at 10:47 AM, Matt Keyes wrote: Hello again, In C/C++ and the .NET languages I am used to, I have generally tried to prefix any member variables inside class methods with "this" i.e. this.m_sMyString = "this is my string"; In Objective-C, this doesn't seem as clear to me (

Re: Get specified window from nib

2008-08-12 Thread Jonathan Hess
On Aug 12, 2008, at 3:33 AM, Andy Lee wrote: On Aug 10, 2008, at 10:07 PM, Graham Perks wrote: On Aug 10, 2008, at 9:01 PM, Fosse wrote: I have one nib containing more than ten dialogs and want to get the specified window after nib is loading.. Perhaps NSNib's instantiateNibWithOwner:(id)o

Re: drawRect is erasing view

2008-08-14 Thread Jonathan Hess
Hey Jeff - The expectation of drawRect is that it will repaint the entire invalid area. I don't think there is a way to do additive drawing on each call to draw rect. If you'd like to re-use and erase portions of the same picture, you could draw to a bitmap context that you keep around and

Re: document based app, custom ibaction

2008-08-19 Thread Jonathan Hess
Hey Bart - Understanding the "File's Owner" is really an essential part of understanding how to use Interface Builder effectively. At the most basic level, all NIBs are loaded at runtime with a call to -[NSBundle loadNibNamed:owner:]. The method takes two arguments, a NIB name which is th

Re: Outlet Initialization Uses Accessors

2008-08-20 Thread Jonathan Hess
Yes it does. One thing to be aware of is that this can lead you to retain your outlets. Also, if you have an action named '-(IBAction) setFoo:(id)sender' and an outlet named foo, setting the outlet at runtime will be defeated by the existence of the action with the matching KVC name. It's

Re: NSMenuItem - setHidden

2008-08-22 Thread Jonathan Hess
On Aug 22, 2008, at 6:15 PM, Graham Cox wrote: On 23 Aug 2008, at 5:30 am, chaitanya pandit wrote: [itemToBeHidden setAutoEnablesItems:NO]; Don't call setAutoEnblesItems on the item you want to hide (NSMenuItem) call it on the menu to which the item belongs (or is gonna get added

Re: call "setContentBorderThickness:forEdge:" in Tiger

2008-08-25 Thread Jonathan Hess
On Aug 25, 2008, at 12:22 PM, Georg Seifert wrote: Hello, I have a problem: - (id)initWithContentRect:(NSRect)contentRect styleMask: (unsigned int)windowStyle backing:(NSBackingStoreType)bufferingType defer: (BOOL)deferCreation { BOOL useTextured = YES; if([self respondsToSelecto

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
Hey Brad - So it sounds like you have two controllers, A, and B, and they each have their own NIB. Sound like you're on the right track. Now you want to have an action in B's NIB affect controller A. Does controller B have an instance variable, or other mechanism, for referencing controll

Re: App name from Bundle Identifier?

2008-09-12 Thread Jonathan Hess
Hey Dave - You could start with -[NSWorkspace absolutePathForAppBundleWithIdentifier:] to get a path. Use that path to create an NSBundle instance with +[NSBundle bundleWithPath:], and then use the NSBundle to find the name. -[NSBundle objectForInfoDictionaryKey:] and -[NSBundle localized

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
e code inside of your view controller. If your document is holding onto a reference to the main window controller, perhaps your view controller can do something like 'self window] windowController] document] mainWindowController]'. Good Luck - Jon Hess Thanks again. Brad On Se

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
I couldn't get to work, either). On Sep 12, 2008, at 2:43 PM, Jonathan Hess wrote: On Sep 12, 2008, at 2:25 PM, Brad Gibbs wrote: If I'm reading your mail correctly, I've tried that without success. I have a MainWindowController controlling MainWindow. On MainWindow.x

Re: Newb: Targeting an instance of a class instantiated by a NIB file

2008-09-12 Thread Jonathan Hess
ller containing the buttons through its window, to that window's controller and then to NSApp. I don't know how to cause it to jump to the main window's window controller. On Sep 12, 2008, at 5:15 PM, Jonathan Hess wrote: On Sep 12, 2008, at 3:07 PM, Brad Gibbs wrote: T

Re: Swapping IB-created views and keeping IBOutlets hooked up

2008-09-16 Thread Jonathan Hess
Hey Alex - If your controller is the File's Owner, and in your NIB there is a connection connecting the the File's Owner's 'myButton' outlet to a button, then when you load the nib, the controller's myButton instance variable will be connected to the button in the nib. So far, everything

Re: [Q] Custom NSFormatter and IB's Cocoa Simulator

2008-09-22 Thread Jonathan Hess
On Sep 22, 2008, at 4:01 PM, JongAm Park wrote: Hello. I tried making my own custom NSFormatter by following the guide, "Interface Builder Plug-In Programming Guide" However, when I tried my NSFormatter subclass using the "Simulate Interface" menu item of the Interface Builder, it rasied

Re: NSWindowController retain count confusion

2008-09-29 Thread Jonathan Hess
Hey James - The method -[NSObject retainCount] only exists to aid in debugging. You shouldn't be making any runtime decisions based on the return value of retainCount. You should only release something you previously retained/alloced/newed/copied or are for some other reason explicitly re

Re: How can I fix an error in a XIB file?

2008-03-03 Thread Jonathan Hess
Hey Brian - There are two known issues with IB 3.0 and AppKit where toolbars and path cells cause this issue during ibtool compilation. If it's a path control that's giving you trouble, I suggest changing the style to something other than NSPathStylePopUp and then resetting the style fro

Re: Interface Builder (almost) supports NSToolbar

2008-03-04 Thread Jonathan Hess
Hey Brian - Until IB allows you to set the identifier, I would do this instead: Add an outlet to your controller, something like "IBOutlet NSToolbarItem *myItem". Connect that to the item who's identifier you are interested in IB. Now, every place were you wanted to use a custom identifie

Re: How to debug a nib loading error?

2008-03-06 Thread Jonathan Hess
I would start by debugging with the NSZombieEnabled environment variable set to YES. You can read about that environment variable here: http://developer.apple.com/technotes/tn2004/tn2124.html If that doesn't work, I would try running with libgmalloc enabled. You can turn that on with "Enabl

Re: IB3 Application vs File Owner

2008-03-10 Thread Jonathan Hess
On Mar 8, 2008, at 8:27 AM, Quincey Morris wrote: On Mar 8, 2008, at 06:54, Trygve Inda wrote: IB3 has added an NSApplication object. How does this work... It seems if my AppController is still the delegate of the File's Owner that the specific instance of NSApplication is not needed

Re: Small variant of NSSearchField?

2008-03-10 Thread Jonathan Hess
Hey John - IB also typically changes the cell's font, and the control's frame when you use the pop up in the control size inspector. Hope that helps - Jon Hess On Mar 10, 2008, at 3:27 PM, John Stiles wrote: Interface Builder can easily make a small variant of NSSearchField— it's right the

Re: newb problem- Currency Converter app problem- Can't Add ConverterController Class to Nib

2008-03-13 Thread Jonathan Hess
Hey Edward - http://kevincathey.com/interface-builder/subclassing-in-interface-builder-3/ That might be helpful - Jon Hess On Mar 13, 2008, at 9:44 PM, Edward Scholl wrote: Thanks Dave and Dave- that was exactly the problem. I searched the archives, but couldn't quite find the solution. I

Re: newb problem- Currency Converter app problem- Can't Add ConverterController Class to Nib

2008-03-15 Thread Jonathan Hess
Hey Edward - I'm guessing that you're reading http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/06Controller/chapter_6_section_6.html#/ /apple_ref/doc/uid/TP4863-CH8-SW16 In that document, the screenshot, figure 5-3 is in a confusing place, read the next bullet point

Re: interface builder 3 question

2008-03-18 Thread Jonathan Hess
Hey Jack - IB syncs with Xcode whenever a document comes to the foreground and there is an open project for that document. IB only syncs the files as the appear on disk, so if you have unsaved changes in an editor window, IB won't pick them up. IB also only pulls in the headers from the

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Jonathan Hess
Hey Samvel - Your IBOutlets won't be connected until after init. You should probably move your code to awakeFromNib. Gotta run - Jon Hess On Mar 21, 2008, at 5:09 PM, Samvel Khalatian wrote: Hi, I am quite new in Cocoa programming and didn't understand yet how to set initial value for so

Re: Communications between multiple NIB's

2008-03-24 Thread Jonathan Hess
Hey Lincoln - To do this with actions and outlets, you just have to have your controllers communicate. Something like this should work: @interface MainController : NSObject { NSWindow *window; } - (void)setWindowBackgroundColor:(NSColor *)color; @end @implementation MainController -

Re: Leopard on PPC

2008-03-26 Thread Jonathan Hess
Hey Lorenzo - Did you remember to pass the trailing nil argument in the argument list to -[NSDictionary dictionaryWithObjectsAndKeys:]? Jon Hess On Mar 26, 2008, at 1:02 PM, Lorenzo wrote: Thanks, actually I get this crash log on the Console Path:/Applications/MyApp 1.2.3/MyAp

Re: Bloated NIB files

2008-03-31 Thread Jonathan Hess
Hey Andreas - What version of IB are you using? Also what objects are using the images? Maybe you could delete sections of the document and save and compare files sizes so that you can find the objects that are embedding the TIFF images directly in the archive. Perhaps they are coming fro

Re: HUD panel is deallocating itself after close

2008-04-01 Thread Jonathan Hess
Hey Sam - Uncheck 'release when closed' option in the IB inspector for your HUD window if it is checked. Good Luck - Jon Hess On Apr 1, 2008, at 10:12 PM, Sam Krishna wrote: (Leopard 10.2.5, x86) As a simple project, I'm trying to implement a HUD panel inside of the TextEdit codebase. T

Re: Name of NSTableView

2008-04-02 Thread Jonathan Hess
Sometimes using 'tag' in this manner is appropriate, but in most cases, its more descriptive to have an IBOutlet. That way you can say: if (tableView == courseListTableView) { } else if (tableView == studentListTableView) { } Jon Hess On Apr 2, 2008, at 5:41 PM, Adam Gerson wrote: All good

Re: -init and awakeFromNib called twice.

2008-04-25 Thread Jonathan Hess
Hey John - If init is being called twice on the same instance, that sounds like a bug. It should be pretty easy to figure out with a backtrace in the debugger. Of course, you should make sure there aren't two different instances. AwakeFromNib on the other hand will be called once each tim

Re: Loading a .nib?

2008-05-02 Thread Jonathan Hess
Hey Jason - I don't know the specifics of iTunes plug-ins, but normally you load a NIB with -[NSBundle loadNibFile:externalNameTable:withZone:] method. That method, and some more convenient form of it are available in AppKit and declared in NSNibLoading.h. Good Luck - Jon Hess On May 2,

Re: UI tool kit gone in IB 3?

2008-05-10 Thread Jonathan Hess
Hey Patrick - I'm not sure I understand your problem, but it sounds like you're looking for the palette from IB 2.0. If so, it's been replaced with "The Library". You can access the library from the "Tools" menu or with the key equivalent of command+shift+L. Good Luck - Jon Hess On May 1

Re: Custom NSControl is not visible when dropped on a window from IB3.1 Library

2009-01-06 Thread Jonathan Hess
Hey Richard - Did you implement encodeWithCoder: and initWithCoder: in your two classes? If so, did you remember to call through to super's implementation in each case? Also, does your cell correctly implement copyWithZone? I'd put a breakpoint in the drawing functions of the cell to see

Re: [iPhone] Search control like in App Store

2009-01-07 Thread Jonathan Hess
Hey Martijn - If you could file bugs at http://bugreport.apple.com/ about the concepts that you find confusing it would help us improve the usability of the tools. Thanks - Jon Hess On Jan 6, 2009, at 11:47 PM, Martijn van Exel wrote: Thanks - I looked into the TableSearch sample project

Re: A Question on estimating +arrayWithCapacity

2009-01-09 Thread Jonathan Hess
+[NSMutableArray array] returns a mutable array. That's the reason the return type is + (id) and not + (NSArray *). When implementing connivence initializers, you should invoke [self alloc], not [ASpecificClass alloc]. Cocoa uses this pattern frequently, and you can safely depend on it. O

Re: Problem setting up custom toolbar item in IB

2009-01-20 Thread Jonathan Hess
Hey Chunk - These are two distinct problems. The problem you are describing is that the z-order of the subviews of a custom view are reversed at runtime. Jon Hess On Jan 19, 2009, at 11:21 PM, Chunk 1978 wrote: not sure if it's related to a problem i've recently solved with custom views:

Re: NSTextField line breaking

2009-01-26 Thread Jonathan Hess
Hey John - Here are the methods you're looking for: - (void)setWraps:(BOOL)flag; - (void)setScrollable:(BOOL)flag; - (void)setScrollable:(BOOL)flag; They're from NSCell. Good Luck - Jon Hess On Jan 26, 2009, at 9:53 AM, John Nairn wrote: In a nib file I can set line breaking mode of an NSTex

Re: Multiple Nib Question

2009-01-28 Thread Jonathan Hess
- (NSString *)appSupportFolder { NSArray *paths = NSSearchPathForDirectoriesInDomains (NSApplicationSupportDirectory, NSUserDomainMask, YES); NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex: 0] : NSTemporaryDirectory(); return [basePath stringByAppendingPathComponent:@"Tom

Re: NSTableView Grows with # of rows

2009-01-28 Thread Jonathan Hess
On Jan 28, 2009, at 4:24 PM, Sean McBride wrote: On 1/28/09 7:26 PM, I. Savant said: Smiley aside, I think it's more than just 'typical'. Unless I'm missing some magic incantation, IB does not let you remove a tableview from its scrollview. No doubt it's possible programatically... Selec

Re: Interface Builder Plugin Dependency

2009-01-29 Thread Jonathan Hess
Hey Bridger - Does your plug-in and framework really need to create and crop an image while being unarchived and re-archived by ibtool? Perhaps you could retool your class so that the work happens lazily, and doesn't occur durring XIB compilation. As Joey said, ibtool to runs with no wind

Re: Interface Builder Nested Object Selection

2009-02-04 Thread Jonathan Hess
Hey Richard - Try "shift-right-click" or "shift-control-left-click" to see a context menu of everything under the mouse. Alternatively, see the "Tools->Select Parent" menu item with a key equivalent of command+control+Up Arrow. Good Luck - Jon Hess On Feb 4, 2009, at 5:24 PM, Richard Som

Re: Quicktime Movie View error

2009-02-06 Thread Jonathan Hess
On Feb 6, 2009, at 8:21 AM, elliott cable wrote: On Thu, Feb 5, 2009 at 11:02 PM, Kyle Sluder wrote: On Fri, Feb 6, 2009 at 1:05 AM, elliott cable wrote: today, and I'm running into the same problem. Does anybody know how I can fix it *without* switching away from XIBs? (I'm versioning

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-24 Thread Jonathan Hess
On Feb 20, 2009, at 1:05 AM, Alexander Spohr wrote: Am 20.02.2009 um 04:18 schrieb mmalc Crawford: On Feb 19, 2009, at 12:34 PM, mmalc Crawford wrote: See also updated: The Doc states: Y

Re: NSWindowController retain count confusion

2008-09-30 Thread Jonathan Hess
On Sep 30, 2008, at 12:01 PM, James Walker wrote: Jonathan Hess wrote: The method -[NSObject retainCount] only exists to aid in debugging. You shouldn't be making any runtime decisions based on the return value of retainCount. You should only release something you previously ret

Re: premature dealloc of the datasource of a NSTableView crashes my application

2008-10-05 Thread Jonathan Hess
On Oct 5, 2008, at 6:32 AM, Dr. Rolf Jansen wrote: Am 05.10.2008 um 00:36 schrieb Michael Ash: On Sat, Oct 4, 2008 at 4:01 PM, Dr. Rolf Jansen <[EMAIL PROTECTED]> wrote: Mac OS X 10.5.5, Xcode 3.1.1, PowerBook G4. ... In order to prevent my application from crashing, I overwrote -[NSObje

Re: Trouble with NSSplitView

2008-10-07 Thread Jonathan Hess
On Oct 7, 2008, at 4:44 PM, Dave Fernandes wrote: I had the same problem. The fix was to recreate the view in IB. Seems to be a bug in IB, but I never tried to repeat the problem once it was fixed. This isn't a problem with IB, it also isn't unique to split views. The problem has to do wit

Re: Trouble with NSSplitView

2008-10-08 Thread Jonathan Hess
Cocoa/Reference/ApplicationKit/Classes/NSSplitView_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/splitView:canCollapseSubview: Good Luck - Jon Hess Dave On Oct 7, 2008, at 10:43 PM, Jonathan Hess wrote: On Oct 7, 2008, at 4:44 PM, Dave Fernandes wrote: I had the same problem.

Re: NSView subclass

2008-10-15 Thread Jonathan Hess
On Oct 15, 2008, at 2:30 PM, Scott Andrew wrote: If its a delegate you would want to check if the delegate handles the selector with respondsToSelector and the use performSelector to make the call. For example if ([delegate respondsToSelector:@selector(pointClicked:)]) [delegate perfo

  1   2   >