ctn-archive / nengo_gui_2014

HTML5 graphical interface for Nengo -- now obsolete! Please use https://github.com/nengo/nengo_gui instead
Other
6 stars 0 forks source link

javaviz and item names #53

Closed tcstewar closed 10 years ago

tcstewar commented 10 years ago

New nengo doesn't have unique labels, but old nengo (and thus javaviz) requires this. We should use the specified labels when possible, and fall back on the same "id" values that the namefinder.py uses to refer to the components in the gui.

tcstewar commented 10 years ago

This is harder than expected, since the javaviz system doesn't automatically get access to the locals() dictionary needed to do the namefinder. So instead it makes up unique names by adding (#) on the end of the obj.label.

I think this works well enough for now.

celiasmith commented 10 years ago

So we should make sure to use unique labels? Or is # a variable you generate that makes it unique?

On 30 May 2014 18:49:01 GMT-04:00, tcstewar notifications@github.com wrote:

This is harder than expected, since the javaviz system doesn't automatically get access to the locals() dictionary needed to do the namefinder. So instead it makes up unique names by adding (#) on the end of the obj.label.

I think this works well enough for now.


Reply to this email directly or view it on GitHub: https://github.com/ctn-waterloo/nengo_gui/issues/53#issuecomment-44707858

tcstewar commented 10 years ago

It generates a unique #

tcstewar commented 10 years ago

Okay, names are now much happier. If you specify a label, it'll use that. If you don't, it'll fall back on the name created by namefinder. Not sure this is always the right order, but seems good in the cases I've tried.

It'll also use a "." hierarchy to show the subnetwork structure.