- Code: Select all
<Field id ="type27" type="menu" defaultValue="">
<List class="self" filter="" method="filterDisplayType" dynamicReload="false"/>
<Label>ITEM 27: .......................... select output type:</Label>
</Field>
- Code: Select all
def filterDisplayType(self, filter="", valuesDict=None, typeId="", devId=""):
list=[(u"0", u"not active")
,(u"text" , u"text eg %%d:sensorVolt:input%%[mV]")
,(u"textWformat" , u"text with format string eg %%v:123%%FORMAT%3.1f[mV]; only for numbers")
,(u"date" , u"date %Y-%m-%d full screen")
,(u"clock" , u"clock %H:%H full screen")
,(u"dateString" , u"date time, enter string format eg %HH:%M:%S")
,(u"line" , u"line ")
,(u"point" , u"point(s) ")
,(u"ellipse" , u"ellipse define top left and bottom right points")
,(u"image" , u"image file name ")
,(u"vBar" , u"vertical bar ")
,(u"hBar" , u"horizontal bar ")
,(u"vBarwBox" , u"vertical bar with box ")
,(u"hBarwBox" , u"horizontal bar with box")
,(u"rectangle" , u"rectangle")
,(u"triangle" , u"triangle")
,(u"hist" , u"histogram ")
,(u"NOP" , u"No operation, use to wait before next action")
,(u"exec" , u"execute")]
return list
the whole action xml is ~ 2500 lines long and it currently takes ~ 5 secs to load
Would it be faster if I replace the static method with an explicit list with the elements in "filterDisplayType" for all 29 fields?
I am trying to add 10 more and then the edit action times out.
Or I could go to "show one item only", but that would reduce the easiness of scrolling through all items, comparing values etc.
Karl