mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 23:40:38 +00:00
* Source/NSDocument.m (-initWithContentsOfFile:ofType:): Set the
file name and type before attempting to read the document. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23546 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c7839ee576
commit
8bf4c36cc2
2 changed files with 9 additions and 6 deletions
|
@ -94,12 +94,10 @@
|
|||
self = [self init];
|
||||
if (self != nil)
|
||||
{
|
||||
if ([self readFromFile: fileName ofType: fileType])
|
||||
{
|
||||
[self setFileType: fileType];
|
||||
[self setFileName: fileName];
|
||||
}
|
||||
else
|
||||
[self setFileType: fileType];
|
||||
[self setFileName: fileName];
|
||||
|
||||
if (![self readFromFile: fileName ofType: fileType])
|
||||
{
|
||||
NSRunAlertPanel (_(@"Load failed"),
|
||||
_(@"Could not load file %@."),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue