summaryrefslogtreecommitdiff
path: root/Pb_Api/Param/MultiSelect.py
diff options
context:
space:
mode:
authorPepper <pepper@scannerjammer.com>2015-03-04 15:57:53 -0500
committerPepper <pepper@scannerjammer.com>2015-03-04 15:57:53 -0500
commit021842ec42b991e7a641ae26862d77b324ea05db (patch)
tree81194a75da0ff1279af7346d6e50cd424c33bacb /Pb_Api/Param/MultiSelect.py
parent513526efe79ff90be5b23459253dd5f553ec73d6 (diff)
started oop code
Diffstat (limited to 'Pb_Api/Param/MultiSelect.py')
-rw-r--r--Pb_Api/Param/MultiSelect.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Pb_Api/Param/MultiSelect.py b/Pb_Api/Param/MultiSelect.py
new file mode 100644
index 0000000..c482dfd
--- /dev/null
+++ b/Pb_Api/Param/MultiSelect.py
@@ -0,0 +1,16 @@
+from Pb_Api.Param import Pb_Api_Param
+
+class Pb_Api_Param_MultiSelect(Pb_Api_Param):
+ def __init__(self, options):
+ super(Pb_Api_Param_MultiSelect, self).__init__(*args, **kwargs)
+ def options(self):
+ return self.options
+ def value(self, *args):
+ if len(args) > 1:
+ valid = False
+ for i in self.options:
+ if args[0] == i['value']: valid = True
+ if not valid : raise ValueError
+ super(Pb_Api_Param_MultiSelect, self).value(args[0])
+ def randomize(self):
+ pass