SmallSense__PO.st
changeset 153 b04d591c8788
parent 133 bd659b67811c
child 157 c71d2e62ece2
--- a/SmallSense__PO.st	Wed Dec 18 00:03:23 2013 +0100
+++ b/SmallSense__PO.st	Sat Jan 18 22:56:44 2014 +0000
@@ -3,7 +3,7 @@
 "{ NameSpace: SmallSense }"
 
 HierarchicalItem subclass:#PO
-	instanceVariableNames:'subject icon label name context'
+	instanceVariableNames:'subject icon label name relevance context'
 	classVariableNames:'IconWidth'
 	poolDictionaries:''
 	category:'SmallSense-Core-Interface-PO'
@@ -79,6 +79,30 @@
     name := something.
 !
 
+relevance
+    "Return relevance value, i.e., how much likely is that this
+     is what user wants to complete.
+
+     Relevance is an integer between 1 (least relevant) and 
+     100 (most relevant)"
+
+    ^ relevance ? 1
+
+    "Modified: / 18-01-2014 / 22:41:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+relevance: anInteger
+    "Set the relevance value, i.e., how much likely is that this
+     is what user wants to complete.
+
+     Relevance is an integer between 1 (least relevant) and 
+     100 (most relevant)"
+
+    ^ relevance := anInteger.
+
+    "Modified: / 18-01-2014 / 22:41:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 stringAlreadyWritten
     "Answers a string already written in the textview"