PDA

View Full Version : Max Template Name Length



dulux-oz
August 24th, 2015, 08:27
Hi Guys,

Is there a maximum length for template names - say around 32 characters?

Cheers

kylania
August 24th, 2015, 15:27
Do you have FG installed in Program Files? If so you're adding a whole bunch of useless characters to any path.

C:\Program Files (x86)\Fantasy Grounds\FGData vs C:\FGData

Otherwise, no idea. :)

dulux-oz
August 24th, 2015, 15:31
Do you have FG installed in Program Files? If so you're adding a whole bunch of useless characters to any path.

C:\Program Files (x86)\Fantasy Grounds\FGData vs C:\FGData

Otherwise, no idea. :)

No, it's not a path issue, it's an XML template coding issue.

Besides, I've moved my default data directory to somewhere where I can find it easily (as I recommend in the first of my Tutorial videos) :)

Trenloe
August 24th, 2015, 15:35
Besides, I've moved my default data directory to somewhere where I can find it easily (as I recommend in the first of my Tutorial videos) :)
You might want to change that recommendation. There have been quite a few posts recently where the devs have recommended *not* changing the data directory from the installation default.

dulux-oz
August 24th, 2015, 16:06
You might want to change that recommendation. There have been quite a few posts recently where the devs have recommended *not* changing the data directory from the installation default.

Yeah, I've been thinking about that for the update video - the recommendation was made back in v3.0.2 days (before the 5E encryption stuff was done).

Meanwhile, can we please get this thread back on topic - so, can someone say if there is a limit and what that limit may be - thanks :)

Moon Wizard
August 24th, 2015, 22:11
There's no limit that's hard coded.

Regards,
JPG

dulux-oz
August 25th, 2015, 02:19
Hmmm,

OK, the reason I asked is that I write self-documenting code, which means I use very descriptive (ie long) names for my classes/templates, etc. I was using a new template yesterday which is a a child of a long chain of parent-child templates and so this template's parent had a name around 38 characters long, while the grand-parent template's name was about 28 characters long. I've use the parent template before and everything was AOK - all properties and methods inherited as normal/expected. However, the child template didn't inherit the parent's properties, only the grand-parent's properties.

So, after much testing, confirmation of correct spelling of names, etc, etc, etc, I made an exact duplicate of the parent template but renamed it to only 7 characters and made the child template a child of this duplicate - and presto! everything works.

So I was wondering if there is a limit on template names (and 32 characters is a logical number within the discovered band of 28-38 characters)?

Moon Wizard
August 25th, 2015, 03:02
There may be a limit on XML or in the library we use, but nothing we limit.

Regards,
JPG

dulux-oz
August 25th, 2015, 03:49
OK, thanks for that - it looks like we'd best keep them to under 32 characters then (as a rule of thumb) :)

Cheers