This tile is great for allowing only one selection out of several. Like radio buttons.
This is a unique String ID assigned to this tile and is used (by you) to identify what tile sent what data by your script.
Note that this is case sensitive, and cannot contain any white space.
This modifies the size of the button as it appears on your screen. Its units of measurement is tiles. Since each tile that can have its size modified is aware of its surroundings, the numeric steppers used to adjust the tile size will stop you from overlapping with other tiles or going over the edge of the screen.
Here you can set the options/segments for the tile. It is possible to add as many options as you want, but they may not all fit in the view. Note, be sure that each option is unique.
You can set the selected segment by sending a string with the title of the sgement.
String → Segment Title → Select Segment with Segement Title
Set the mode to Default
.
self.force.sendMessage("Jordan's iPhone", "modeSelector", "Default")
The following is what data is sent from this tile to the server/your script. It is in the format:
Action → Data Type → Value
Segment Tapped → String → Segment Title
Note that a tile's tag is always sent to the server for identification purposes.
Sets the state of a program based on the input from the segmented control tile, with options Default
and Advanced
.
def forceServerDidReceiveData(self, deviceName, senderTag, data): if senderTag == "modeSelector": if data == "Default": self.setModeDefault() else data == "Advanced": self.setModeAdvacned()