[Seaside] How generate ID

Randal L. Schwartz merlyn at stonehenge.com
Sat Dec 29 20:52:03 UTC 2007

>>>>> "an" == an organic <seasidebeginner at gmail.com> writes:

an> i am writing small example in squeak seaside. I want save my objects in
an> image. And i have this class Category with ID, Name. Store in
an> OrderedCollection. My problem how generate next ID? i think about locking
an> and find max increase one and use it but isn't there simplier way?

If I'm not mistaken:

   anId := html nextId.

should do it for you.  You can also tell any tag-brush (like div or
unorderedList) to #ensureId, and get its id with #id.

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

More information about the seaside mailing list