tp.Names

tp.Names is the small Tripous name generator used when runtime code needs a unique generated name or element id. It keeps an internal counter per prefix. Calling tp.Names.Next("Button") repeatedly returns names such as Button2000, Button2001, and so on.

Prefix lookup is case-insensitive, so "Panel" and "panel" share the same counter. tp.NextName() is a public shortcut for tp.Names.Next(). tp.SafeId() also generates a name, but replaces dots with dashes so the result is safer to use as an HTML id.

Generate names

Type a prefix and generate names from that prefix. The counter is internal and keeps moving forward while the page is loaded.

Prefix counters

Each prefix has its own counter, but prefix matching is case-insensitive. This makes generated names stable enough for readable runtime ids.

Safe ids

tp.SafeId() uses tp.Prefix when no prefix is supplied. It also replaces dots with dashes.

Default prefix

tp.Prefix is the default Tripous id/name prefix. The default tp.SafeId() call uses it.