Thanks for that link, Greg. It appeared to have a lot of the history, so I wanted to take the time to read the whole (6-year-old!) thread, but in retrospect, it didn't enlighten me as much as I'd hoped. But it was worth the read nevertheless.
gfb107 wrote:Use of the button code in the map also allows for the renaming of buttons for different devices and or modes, or even between remotes that share a common image.
I understand the last part of that -- you might have 2 map files, each referencing the same image file, but using different button names. Without looking, I don't know if there are any current examples of that, but I appreciate the logic.
But I don't understand the "allows for the renaming of buttons for different devices and or modes" part. Can you expand on that, please? And maybe give an example to help me understand?
So, in my confused state, I'm still struggling with why we should have
both the button code
and the button name in the map file.
Having both of them potentially provides some theoretical remote-drawing, button-labeling application with the ability to avoid reading the RDF but at the real-world cost of adding the potential for a button name discrepancy.
So, the more I've thought about this, the more I think that there's a valid argument to use
only button codes in the map files. In fact, you (Greg) suggested that very thing in the referenced thread and Nils seemed to agree that it was a good idea. It wasn't clear to me why that idea didn't persevere, though. It sounds more logical and less error-prone than what we have currently, since it would nicely remove the whole issue of conflicting names for buttons in the RDF and map files.
In fact, I'll take it a step further and go so far as to wonder aloud:
Why shouldn't the data from the map files just be part of the RDF? That would
really eliminate the problem. The details about the remote's button positions and sizes (in conjunction with the image filename, of course) seem like a logical candidate for the RDF anyway. And this would reduce the set of files needed to specify everything you need to know about a remote control from 3 files to just 2 (or even 1 if the image data was encoded/decoded directly into/from the RDF with 'uuencode'/'uudecode' or similar -- think about that for a second -- the RDF would then cover everything!).
I envision a "[Buttons]" section with entries like this, 1 button definition per line (example derived from the URC-10820's files):
Code: Select all
Play=$0c :: circle 70,103 89,111
"up arrow":Up=$31 :: poly 49,185 59,195 70,191 81,195 90,185 79,178 69,176 58,179 49,185 49,185
Now maybe this suggestion is problematic for reasons I don't envision (beyond the obvious burden on the apps which read RDFs and the overhaul of the RDFs to incorporate that data, the latter of which could probably be automated). I'm certainly not suggesting we change anything in the short term, but I think it might be valuable to have the discussion.
What apps use the map files? I think only RM does. And since RM has to read the RDFs anyway, putting the map data into the RDF would cause no RDF-reading penalty to applications which only use the map file because there are none and probably never would be any, I suspect.
On a different but related note, from that thread, it almost sounded like, at one point in the past, RM would detect a mismatch in the button name used in the RDF and map files. Based on that, I tested it. Vicky's tool shows that the RS 15-100 remote has 19 cases where buttons are defined in the map file but not in the RDF. So I loaded up RM 1.98beta4 and selected the 15-100 remote. There's no warning or error message, but I noticed that, for example, the "Record" button isn't circled -- it's not available -- essentially just as predicted by Vicky's tool report. After shutdown of RM, I looked in 'rmaster.err' and sure enough, I see this:
Code: Select all
Searching for remote with name RS 15-100
Warning: Shape defined for unknown button SAT_CBL
Warning: Shape defined for unknown button AUDIO
Warning: Shape defined for unknown button pvr_menu
Warning: Shape defined for unknown button thumbs_down
Warning: Shape defined for unknown button tv/vcr
Warning: Shape defined for unknown button record
Warning: Shape defined for unknown button rewind
Warning: Shape defined for unknown button fast_forward
Warning: Shape defined for unknown button MOVE_skip-
Warning: Shape defined for unknown button PIP_live-tv
Warning: Shape defined for unknown button SWAP_skip+
Warning: Shape defined for unknown button thumbs_up
Warning: Shape defined for unknown button fav_scan
Warning: Shape defined for unknown button page_down
Warning: Shape defined for unknown button page_up
Warning: Shape defined for unknown button arrow_left
Warning: Shape defined for unknown button arrow_up
Warning: Shape defined for unknown button arrow_down
Warning: Shape defined for unknown button arrow_right
Shouldn't these errors be more prominent, maybe annunciated with a single pop-up window? It seems to me like RM would be a good place to flag this. Even though Vicky's tool catches these problems so that they can be fixed before release of the RDF/map files, having a secondary check would be a good thing, especially as it seems that we have erroneous map/RDF files out there now.
From a different angle, I'm surprised that over 600 "missing button" errors (across several variants of remotes) could have gone undetected for so long. It seems to me that someone would be using their remote, find out that there's a button they can't access and complain.
Confused... (in more ways than one!

)
Bill