Skip to main content

Do we should tell all of the cases to GRIN in show text file?

2 replies [Last post]
xpirator
Offline
Joined: 2010-02-01

There is an example for the most complex remote control handling at chapter 23. And the show file is like the following, which describes all of the selected(and activated) state of the each letter in the 3x3 box.

But, I'm really sorry to say that this is really tedious and hard works. In addition, the bottom of show text file, in the "rc handling" part, we should contain "forwarding address" that takes us to get the correct behavior we wanted with 'grid' keyword.

In my personal opinion, even I don't get the concrete solution, lightweight extension mechanism might avoid this hard coding via

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chihiro_saito
Offline
Joined: 2006-11-08

For this particular case, I believe a new syntax called menu_assembly greatly reduces the reputation. In the latest hdcookbook menu example in the hdcookbook.dev.java.net repository, the script looks like this.

============================
feature menu_assembly F:UserInput
template {
all { F:UserInput.Message }
a { F:UserInput.A.Normal }
b { F:UserInput.B.Normal }
d { F:UserInput.D.Normal }
h { F:UserInput.H.Normal }
l { F:UserInput.L.Normal }
r { F:UserInput.R.Normal }
u { F:UserInput.U.Normal }
v { F:UserInput.V.Normal }
y { F:UserInput.Y.Normal }
enter { F:UserInput.Enter.Normal }
close { F:UserInput.Close.Normal }
} parts {
a.selected { a { F:UserInput.A.Selected } }
b.selected { b { F:UserInput.B.Selected } }
d.selected { d { F:UserInput.D.Selected } }
h.selected { h { F:UserInput.H.Selected } }
l.selected { l { F:UserInput.L.Selected } }
r.selected { r { F:UserInput.R.Selected } }
u.selected { u { F:UserInput.U.Selected } }
v.selected { v { F:UserInput.V.Selected } }
y.selected { y { F:UserInput.Y.Selected } }
enter.selected { enter { F:UserInput.Enter.Selected } }
close.selected { close { F:UserInput.Close.Selected } }

a.activated { a { F:UserInput.A.Activated
F:UserInput.A.Timer } }
b.activated { b { F:UserInput.B.Activated
F:UserInput.B.Timer } }
d.activated { d { F:UserInput.D.Activated
F:UserInput.D.Timer } }
h.activated { h { F:UserInput.H.Activated
F:UserInput.H.Timer } }
l.activated { l { F:UserInput.L.Activated
F:UserInput.L.Timer } }
r.activated { r { F:UserInput.R.Activated
F:UserInput.R.Timer } }
u.activated { u { F:UserInput.U.Activated
F:UserInput.U.Timer } }
v.activated { v { F:UserInput.V.Activated
F:UserInput.V.Timer } }
y.activated { y { F:UserInput.Y.Activated
F:UserInput.Y.Timer } }
enter.activated { enter { F:UserInput.Enter.Activated
F:UserInput.Enter.Timer } }
close.activated { close { F:UserInput.Close.Selected
F:UserInput.Close.Timer } }
}
;
============================

xpirator
Offline
Joined: 2010-02-01

Thank you very much!

- Richard