usingahashmapinavalueobject
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| usingahashmapinavalueobject [2026/01/25 20:47] – wikiadmin | usingahashmapinavalueobject [2026/01/25 21:07] (current) – [Setting up the ValueObject "MAP" Property] wikiadmin | ||
|---|---|---|---|
| Line 28: | Line 28: | ||
| map.put(" | map.put(" | ||
| map.put(" | map.put(" | ||
| - | map.put(" | + | map.put(" |
| //add the " | //add the " | ||
| Line 34: | Line 34: | ||
| vo = new LongValueObject(100); | vo = new LongValueObject(100); | ||
| - | vo.addProperty(" | + | vo.setProperty(" |
| //send it to the script | //send it to the script | ||
| - | / | + | / |
| </ | </ | ||
| Line 44: | Line 44: | ||
| ==== Using the MAP property in your Script ==== | ==== Using the MAP property in your Script ==== | ||
| + | An example of a script which extracts the MAP property and gets the various values based on the key | ||
| + | <code javascript> | ||
| + | |||
| + | if (incomingValue.getQuality()==0) { | ||
| + | |||
| + | // | ||
| + | |||
| + | vo = incomingValue; | ||
| + | map = incomingValue.getProperty(" | ||
| + | |||
| + | //you can test what class map is as a sanity check | ||
| + | print(" | ||
| + | |||
| + | value1 = map.get(" | ||
| + | value2 = map.get(" | ||
| + | color = map.get(" | ||
| + | //test color, get the r,g,b values | ||
| + | print(" | ||
| + | |||
| + | //you can use the values passed in the MAP property in your script.... | ||
| + | |||
| + | } | ||
| + | incomingValue; | ||
| + | |||
| + | |||
| + | </ | ||
usingahashmapinavalueobject.1769392046.txt.gz · Last modified: by wikiadmin
