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: problems with NSOpenPanel (black rectangles)





Am Sep 30, 2005 um 6:41 AM schrieb Andrew Bush:
Im having some problems with NSOpenPanel, when I use it to select files its displaying large black rectangles when the user clicks on folders in the columns...ie, you click on a folder, the current column flashes a large black rectangle and then displays the next column to the right as expected.

Is this one particular user, or do you see the problem yourself?

What are your user-defaults for your app? Are you setting any NSXXX ones? Are any set by accident?

--corbin


this is on 10.3, I have reports that its far worse again on 10.4

Also, in a vaguely related note, Im compiling my app on 10.3, and it appears to run fine on 10.4, *except* I have reports that radiobuttons and checkboxes in my prefs window are black rectangles in 10.4 under many circumstances...click on one and all the rest black out their entire frame and various other things...is this an expected sideproduct of not compiling on 10.4? or is there something else happening here?

...I was actually surprised it ran at all on 10.4, I had an idea that you specifically needed to recompile for different versions of os x...is that totally wrong?

That is wrong..you don't need to recompile for a new version of the OS. You _may_ need to recompile to get certain AppKit features "turned on". We have some runtime link checks that only will do certain things if you compile on certain versions. This is to maintain as much compatability as possible.


-corbin



Here is the code Im using for NSOpenPanel.

	NSOpenPanel *op;
	int result;
	NSString* tempPath=nil;
	
	op = [NSOpenPanel openPanel];

	[op setCanChooseFiles:NO];
	[op setAllowsMultipleSelection:NO];
	[op setCanChooseDirectories:YES];

	result = [op runModalForDirectory:NSHomeDirectory()
                    file:nil types:nil];
	if (result == NSOKButton)
	{
		tempPath=[[op filename] retain];				

	}
	return tempPath;


looks fine, but you probably have a memory leak.

return [tempPath autorelease];

And make sure the caller doesn't assume the string is already retained for them.

--corbin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >problems with NSOpenPanel (black rectangles) (From: Andrew Bush <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.