sardana-org / sardana

Moved to GitLab: https://gitlab.com/sardana-org/sardana
39 stars 52 forks source link

Add an easy way to obtain controller's elements in the macro code (SF#237) #131

Open sf-migrator-bot opened 10 years ago

sf-migrator-bot commented 10 years ago

In the macro code, it would be nice to be able to obtain a list of controller's elements, directly from the controller object. For the moment one has to do it manually iterating over the list of all pool's elements:

pool = ctrl.getPoolObj()
elements = []
for _, elem in pool.getElementsOfType(ctrl.getMainType()).items():
    if elem.controller != ctrl.getFullName():
        continue
    elements.append(elem)

Related with the this sardana-users thread.

Reported by: reszelaz ( http://sf.net/u/zreszela )

Original Ticket: sardana/tickets/237

sf-migrator-bot commented 9 years ago

Original comment by: cpascual (http://sf.net/u/cpascual)

sf-migrator-bot commented 8 years ago

Original comment by: reszelaz (http://sf.net/u/zreszela)