Re: problems with NSOpenPanel (black rectangles)
Re: problems with NSOpenPanel (black rectangles)
- Subject: Re: problems with NSOpenPanel (black rectangles)
- From: Corbin Dunn <email@hidden>
- Date: Fri, 30 Sep 2005 16:28:59 -0700
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:
This email sent to email@hidden