Thanks but I have some problem to optain the WidgetWrapper. I can't do not have the 'getCompoennets' from the WidgetContainer and I can't cast it to a WidgetPanel.
Le samedi 8 mars 2014 01:09:45 UTC+1, Seth Tisue a écrit : > > >>>>> "Chris" == Chris Coat <[email protected] <javascript:>> writes: > > Chris> Thank you for both answers, i'll help a lot. However, any idea > Chris> to how I can get the right instance of my button in my extension > Chris> ? > > https://github.com/NetLogo/Goo-Extension/blob/master/src/GooExtension.scala > has sample code for looping over widgets. (It's in Scala; I don't know > of a similar example in Java.) The core is: from workspace, do > `getWidgetContainer` then `getComponents`; for each WidgetWrapper in the > result, the `widget` method will look inside and you can check whether > it's a ButtonWidget or what. If you want to filter by name, call > `displayName`. > > -- > Seth Tisue | http://tisue.net > -- You received this message because you are subscribed to the Google Groups "netlogo-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
