auto generating mnemonics

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a problem auto-assigning mnemonics when dynamicly generating menues.

in some cases, two memorie entries get the same mnemonic key assigned
because the words begin with the same letter. this means, that they are more
or less useless

does anyone have an algorithm or some kind of code i can use to make sure
the mnemonic keys are unique when auto-assigning them

thank's!
 
Lukas,

You could keep a list of the keys used, and then check the second letter
when you see that a key is used already. If it isn't used, then use that
letter, and so on, and so on.

Hope this helps.
 
Nicholas,
I thought of that too, but what if I insert some Menues manually between the
generating. I guess it will mess up my whole list.
Doesn't anyone of you have a working script that i could implement?

thank's!
lukas

Nicholas Paldino said:
Lukas,

You could keep a list of the keys used, and then check the second letter
when you see that a key is used already. If it isn't used, then use that
letter, and so on, and so on.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Lukas Meusburger said:
i have a problem auto-assigning mnemonics when dynamicly generating menues.

in some cases, two memorie entries get the same mnemonic key assigned
because the words begin with the same letter. this means, that they are
more
or less useless

does anyone have an algorithm or some kind of code i can use to make sure
the mnemonic keys are unique when auto-assigning them

thank's!
 
Back
Top