-
1. Re: Bridge looses cache folder tree window when I rename parent folder
Muppet Mark Jul 6, 2011 2:06 AM (in response to Pedro Marques)Pedro, I have No Idea why you are using bridgetalk to do this? Any how I don't have any issues when I change the name of the active document window like this…
#target bridge app.bringToFront(); app.document.thumbnail.spec.rename( '_' + app.document.thumbnail.spec.name );
It correctly now moves to the top of the tree of my desktop…
-
2. Re: Bridge looses cache folder tree window when I rename parent folder
Pedro Marques Jul 6, 2011 2:52 AM (in response to Muppet Mark)Yes, the simpler, the best.
Now it keeps the navigating folders open/closed in the left folders column but...
I wanted him not to go to the parent folder above but be able to keep the view - on the central content window - of the files in the folder I've just renamed (not the parent).
Rename but not move (or to return to the view of the folder remaned). 50% resolved, sorry.
Thanks
-
3. Re: Bridge looses cache folder tree window when I rename parent folder
Muppet Mark Jul 6, 2011 3:56 AM (in response to Pedro Marques)Im not sure what you mean by this… This should reset the active doc thumbnail back to the renamed folder…
#target bridge app.bringToFront(); var orgName = app.document.thumbnail.spec.name, orgPath = app.document.thumbnail.spec.path, newName = '_' + orgName; app.document.thumbnail.spec.rename( newName ); var newThumb = new Thumbnail( Folder( orgPath + '/' + newName ) ); app.document.thumbnail = newThumb;
-
4. Re: Bridge looses cache folder tree window when I rename parent folder
Pedro Marques Jul 6, 2011 7:31 AM (in response to Muppet Mark)When I apply it to a folder, it returns now to that folder in main bridge window, but...
all the navegational tree on the left folder window simply desapears and I have to re-open all the selected folders e subfolders, and some times I have 30, 40 folders selected and opened.The problem persists.
-
5. Re: Bridge looses cache folder tree window when I rename parent folder
Pedro Marques Apr 17, 2013 4:55 AM (in response to Muppet Mark)#target bridge
app.bringToFront();
var orgName = app.document.thumbnail.spec.name,
orgPath = app.document.thumbnail.spec.path,
newName = '_' + orgName;
app.document.thumbnail.spec.rename( newName );
var newThumb = new Thumbnail( Folder( orgPath + '/' + newName ) );
app.document.thumbnail = newThumb;
// with this, the left Folder Panel doesn't desapear and this is OK, but the Content Panel goes to Desktop (???):
app.document.presentationPath = newThumb;
What can I do to mantain both visible?
-
6. Re: Bridge looses cache folder tree window when I rename parent folder
Pedro Marques May 27, 2013 3:43 AM (in response to Muppet Mark)After a while... I had manage not to loose my folder Bridge panel with this code:
I am using only the portion of code to be runned with a button on my personal window:
if (app.isProcessingJob()) {
alert("Bridge is busy.Try again.) ");
} else {
var CurrentFolder = decodeURI(Folder(app.document.presentationPath));
var CurrentFolderName = decodeURI(Folder(app.document.presentationPath).name);
// go to the parent folder before renaming the child folder above choosen:
app.document.thumbnail = new Thumbnail(new Folder(app.document.presentationPath).parent);
// renaming
Folder(CurrentFolder).rename("_" + CurrentFolderName);
// Here is when it refreshes all the children folders:
// The problem here is to make refresh not refresh('all') - the Default - because it is slow.
// I wanted to make refresh(INFOSET) more quick. To refresh only the names (I didn't manage to create a spcific Infoset var for that.
app.document.thumbnail.refresh();
//
// After refreshing, now I can have on my Content panel but also my folder panel visible (not loosing it):
app.document.thumbnail = new Thumbnail( Folder(app.document.presentationPath + "\\_"+ CurrentFolderName) );
}
-
7. Re: Bridge looses cache folder tree window when I rename parent folder
Pedro Marques Jul 15, 2014 3:54 AM (in response to Muppet Mark)I can't believe I found it, but it works and it is simple.
At the same time, I spent 2 years using Bridge the wrong way and if I had an Adobe Bridge dev here, I wouldn't be very happy.
Why Adobe simply can't give straight and direct answers like this case?
When i rename a app.document.presentationPath, I usually returned to its parent folder on first place and then refresh() this one.
Then I would go back to the new renamed folder.
Problem:
The 'Content' panel was OK and refreshed but the 'Folders' panel was not: the last non-renamed folder was still there and I always needed to close its parent folder on 'Folder' panel, click F5, and reopen making that ghost folder to disappear.
The solution is simple and logical but sadly it took 2 years for me to solve it.
I only needed to start dealing with the node string containing a fully qualified Bridge URI (uniform resource identifier).
For example:
var origin = Folder(app.document.presentationPath);
var renamedFolderName = 'v_'+ Folder(app.document.presentationPath).name;
app.document.thumbnail = new Thumbnail(new Folder(app.document.presentationPath).parent); // back to parent folder
//
Folder(origin).rename(renamedFolderName ); // renaming
app.document.thumbnail.refresh(); // refreshing the parent folder
app.document.thumbnail = new Thumbnail(new Thumbnail(Folder(Folder(origin).parent + "/" + renamedFolderName ).fsName).uri); // the uri is the node (fully qualified Bridge URI)
And... the 'Folders' panel was updated correctly and the ghost folder vanished!


