Rockbox Ports are now being developed for various digital audio players!
I have found a problem with the ‘overloading’ of the %xp tag ( %xpa|srcx|srcy|w|h and %xpa|srcx|srcy|w|h|x|y ). Because of the optional x,y parameters, it becomes very difficult to check for when used in conditionals.%?pv<%xpr|0|0|15|15|%xpr|15|0|15|15> - this will fail as it expects to find a trailing '|'. (coding assumption)%?pv<%xpr|0|0|15|15|%xpr|15|0|15|15|> - this wont fail, but will have three conditional options%?pv<%xpr|0|0|15|15|10|10|%xpr|15|0|15|15|> - this wont fail, but is it two conditionals( first %xp command with x,y cords), or is it 4, an %xp, 10, 10, %xp..The only safe way I can see around this is to have two new tags, one with the x,y coords, one without..%xp|srcx|srcy|w|h%xx|srcx|srcy|w|h|x|yAny suggestions on the second tag, could be %xx or %xP, or %xpxyAlternatively, could the syntax for tag parms be changed to use ',' (comma) rather than '|' (or). The 'or' would still make sense for separating the options in conditionals.. ie %?pv<%xpr,0,0,15,15,10,10|%xpr,15,0,15,15>
I am happy to go with the majority decision on this. 1. Keep the current separators ( | ) and have the two tags.or2. Switch to a comma separator, and have one overloaded tag.  Would it be acceptable to change the tag syntax for this one tag?  This would go against the wps ‘standard’ already in place.  This is a decision for the ‘core’ dev team to make, not for me and my first patch  imho I think it would make sense to have tag parameters separated by a comma, and aim to change the syntax of all parameterised tags over time.In the short, term there would be a non-consistent syntax for wps tags, but long term it would be easier to include more conditional options without the problems encountered here.
As of the different separator, I'm totally in favour of the idea and I like the semicolon.
Wouldn't using a semicolon as separator potentialy cause problems when used with alternating sublines?
kahuna_999: I haven't had time to look at the patch, but I suggest you look at how the progressbar tag is parsed. IMHO it's quite a good way of treating this sort of tag that has a variable number of numerical parameters. Maybe we could even have a function dealing with it in a generic way...
Page created in 0.119 seconds with 14 queries.