File:Recent does not work.

Here's where to discuss using Stéphane Leys' very well done alternative runtime editor. If you're a control freak at runtime you have to check this out!

File:Recent does not work.

Postby drpitcairn » Mon Dec 28, 2009 2:23 pm

If I choose "Recent" from the File menu, the file I last used is indeed the first one in the list. If I choose it, I get the message "file cannot be found. Item will be removed from the recents folder". However, the file of course can be found. I had just used it. Also, that item is NOT removed from the list but still there next time with same result.
When saved to Favorites I can get it to work but not for the Recent option.
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: File:Recent does not work.

Postby S. Leys » Tue Dec 29, 2009 12:29 am

rpitcairn wrote:If I choose "Recent" from the File menu, the file I last used is indeed the first one in the list. If I choose it, I get the message "file cannot be found. Item will be removed from the recents folder". However, the file of course can be found. I had just used it. Also, that item is NOT removed from the list but still there next time with same result.
When saved to Favorites I can get it to work but not for the Recent option.


Several questions :
- Are you using the recents menu usually ? Does it usually work ?
- Is it only this project, IOW, does other items of the recents menu work ?
- Could this project ever be open from the recents menu ?
- Does the name of your project (or the name of the folders where it is) contain some special char (like a comma ...) ?
- Is the long name of this project very long ?
- Did you recently move this project from a folder to another one ? Or change its name (or the name of the folders where it is) from the Finder ?

This feature is done with AppleScript. It seems that the Finder couldn't resolve the alias.
I remember having this problem of AS failing after having the "Where is ..." navigation dialog when passing by error a wrong argument to the answer file command. I reported the bug. Did this happen to you ? If this is the case, the only way I know to fix it is to quit SC and relaunch.
What's weird is that it works in the favorites and not in the recents, these two menus are handled the same way, I'll verify if there is any difference between the two.

Could you do a test :
- quit SC and relaunch
- create a new project (without an anchor window), name it "test", put it into a folder not too far from the root of your disk to have a short path name.
- close this project
- try opening it again from the recents menu.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: File:Recent does not work.

Postby S. Leys » Tue Dec 29, 2009 12:36 am

rpitcairn wrote:If I choose "Recent" from the File menu



PS : reading your mail on the SE forum, I have other questions :
- Are you sure that your project wasn't still open in SE when you tried opening it in SC ?
- Did you quit SE before opening SC ?

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: File:Recent does not work.

Postby drpitcairn » Tue Dec 29, 2009 7:22 am

S,
SE was closed. I only opened it once and got stuck and posted.
Experimented as you suggested and opened a test project which would reopen from Recents. Also opened the "word find" project you sent me some time ago. That also opened all right with recents.
The one that will not open in Recents is titled "Bogers GA" so has two words if that is an issue. I also notice that the main window for that project spells it "Boger's GA" with the apostrophe. Could that be a problem? The apostrophe is not in the project name.

Your questions:
- Are you using the recents menu usually ? Does it usually work ?

I don't usually use it but have tried it now and then without success. Was trying it again and ran into this problem so thought I would post it.
- Is it only this project, IOW, does other items of the recents menu work ?

See above. Other projects open.
- Could this project ever be open from the recents menu ?

No.
- Does the name of your project (or the name of the folders where it is) contain some special char (like a comma ...) ?

See above. There is upper and lower case, also two words for the project.
- Is the long name of this project very long ?

project "Primus:Users:drpitcairn:Documents:Boger General Analysis:Bogers GA.sc45"
- Did you recently move this project from a folder to another one ? Or change its name (or the name of the folders where it is) from the Finder ?

No.
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: File:Recent does not work.

Postby S. Leys » Tue Dec 29, 2009 8:37 am

rpitcairn wrote:project "Primus:Users:drpitcairn:Documents:Boger General Analysis:Bogers GA.sc45"


Short enough path, this is not the problem.
The name of the window doesn't matter either, this name is internal to SC, AS doesn't see it.
I have a copy of your project here and I can open it from the recents menu without any problem.

So, to summarize, the recents menu works except for this project.
And this project works from the favorites menu.

