Rockbox

Tasklist

FS#12586 - %ss Substring returns a string and not a value.

Attached to Project: Rockbox
Opened by Cameron Smith (KiwiCam) - Sunday, 12 February 2012, 00:26 GMT
Last edited by Jonathan Gordon (jdgordon) - Saturday, 25 February 2012, 13:51 GMT
Task Type Bugs
Category Themes
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Not sure if I've chosen the correct Reported Version (94177e6-120128 Simulator Clip+

The %ss Substring option seems to return a string and not a value.

I'd like to be able to use this:

%xd(El,%ss(1, 1, %cM)) but that doesn't work. This does though:

%ss(1, 1, %cM)
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Saturday, 25 February 2012, 13:51 GMT
Reason for closing:  Fixed
Additional comments about closing:  31a0595
Comment by Frank Gevaerts (fg) - Sunday, 12 February 2012, 10:57 GMT
I see what you're trying to do, but how is a sub*string* tag returning a *string* a bug?
Comment by Cameron Smith (KiwiCam) - Sunday, 12 February 2012, 18:59 GMT
Hi Gavaerts. I was asked by JdGordon to file this as a bug.

From the conversations I've seen on the forums, one of the main points of the %ss (or something like it) was to be able to use the value returned in choosing or determining the position of a sub-image, for bar tag params etc. I see no use for a returned string, but I can see plenty of uses for the returned values. The manual states Value as well.

Can an option be added to this that returns a value/number? Or, can another Tag be created that will allow us Themers to obtain a number value portion from other Tags? A %sn or a %sv if they're still available???

Using something like this would allow us to create far more complex conditionals with the least amount of coding.

I'd also like to make use of the %and() and %or() to use these as comparisons for values (not sure of any of the terminology here) For instance, I'd like to use a subimage for each minute %?if(%cM,=,%or(04,14,24,34,44,54))<%xd(Ei)|%cM> but that's only for comparing tags.

There's SO MUCH I can do with Theme's if I can just get a way to make use of these functions. I can think of lots of things; Changing Colours of a viewport, or bitmaps progressively while a file is playing, Moving Bitmaps within a Viewport diagonally, circles etc making use of the Width, Height options in conjunction with the %ss returned values. I've got a tonne of Animations that are just waiting to be tried.

Thanks.

Loading...