Re: Can't coerce to string
"Brian Alliet" <[email protected]>
| Newsgroups | gmane.comp.java.xwt.core |
|---|---|
| Message-ID | <006d01c406e6$bd26d520$6601a8c0@brian> |
> 1) why isn't the output guarranteed to be unique?
> 2) is it not possible for the output to be unique?
Java doesn't provide any way to get a unique string from an object. We could
construct our own ID by assigning each box a number or something, but that
would be ugly.
> 3) the reason people do this is because it's _very_ easy. You're
> taking away a powerful tool for people to use.
Not at all. org.xwt.js allows you to use any object as a key in a hashtable
(even boxes). The only thing this takes away from you is the ability to do
ibex.log.info("Box is: " + box) The output from this isn't very helpful
anyway so I don't think this is a problem.
-Brian