Re: Newbie needs help...Is this possible?
Re: Newbie needs help...Is this possible?
- Subject: Re: Newbie needs help...Is this possible?
- From: email@hidden
- Date: Thu, 21 Feb 2002 13:28:51 -0800
I am in the process of switching over to Cocoa developing from
REALbasic. What I have is an NSTextView in a document-based Cocoa and
Applescript project. I would like to implement save and open in this
app. First of all, when the users saves the file I would like my app to
scan the contents of the NSTextView. If there is no graphics it will
save it as RTF but if it finds graphics it will save it as RTFD. In the
open I would like the script to be able to open RTF, TXT and RTFD
documents. If the document the user chooses is not one of those
documents it will display an alert saying "The file you are trying to
open is not recognized by this application, would you like to open it in
plain text format?" with a yes and no choice. If the user chooses no
they will be back in the open box to choose another file. If the users
says yes it will load the file as plain text.
Can this be done? Sorry if I am not explaining good enough, I am really
new at this.
It can certainly be done. ;->
I would recommend looking at the TextEdit example, in
/Developer/Examples/AppKit/TextEdit. That's the source for the TextEdit
app you probably already know from using OS X. It will show you how to
do these sorts of things and a whole lot more. Browsing through that
code and looking up things you don't understand in the developer
documentation (I recommend downloading a tool called Cocoa Browser to
help with reading the doc) should get you up to speed.
Good luck!
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.