Tobie Langel wrote:
...
I'm also concerned about naming the method adequately. Sam suggested
Element#denominate which looks nicer than (generate|assign)Id but
which I fear could be confused with setting the name attribute. The
only other option I came up with is Element#identify. Thoughts on
-1 for identify (we're not talking about the act of identifying something,
but generating a unique id)
-1 for making it an instance method on elements (see my last post for
reason)
+1 for getId
+1 for static method only (Element#getId)
Actually, this should really be so general as to not even be
Ryan Gahl wrote:
-1 for identify (we're not talking about the act of identifying
something, but generating a unique id)
-1 for same reason
-1 for making it an instance method on elements (see my last post for
reason)
-1 for same reason
+1 for getId
I actually like create better than get
Ken Snyder wrote:
The function seems more useful if it returns the id. I'd vote for the
name Element#getId().
Not getId() since that implies that the id already exists and this is simply
retrieving it. createId() would be more indicative of what it does.
But since all this does it create
new in this release:
v2.16:
removed bragging rights files (they seemed to distract)
added support for Prototype 1.5.2_pre0 and Scriptaculous
1.7.1_beta3_rev7191
the formatted Prototype 1.5.2_pre0 contains additional fixes for
the following tickets:
Michael Peters wrote:
...
Just some random thoughts: maybe putting it in String since it returns a
string?
String.createUid()? Or maybe hanging it off of Prototype itself (seems like
that
would set a bad precedent for hanging tons of useful methods off of the
Prototype namespace). In
Sorry for the triple posts, as you may have noticed, Google Groups
went really crazy today, and I really thought my messages just weren't
going through.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype: