Re: implementing a Viewer for file type (NOT Editor!)
Re: implementing a Viewer for file type (NOT Editor!)
- Subject: Re: implementing a Viewer for file type (NOT Editor!)
- From: Ondra Cada <email@hidden>
- Date: Tue, 21 Aug 2001 21:58:45 +0200
tknowlto,
sorry, I forgot:
>
>>>>> Ondra Cada (OC) wrote at Tue, 21 Aug 2001 21:42:24 +0200:
OC> If so and it still makes new docs (I have never tried yet an app which is
OC> a viewer only, so I don't know whether it is implemented properly or
OC> not), well, I guess the only way is to use this plain category
OC>
OC> // MIGHT NOT BE COMPATIBLE WITH FUTURE OS X RELEASES!
OC> @interface NSApplication (BlastTheBloomingEmptyDocCreation) @end
OC> @implementation NSApplication (BlastTheBloomingEmptyDocCreation)
OC> -(void)_doOpenUntitled { }
OC> @end
OC>
OC> since the documented way of implementing the
OC> applicationShouldHandleReopen:hasVisibleWindows: delegate method just
OC> does not work :(((
Actually, for your case when you don't want *ever* to make a new file the
delegate method applicationShouldOpenUntitledFile: might work properly -- do
check it, before using my hack! (I could not use it, since I needed just to
prevent the automatic making of new docs, keeping the "New" menu item
functional.)
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc