Re: Assertion in writeToFile:ofType:
Re: Assertion in writeToFile:ofType:
- Subject: Re: Assertion in writeToFile:ofType:
- From: Seth Willits <email@hidden>
- Date: Fri, 13 May 2005 00:30:20 -0700
On May 12, 2005, at 11:39 PM, mmalcolm crawford wrote:
Umm, it's not intended to be. The documentation makes the
supported architecture clear -- if you diverge significantly from
that it's not surprising that additional customisation is required
or that you hit "edge cases".
Yeah, I know. I just happened to be hitting edge cases everywhere. In
some places it felt that there could have been an aditional method to
make customizing for multi-doc support easier.
It not clear from this whether you're actually displaying the save
panel yourself or if you're relying on standard behaviour in the kit?
I'm actually displaying the panel myself since it has to be modal. I
found that if I used the standard methods, the panel would display as
a sheet if the document was the window's current document and
otherwise would display as a modal dialog. Besides being inconsistent
to the user, the difference between the method being synchronous and
asynchronous made things get out of order. At the moment if I do a
"Save All" action with multiple unsaved documents in the window, a
modal dialog is presented for each one. In the future I'd like to
switch these all to sheets, but the code architecture is completely
different and at the moment I'd rather just get it working so I can
focus on finishing the rest of the app and come back and polish this
part later.
I'd *guess* that the type is not being set and is hence nil. You
might try overriding writeToFile:... to call super and insert a
"dummy" type...
It didn't even occur to me to override it and see what was going on.
That's a great idea...
Sure enough, the type is null. That's easy to workaround, but I
wonder why it happens.
Thanks Mmalcolm,
Seth Willits
----------------------------------------------------------
Freak Software - http://www.freaksw.com/
ResExcellence - http://www.resexcellence.com/realbasic/
----------------------------------------------------------
_______________________________________________
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