overtone/overtone — comment on commit c6d2436c8f7aa5950db29d47154cf30178d275dc
File:  line 0
By daveray:

I don't have any definitive answers. This falls squarely in the "still learning how to use Seesaw" category. In OO you'd usually create a sub-class that holds the extra info. Obviously that's not very satisfying. Since the widgets are just raw Swing objects, there's no good way to extend them all to `IAssociative`. Here are a couple ideas:

* When you make the widgets, give them an `:id` that you can use as a key into a datastructure. I think this is a technique frequently used in JavaScript where behavior is added to markup after the fact.
* There's `seesaw.meta/put-meta and get-meta`. Those are implemented efficiently for widgets using Swing's built-in property maps.
* Use sub-classing. There's a kinda crappy notional example [here](https://github.com/daveray/seesaw/blob/develop/src/seesaw/widgets/log_window.clj).

Something else? I kinda like the first approach the best, but generating ids is kind a pain sometimes.