Re: NSOpenPanel obsolete method?
Re: NSOpenPanel obsolete method?
- Subject: Re: NSOpenPanel obsolete method?
- From: Joe Muscara <email@hidden>
- Date: Sun, 1 Jul 2001 11:44:49 -0500
On Sunday, July 1, 2001, at 11:17 AM, John Timmer wrote:
I'm getting the following warning in my compiles:
*** WARNING: Method runModalForDirectory:file:types:relativeToWindow: in
class NSOpenPanel is obsolete and will be removed in release GM ***
A few questions on this:
Is this method really going to be removed?
You're best off assuming so. If it is, then your app will break if you
use the method.
Can I safely assume that schedule has changed, as the GM has come and
gone?
Has it really come and gone? ;~)
If it is going to be removed, is its functionality going to be
replicated
(clearly, I think it should be)?
It already has been replicated. Check out the NSOpenPanel docs, and you
will find the new method,
"beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:
contextInfo" It is, unfortunately, a little trickier to use than
runModalForDirectory:file:types:relativeToWindow: since you need to use
selectors and things that are a bit confusing at first. Fortunately,
there are places it is used in /Developer/Examples; I think I found it
in TextEdit's code.
Aside from waiting for my compiles or the resulting program to start
failing, is there any way to track when this method will actually
change?
Don't know. But you should find that when Apple is going to remove a
method, they have a recommended replacement already available. At least
I hope that will always be the case!
Joe