RM: default values for command parms
Moderator: Moderators
RM: default values for command parms
This is to continue the discussion started here.
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
I'm feeling rather short of knowledge or maybe wisdom (but more likely memory) on that subject.
I assume you'd like some general meta-rule for specifying the ways of computing the default values of command parameters. Nothing leaps to mind. I can't even recall any interesting examples other than the ones you know (fixed value or one of the device parameters or 255 minus a device parameter). I'm sure once you finish coding it I'll think of what I should have told you before you started.
I assume you'd like some general meta-rule for specifying the ways of computing the default values of command parameters. Nothing leaps to mind. I can't even recall any interesting examples other than the ones you know (fixed value or one of the device parameters or 255 minus a device parameter). I'm sure once you finish coding it I'll think of what I should have told you before you started.
I've been trying various things to get the default values for command parameters going. I've got it so that the hex command is correctly calculated when the user leaves a command parameter that has a default value blank.
Understand that RM really only keeps track of the hex command. All other cmd parms are derived from the hex command. The hex is the master. It is what is stored in the .rmdu file.
The hex isn't any different when the default value is used than when the user enters the same value as the default value. Right now I'm making it so that when the value extracted from the hex matches the default value, I don't display a value for the command parameter.
Understand that RM really only keeps track of the hex command. All other cmd parms are derived from the hex command. The hex is the master. It is what is stored in the .rmdu file.
The hex isn't any different when the default value is used than when the user enters the same value as the default value. Right now I'm making it so that when the value extracted from the hex matches the default value, I don't display a value for the command parameter.
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)