Hi,
I want to create a component with multiple devices.
For example my first working component for the ACS712 features only a single component, I want to update this component to include the following device "ACS759" which has a range of 0-200A for this device I need to program a different sensitivity. There for I want to rename this component to "ACS7xx" where the xx stand for 59,12,62 this way I want to include more devices into one component.
I want that the user can select the device range such as "59" via a drop down menu "list of text"
But how do I use this property in flowcode, I have tried "getvalue" & "getvalue from list" but none of them worked.
I hope I'm clear about my problem and I hope you can Help me.
Regards jordy
Component: list f text property how to
Moderator: Benj
Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
Only feature requests will be considered here. General questions should not be posted in this forum.
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Component: list f text property how to
Hi Jordy.
The 'List of Text' and 'List of Ints' work by splitting each line into two parts.
The first part is a 3-character code you can use for your list. The second part is a cosmetic string that the User sees. These are shown in the property edit window in the margin and main area respectively. Clicking on the margin you can alter the code for your list item. The reasons it is done this way are:
1) Ease of programming - you can alter and edit the cosmetic text, translate it, etc, and always have a reliable comparison value for your program.
2) Future-proofing. Amending the list is more reliable because the values in the list that the User sees do not have to be in any particular order or have specific values
The property when read as a variable reads the value of the list item selected. The Fixed list of text/ints reads the value back as a quoted string or an integer value, respectively, otherwise both behave the same way.
I have attached an example program. This uses the Property change event to change a text label on the system panel to the index you have chosen whenever the property changes. I hope this is useful.
Jonny
The 'List of Text' and 'List of Ints' work by splitting each line into two parts.
The first part is a 3-character code you can use for your list. The second part is a cosmetic string that the User sees. These are shown in the property edit window in the margin and main area respectively. Clicking on the margin you can alter the code for your list item. The reasons it is done this way are:
1) Ease of programming - you can alter and edit the cosmetic text, translate it, etc, and always have a reliable comparison value for your program.
2) Future-proofing. Amending the list is more reliable because the values in the list that the User sees do not have to be in any particular order or have specific values
The property when read as a variable reads the value of the list item selected. The Fixed list of text/ints reads the value back as a quoted string or an integer value, respectively, otherwise both behave the same way.
I have attached an example program. This uses the Property change event to change a text label on the system panel to the index you have chosen whenever the property changes. I hope this is useful.
Jonny