Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Aug 15, 2018 2:08 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 3:32 pm 
Offline

Joined: Mon Oct 09, 2006 9:05 am
Posts: 145
I can get the DisplayName of files and folders by using
s=f.DisplayName


Is there a way to set the DisplayName?

Any solution without plug-Ins is welcome.
Thank you in advance.

_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 4:45 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
You can change the NAME of the file... but not "just" the display name


f.name="new_name"


But beware this changes the physical filename...

f.NAME sets it
f.DISPLAYNAME gets it

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 5:19 pm 
Offline

Joined: Mon Oct 09, 2006 9:05 am
Posts: 145
DaveS wrote:
You can change the NAME of the file... but not "just" the display name


f.name="new_name"


But beware this changes the physical filename...

f.NAME sets it
f.DISPLAYNAME gets it


Thank you DaveS. This is known.

I'm looking for a solution to set the DisplayName. As you know, it is not the same.

_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 5:25 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
No.. I am pretty sure they are the same...... the DISPLAY name is the name AFTER the path and before the extension

Changing that changes the physical name of the file residing on the storage device

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 5:25 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
No.. I am pretty sure they are the same...... the DISPLAY name is the name AFTER the path and before the extension

Changing that changes the physical name of the file residing on the storage device


per the LR... DISPLAYNAME is READONLY
and NAME is used to rename a file and equates to the value returned by DISPLAYNAME

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 5:53 pm 
Offline

Joined: Mon Oct 09, 2006 9:05 am
Posts: 145
DaveS wrote:
No.. I am pretty sure they are the same......


Try to get the following code on a non-english system. you will see, it is not the same.
Dim f as FolderItem=SpecialFolder.Pictures
msgBox f.Name+ EndOfLine+ f.DisplayName


Maybe there is a shell utility which can set the DisplayName?

_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 5:54 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
perhaps post your example (results not code)

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 6:15 pm 
Offline

Joined: Mon Oct 09, 2006 9:05 am
Posts: 145
DaveS, when you use the code above you will get for DisplayName on a

Spanish system->Fotos
German system->Bilder
French system->Photos

The f.Name is always the same, "Pictures".

_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sun Nov 18, 2012 6:23 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
well good luck.... I only speak English..... so I can't help

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Mon Nov 19, 2012 3:20 am 
Offline
Site Admin
User avatar

Joined: Tue May 06, 2008 1:07 pm
Posts: 1464
Location: NotEvenOnTheMap, CT
Inside the Pictures folder, look for the .Localized file.

It is not recommended that you touch it though. Files do not have any localized names, only folders, and only on Mac OS. Even then, not all folders can automatically be localized.

So, for all intensive purposes, you really cannot set the display name. You might have some luck altering the .Localized file inside the folder, but it is not recommended.

_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Wed Nov 21, 2012 10:52 am 
Offline

Joined: Mon Oct 09, 2006 9:05 am
Posts: 145
Thank you, Thom.

When you move e.g. Pictures-folder outside your home directory, and create a new folder(no alias) with the name Pictures inside your home directory, the path of the new folder(Pictures) has the same path as the old Pictures-folder. This means that the path of the new folder is not correct(The path is outside the home directory). Even when you restart the finder, the path is not correct. Only a restart solves the issue.

I thought setting the DisplayName can help to solve it.


Do you have a solution for this issue?

_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sat Nov 24, 2012 4:03 am 
Offline
User avatar

Joined: Sun Jul 15, 2007 3:12 am
Posts: 119
Location: Denmark, Europe
Can I ask why you would want to move the Pictures folder and then create a new one in it's place? Why can't the existing folder be used, or another folder called "Pictures " with a space after, or simply called "Images" or something else?

It's not that I doubt what you're doing, it's just that it may be easier to help if we knew exactly why you want to do this :)

The Pictures folder is a special folder in OS X, and should really be left alone, so if you could explain what you want to do and why, perhaps we can help a bit more :)

_________________
REAL Studio 2012 Pro (Release 1.2) on a 17" MacBook Pro running Mac OS X Mountain Lion.
ATTENTION Danish RS Devs - make sure you join our Facebook group at http://www.facebook.com/groups/danske.realstudio.udviklere/


Top
 Profile  
Reply with quote  
 Post subject: Re: How to set the DisplayName of a file or folder?
PostPosted: Sat Nov 24, 2012 10:26 am 
Offline

Joined: Mon Oct 09, 2006 9:05 am
Posts: 145
I know that the Pictures folder is something special, also I'm something special and we don't wanna forget also you are something special. :wink:

As I mentioned before, when you move e.g. Pictures-folder outside your home directory, and create a new folder(no alias) with the name Pictures inside your home directory, the path of the new folder(Pictures) has the same path as the old Pictures-folder. This means that the path of the new folder is not correct(The path is outside the home directory). Even when you restart the finder, the path is not correct. Only a restart solves the issue.

This just happens on OS X 10.6.8. On 10.8.2, there is no problem.


Any constructive solution is welcome?

_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group