On Sat, Apr 13, 2013 at 01:35:55PM -0500, jorge ivan poot diaz wrote: > Hello Ariel, > > may be you can simply > > append a number when the name is already used, given "Blue 9": "Blue > > 10", then if "Blue 11" is already used, increase it and try with "Blue > > 12" and so on. > > Ok. I like this idea. How I can generate this number?
I leave this for you, as homework; it is simply an algorithm, nothing specific to OO API nor C++, you could even find the algorithm using python. What I'm not sure is how generic this can be: will a RTL language use the "Color N" pattern, or "N Color"? And some locales may not use the Western-Arabic numerals used with the Latin script, wikipedia shows http://en.wikipedia.org/wiki/Eastern_Arabic_numerals and http://en.wikipedia.org/wiki/Indian_numerals Regards -- Ariel Constenla-Haile La Plata, Argentina
pgp0j2qFANVW0.pgp
Description: PGP signature