Rather mysterious. I didn't have the time to look at that today, I'll dig it tomorrow.
You could look at the "mPI favorites" folder in the SC Pouch and see if there are not several aliases with this name there, if it is the case, delete them all, even if there is only one, you could try deleting it, it will be recreated the next time you'll open the project.
When you open a project, MPI, tells the Finder to store an alias to it into this folder, then it looks at this folder for building the recents menu.
The only reason I can see is that the alias would be corrupted while the one in the favorites folder wouldn't be.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: File:Recent does not work.

Postby drpitcairn » Tue Dec 29, 2009 9:34 am

I went to the mPIFavorites folder, deleted all the files there (some of them duplicates of the one I am trying to open) and then opened the project again. This time it works. Once opened it is listed in Recents and can be opened from there.
The only thing to add to this information is that yesterday after I posted I used the function in the Recents menu which is "Edit this menu". I thought something similar, that if I could remove all the files then maybe it would work. There were 30 files in there (a guess, didn't count) and I selected all to remove but all but about 6 were removed. No matter how many times I tried, either as single files or as a selected group, I could not delete them and have an empty menu.
Don't know if this is the way it is supposed to work or not, but reporting it.

Thanks for your help.

Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: File:Recent does not work.

Postby S. Leys » Tue Dec 29, 2009 10:11 am

rpitcairn wrote:I selected all to remove but all but about 6 were removed. No matter how many times I tried, either as single files or as a selected group, I could not delete them and have an empty menu.


They should normally have been removed all.
IMHO, you should run the disk utility.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: File:Recent does not work.

Postby drpitcairn » Tue Dec 29, 2009 6:34 pm

I ran Disk Utility. No problems found. Repaired permissions.
In SC, opened 3 files, then went in and edited the menu and was able to eliminate all the recent files. So working.

Thanks,
Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: File:Recent does not work.

Postby drpitcairn » Sun Jan 10, 2010 11:54 am

Just letting you know same problem came up. After I deleted what was in the recents folder it worked for a while, then stopped working again. So I just went in and deleted again but there seems to be a problem if it comes back like this.
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: File:Recent does not work.

Postby S. Leys » Mon Jan 11, 2010 1:33 am

rpitcairn wrote:Just letting you know same problem came up. After I deleted what was in the recents folder it worked for a while, then stopped working again. So I just went in and deleted again but there seems to be a problem if it comes back like this.


Yes, there is a problem, indeed. The question is which problem.
The only case when it happened here is after having the "where is ..." navigation dialog when passing a wrong project name to some SC command. But when this happens, quitting SC an relaunching solves the problem (but the alias has been deleted and is not any more in the recents menu). This is a bug in SC, I've reported it.
Did this happen to you ?
I know, I already asked but I'm asking again because it is important.
Are you sure that you didn't see this :
where is.jpeg
where is.jpeg (27.92 KiB) Viewed 5772 times

This would explain the problem.
It may be caused by any scripting error doing that SC can't find a file. It is rather easy to do this kind of mistake, thus having this dialog is quite common.
After it happens, anything related to AS will fail. Even if it happened hours before and you forgot, the Finder didn't forget. When it happens, the sole solution that I know is to quit SC and relaunch before doing any AS call.
Because if you don't quit immediately, trying to quit after doing an AS call may fail and you may have to force quitting.
Did you have to force quitting after having this error message ? (but there may be different behavior with different OS).

If you're sure that we're not in this case, we need to look for something else.
So, it works for a while, then it stops working, then you delete the aliases from the recents folder, then it works again. Yes ?
It works again when you delete the aliases ?
Can you clear these aliases from the "Edit this menu" item ? In a previous post, you said that it failed.
When it fails for one project, does it fail also for all the projects of the recents menu ?
Is it always the same project ?
If you have the same project in the favorites menu, does it fail from this menu too ?

Here is what MPI is doing :
Code: Select all
function GetOrig  aliasName
    get script(do, AppleScript, merge("tell application `Finder` to return the original item of file `[[aliasName]]` as string "))
    get value(it)
    if exists(file,it) then return it
    Alert caution "can't find original file. The Alias will be deleted from the recents folder"
    delete file aliasName
    return ""
end GetOrig

Is it the error message you get ?

If this is the case, what happens is that the Finder failed to resolve the alias. The question is why. What happens between the time when it works and when it doesn't work any more ? Are you doing anything unusual ? Since the problem is apparently in the Finder, it might be something which doesn't seem to be related to SC.

One reason could be that the project is already open in another app. Normally, when this happens, MPI should send another error message. Either "this file is busy" or "the cantmodify of the project is true". But, again, the Finder or AS may have different behaviors in different versions of the OS. So, posting exactly the message you get is essential.
The project may be open from SE, the SAM or the Player. Did you open it with one of these applications ? did you quit them before trying to open the project in SC ?

Just to be sure, you could verify the permissions of the recents folder.

Didn't you replace the project with a backup ?

Since I can't reproduce the problem, the solution may only come from a clue you'll give me.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: File:Recent does not work.

Postby drpitcairn » Mon Jan 11, 2010 10:45 am

S,
The problem is exactly the same as I posted in the first entry above. I am attaching a picture of the warning that comes up. The message is that it will be deleted from the Recents menu but it is not. Yesterday I emptied the folder completely and today it is still generating the same error.
As for it being open in another program — no, it is not. I do have the SC Help open. And I have created standalones but did not keep the Standalone builder open. I have not been working with a backup, well, maybe there was a backup I went back to some weeks ago, but certainly not of late.
The Favorites choice seems to work, this file being the only one in there.
So take a look at this message and tell me what more I can check.

mpi error.png
mpi error.png (21.16 KiB) Viewed 5753 times
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: File:Recent does not work.

Postby S. Leys » Tue Jan 12, 2010 2:19 am

rpitcairn wrote:So take a look at this message and tell me what more I can check.


OK, what we know for sure :
1- the project was not open in another app.
2- the error message is the one I thought. This message is sent when the Finder fails to resolve the alias.
3- you didn't replace the original project by a backup nor did anything which could confuse the Finder about the link between the alias and the original file.

What is not totally clear :
1- You said that, after the error, the alias is not deleted. But I found a problem, MPI isn't rebuilding the recent menu when deleting the alias. I fixed that but in the meantime this item is still in the menu even if the alias has actually been deleted. So the question is if the alias is still in the folder when you look at it in the Finder or is it just the item in the menu ? This is an important question because it will tell me if the problem is only with AS or not (deleting the alias is not done by AS).
2- You say that the alias to the same project in the favorites menu "seems" to work. I would prefer to know if it works for sure or not.

What you didn't tell me :
1- Did you see the "where is ..." dialog I described in my previous mail ? Even a long time before in the same session ? This is a VERY important question because if the answer is yes, it is the reason of the problem. There are 3 possible answers :
- you're sure that you didn't see it
- you're sure that you saw it
- you don't remember clearly because it may have happened a long time before.
So, tell me no only if you're sure and if you're not sure, keep an eye on this.
2- Did you have to force quitting SC after having this error message ?
3- When one item of the recents folder fails, do others work or do they all fail ?
4- Are the permissions of this folder set to read and write ?
5- After deleting the aliases in the Finder, the recents menu works again until ... Until what is the big question. Could you confirm that deleting the aliases fixes the problem, at least for some time ?

There might be a problem with your "mPI recents" folder. What you could do is deleting it, not only its content but the folder itself. MPI will create a new one if it doesn't find it the next time you open a project. To be safe, quit SC before deleting this folder and relaunch after deleting it.

It goes without saying that all this works here. So, the solution depends of the info you're giving me. I may ask the same questions several times, I'm sorry about that but it just means that I wish to be sure that there is no ambiguity. If I could reproduce it, I wouldn't ask all these questions. So, please, take my questions one by one and give an answer as clear and sure as possible to ALL of them (I prefer that you tell me that you don't know if it is the case rather than giving me unsure information).

TIA

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: File:Recent does not work.

Postby Scott » Tue Jan 12, 2010 6:01 am

It might be better if you two exchange email addresses over PM and communicate directly.
User avatar
Scott
Site Admin
 
Posts: 1235
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada


Return to Using MPI

Who is online

Users browsing this forum: No registered users and 1 guest