[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document kind for SAVE-A



        Reply to:   RE>Document kind for SAVE-APPL
> Three MCL questions:

One answered

> 1)
> I use 
> 
>      (SAVE-APPLICATION (CHOOSE-NEW-FILE-DIALOG)) 
> 
> to save a copy of the stuff I'm working on so I can 
> get back into it without reloading.  My application 
> is named, say, MyApp.
> 
> The problem is, now every file whose Kind in the 
> Mac OS used to be "Lisp document" is now a "MyApp 
> document".  Sometimes I want to open an old Lisp 
> document and go into plain Lisp, not the augmented 
> envinronment of MyApp.  

> Even worse, now that I've saved two different 
> versions of my application, as MyApp and MyApp2, my 
> most recently edited Lisp documents are one-by-one 
> becoming MyApp2 documents, while others are still 
> MyApp documents.  Now I'm getting "File not found 
> messages" when I eval a file that loads other 
> ".fasl" files -- it can't find them because they're 
> no longer the right kind.

This problem probably has nothing to do with file types
or doubled applications. I've got several prototypes
on my machine and can always load lisp files
into the apps and app-files into MACL transparently.
It sounds like a problem with pathnames to me.

> Help!  How can I make sure all my Lisp documents to 
> remain "Lisp documents"?

Each MAC application has a so-called "creator". If you 
save a file from an application it gets the apps creator.
This way the Finder can tell what documents belong to
what application. Now if you call save-app without the proper
keywords, the new app gets the same creator as MACL. This 
means that all files created from MACL and your new app have 
the same creator. This confuses the FINDER and causes the
behaviour you describe.
You can give your new apps their own creawtor by calling save-app
with the correct keyword argument: 

(save-application 
 "My HD:Proto 4:Proto" ;give a name or call (CHOOSE-NEW-FILE-DIALOG)
 :creator :pro4)       ; a unique creator type, always 4 chars

To solve the problems completely now get rid of all your 
previous prototypes and rebuild the desktop the next time you 
reboot your machine (If i remember correctly by holding down the 
apple and option keys while the machine starts up).
If you cannot live without your previous prototypes i guess that 
you can try to change their creator types with ResEdit, but i have 
no experience in that direction.

Good luck, Andre