TreeView --> rename should be relabel

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: TreeView --> rename should be relabel

Post by chrisb »

I like this one very much, its from Alice in Wonderland:

...
`Or else it doesn’t, you know. The name of the song is called “Haddocks’ Eyes.”‘
`Oh, that’s the name of the song, is it?’ Alice said, trying to feel interested.
`No, you don’t understand,’ the Knight said, looking a little vexed. `That’s what the name is called. The name really is “The Aged Aged Man.”‘
`Then I ought to have said “That’s what the song is called”?’ Alice corrected herself.
`No, you oughtn’t: that’s quite another thing! The song is called “Ways and Means”: but that’s only what it’s called, you know!’
`Well, what is the song, then?’ said Alice, who was by this time completely bewildered.
`I was coming to that,’ the Knight said. `The song really is “A-sitting On A Gate”: and the tune’s my own invention.’
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: TreeView --> rename should be relabel

Post by bejant »

The only confusion which happens again and again is people do not know there is a name and a label and they think the label is the name because the name is not seen no anywhere.
But in which situation should this be relevant for a GUI user?
Maybe it would be a way to help the GUI user learn the correct FreeCAD names labels terminology?
akazen
Posts: 8
Joined: Tue Mar 12, 2019 4:16 pm

Re: TreeView --> rename should be relabel

Post by akazen »

Hi folks,
I was searching for the keyword "rename" and found this quit outdated article. I understand, that there is a discussion, if the "raname"-feature should be renamed itself to "relable". But what I'm still missing 3 years after this discussion is the feature renaming object nativly (not by just adding a lable).
There are a frew reasons on this. FreeCAD uses fore exemple the native name of an object in exporting to raytracing files. If one later wants to modify or even understand the exported files, its hard to understand.
So I want a feature, that natively renames the object instead relabling it. Is there anything against programming this feature?
akazen
Posts: 8
Joined: Tue Mar 12, 2019 4:16 pm

Re: TreeView --> rename should be relabel

Post by akazen »

Hi folks,
its relevant in all kind of exports, where the object name is part of the export and not the lable (for example Raytracing)
I already placed an reply to this article, but is seems that it is not getting published - berhaps of connection issues.
My question was, if there any argues agains programming a feature that realy does a rename (instead of relabling) an object. If not, I would implement this feature.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: TreeView --> rename should be relabel

Post by wandererfan »

akazen wrote: Tue Mar 12, 2019 10:53 pm Hi folks,
its relevant in all kind of exports, where the object name is part of the export and not the lable (for example Raytracing)
I already placed an reply to this article, but is seems that it is not getting published - berhaps of connection issues.
My question was, if there any argues agains programming a feature that realy does a rename (instead of relabling) an object. If not, I would implement this feature.
The object name is a unique, unchanging reference to the object. It is the key used to retrieve an object from the document and in links between objects. We don't change object names.

It might make more sense to request that the exports use the Label property instead of the the Name.
akazen
Posts: 8
Joined: Tue Mar 12, 2019 4:16 pm

Re: TreeView --> rename should be relabel

Post by akazen »

wandererfan wrote: Wed Mar 13, 2019 12:16 pm
The object name is a unique, unchanging reference to the object.
Yes I know. It's gettings hashed in phyton thus beeing a unique number as index. Keeping this in mind I was thinking about a deep copy of the original object with the new name and then deleting the one with the old name. Thus there would be a real rename.
wandererfan wrote: Wed Mar 13, 2019 12:16 pm
It might make more sense to request that the exports use the Label property instead of the the Name.
Yes, this might also be an aproach, but as I see growing the functionality of FreeCAD nearly every one that is new to the project first uses the name for doing something. That's why I was thinking about eliminating the problem at its root.

An other aproach (to force all programmers to do the right thing) may be, to generate allways a uniqe ID (integers) for new objects (as well with opening a file) an store the name of the object always in the label. As I started years ago I was first of all also confused about the two names spaces.
Post Reply