You can't dynamically name Waits?
travis
Junior Member
I'm trying to do something like this:
Do I need to make some elaborate If logic that says
If data.device.port = 1
wait 50 'myWaits-1'
etc...
data_event [devArray] //more than one device can trigger this data_event
i = data.device.port
//i guess i might have to turn i from an int to a char here
WAIT 50 "'myWaits-',i"
{
do thangs
}
Do I need to make some elaborate If logic that says
If data.device.port = 1
wait 50 'myWaits-1'
etc...
Comments
-
That's the case pretty much. I'm not exactly sure what you're trying to accomplish, but it might be easier to use a set of timelines instead.
It'd be a little easier to grab the port infor as you suggested and just line them up sequentially with your timelines.
If you're only trying to do a few things that only have to happen once, then the wait might be the best way to go. -
Unfortunately, waits are created at compile time, not run time; each wait you type in your program has a unique address and can't be called while a previous instance of that wait is still running. You have to type a constant string and constant number.
-
Unfortunately, waits are created at compile time, not run time; each wait you type in your program has a unique address and can't be called while a previous instance of that wait is still running. You have to type a constant string and constant number.
Yes, and because they are created at compile time, using a variable to name one means the compiler has no idea how many to create since the variable could change. Creating an infinite number of any kind of resource is bound to crash something somewhere
.
It's a shame all NetLinx dynamic allocation is "under the hood." This is one of those cases where being able to call a constructor would be handy.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums