Developer/Add-On Names

General discussion about RailWorks, your thoughts, questions, news and views!

Moderator: Moderators

Locked
User avatar
paulz6
Very Active Forum Member
Posts: 2255
Joined: Tue Oct 18, 2005 4:22 pm
Location: Disused Railway Lineside Shack

Developer/Add-On Names

Post by paulz6 »

From RW Wiki:
3rd Party Developers need to establish their own folder structure for Source material to be located. To do this you need to first decide upon your provider name. It should have no spaces or unusual characters.
Does a hyphen count as an unusual character? Things seem to work.
The value of your investments may go up as well as down.
Trainguy76
Very Active Forum Member
Posts: 2053
Joined: Mon May 25, 2009 3:28 pm
Location: Dreamland, USA.
Contact:

Re: Developer/Add-On Names

Post by Trainguy76 »

I think not. If it is you could always use _.
The Most Astounding Fact

... .-.-.- - .-.-.- .- .-.-.- -.-- .-.-.-
User avatar
AndiS
Very Active Forum Member
Posts: 6207
Joined: Fri Sep 23, 2005 4:43 pm
Location: Jester's cell in ivory tower
Contact:

Re: Developer/Add-On Names

Post by AndiS »

You could frame this as an example on how the documentation pretends to be complete but cuts out all hard questions which would have demanded communication between programmer and documentation writer.

As it stands, I would not use anything other than characters (upper and lower case) and digits. You could always use upper and lower case for grouping, as in MeTheDeveloper. Be aware that this is mapped to folder names, which means that on Windows, it is not case sensitive. Inside RW, it may well be. I remember some lower case kuju somewhere in the KRS assets which seemed to work fine, but it was fixed, as far as I remember, in RW. But I could not point my finger on a specific item right now.

Of course, they could mean a lot of things with this statement. E.g., umlauts, accented characters, characters which are not legal part of DOS filenames, maybe something else.

Umlauts are one these cases which show you that even if it works somehow, it is not wise to do so. Someone had them in the filename (not provider or product). RW-Tools could not handle them (initially, now fixed, I guess). Also, some people cannot type them, thus they have a hard time Googling for them. In the end, if you go for the international minimum, people will love you (or not hate you) for that.

Now the underscore (_) is the one character which has been a legal part of variable names since stone age. I would count that with "usual characters" although the documentation does not say so.

The hyphen (-) is not illegal in DOS filenames, it is not a special character for string processing, and I cannot think of another case where it plays a role. So you may as well go for that, but see all the caveats above.
User avatar
miglietto
Been on the forums for a while
Posts: 214
Joined: Wed Sep 19, 2007 5:51 am
Location: Northern Italy

Re: Developer/Add-On Names

Post by miglietto »

Just a note to say that these names could pass trough many layers like C# code, xml parser, windows filesystem ... and all of them could generate troubles for illegal characters or be or not case sensitive.
Andrea
USRailFan
Very Active Forum Member
Posts: 4226
Joined: Wed May 14, 2003 8:07 am
Location: Norway

Re: Developer/Add-On Names

Post by USRailFan »

Hyphens should be OK, at least they work for G-Trax
Locked

Return to “[RW] General RW Discussion”