Dynamic variables
Comments
-
Yeah . . . nothing is perfect.
Don't get me wrong, I could switch that easily over to allow other panels to do stuff, this is just one of the ways I would do it. It is the easiest, and I don't know about you, but typically we don't have gobs of people running around setting their presets all at once, so it's not a problem
But, in true fashion of the forum, it seems to always be a debate of most efficient code rather than most practical, straight forward, or "easiest" code.
I have the same code on all the buttons (volume/channel/up/down/left/right etc) so it is something that occurs all the time. It isn't an obscure problem at all in my projects. I don't quite follow your code as there is no hold event. The user pushes a button and then there is a 3 second wait until something happens?\
I have a hold in my code and that's what I thought the discussion was about, using get_last with holds. If not, ignore my post
Paul -
I was just posting a way Dan could have / might have done what he was doing. I think I was the one off topic. And yes, the whole volume thing when press and hold is needed, I use timelines for that, not the way I set presets (as shown in the snippet of code I posted.)
-
Many thanks for all the input. I've ready got someting working, but a other thing that also has been done for this project took to much time (programming a Alcorn Mcbride video binloop). So I finally give my reaction.
What I've programmed friday:
The button eventBUTTON_EVENT[dvTPs,nVOLUME] //VOLUME CONTROL { PUSH: { LOCAL_VAR INTEGER nPNL LOCAL_VAR INTEGER nEVENT nPNL = GET_LAST(dvTPs) nEVENT = GET_LAST(nVOLUME) // Function layout // fnVOLUME(MODE, TYPE,ID,DEVICE) // MODE = Screen OR MLC // TYPE = Volume up or down // ID is the screen ID (only needed for a Philips screen, otherwise put in a zero: 0) SWITCH (nPNL) { CASE 1: fnVOLUME(nEVENT,1,1) CASE 2: { fnVOLUME(nEVENT,1,2) fnVOLUME(nEVENT,1,3) } CASE 3: fnVOLUME(nEVENT,1,4) CASE 4: fnVOLUME(nEVENT,1,5) CASE 5: fnVOLUME(nEVENT,1,6) CASE 6: fnVOLUME(nEVENT,1,7) CASE 7: fnVOLUME(nEVENT,2,0) } } HOLD[3,REPEAT]: { LOCAL_VAR INTEGER nPNL LOCAL_VAR INTEGER nEVENT nPNL = GET_LAST(dvTPs) nEVENT = GET_LAST(nVOLUME) SWITCH (nPNL) { CASE 1: fnVOLUME(nEVENT,1,1) CASE 2: { fnVOLUME(nEVENT,1,2) fnVOLUME(nEVENT,1,3) } CASE 3: fnVOLUME(nEVENT,1,4) CASE 4: fnVOLUME(nEVENT,1,5) CASE 5: fnVOLUME(nEVENT,1,6) CASE 6: fnVOLUME(nEVENT,1,7) CASE 7: fnVOLUME(nEVENT,2,0) } } }
It is still choosing whats the best way of programming.
Next thursday I've got my first AMX training in Belgium... to give a good view what's my programming level
-
*Sigh*
I give up . . . -
Don't give upI give up . . .
I almost give up when the project changed a little bit this afernoon and the affort of short programming has been reduced to minimal... so now i've found a workaround. I'm defining some more button events, so it will be around the 21 button events... it will be a lot quicker for me now to work like this then doing my best to short down all the code.
So what I posted this morning is already been undone....
But... I thanks everyone for giving his opinion about this
-
-
This is just a silly post because it's Friday afternoon...
Concerning the subject of this thread....
Aren't all variables dynamic by nature?
One could also say 'Static Constants' too...
-
ericmedley wrote: »This is just a silly post because it's Friday afternoon...
Concerning the subject of this thread....
Aren't all variables dynamic by nature?
One could also say 'Static Constants' too...
Not all variables are dynamic....NetLinx Keywords wrote:CONSTANT
This keyword is used as part of a variable declaration to specify that the variable cannot be changed at run-time. If a variable is declared with this keyword, it must be initialized in its declaration.
:P
Jeff
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