Support and General Use > Theming and Appearance Customization

Sth. wrong with my WPS!

<< < (2/4) > >>

[Saint]:
yzflcyq,

Just had a quick glance then...nothing I can immediately see stands out as being *obviously wrong*, but I have a few suggestions:

-I *think* (without actually seeing the intended layout of the .wps) there may be instances where using bitmap-strips could help clean up your code.
-There are quite a few things drawn in the "default" viewport, which I personally would put in viewports.
-"%xl|"ing all your .bmps at the beginning of the .wps can help a lot to clean the code up visually, make it easier to read, and make errors easier to spot.

Oh, and I've just noticed now that line 46 "#%x|y|ylfull.bmp|42|302|" is completely irrelevant, a: it's commented out, and b: It's the only place in the .wps "ylfull.bmp" exists (it's not loaded anywhere first...)

None of the things should stop the .wps from working though...Not drawing in the default viewport, using bitmap-strips where you can, etc. are just "good housekeeping" in my opinion and shouldn't have any effect on the output.
And line 46 isn't really hurting anyone sitting there doing nothing...but, for the final product everything helps (remember, you may not be the only one reading your code ;))

I'll run checkwps on it when I get home, and if no-one else has found it by then I'll post the output.


[St.]

yzflcyq:
But it's commented...
I'll try to delete all the comment.

jtrodriguez:

--- Quote from: karashata on May 02, 2010, 08:23:04 PM ---@jtrodriguez: No offense to your suggestion, but did you take a look at how old those simulator builds are..? Considering his theme is no longer working with more recent builds, a simulator as out-dated as the ones currently being hosted might not help... (Unless the simulator is newer than the build the OP was using... I suppose it can't hurt to try it after all, but if the sim's too old and the theme works, then it's no help...)

--- End quote ---

He can follow the instructions and build the latest version its not that hard.

**
If you haven't tried it... try the simulators that are there they are not that old I think they are 3.5 assuming you were using a rockbox much older to make the tags broken.



...
EDIT

Went ahead and grabbed the simulator and loaded up took a few min but from what I can tell you are calling on non-existing images

%xl|J|
%xl|I|

need to be added or removed from being called in other words your code should be


--- Code: ---%X|wps.bmp|
%wd
%xl|G|ab.bmp|160|275|
#
%xl|H|lock.bmp|5|9|
%xl|Z|rating.bmp|175|97|11|
%?rr<%xdZa|%xdZb|%xdZc|%xdZd|%xdZe|%xdZf|%xdZg|%xdZh|%xdZi|%xdZj|%xdZk>
%xl|h|hdd.bmp|21|11|
%?lh<%xdh>
%xl|b|bat.bmp|209|2|6|
%xl|p|charging.bmp|176|2|2|
%?bl<%xdba|%xdbb|%xdbc|%xdbd|%xdbe|%xdbf>
%?bp<%xdpb>
#
%xl|K|all.bmp|160|356|
%xl|L|one.bmp|160|356|
%xl|M|shuffle.bmp|160|356|
%T|160|355|25|23|repmode|
#
%xl|N|shuffle_on.bmp|185|355|
%xl|O|shuffle_off.bmp|185|355|
%T|185|355|24|23|shuffle|
#
%xl|T|stop.bmp|12|341|
%xl|U|play.bmp|12|341|
%T|61|345|46|48|play|
%T|61|345|46|48|&stop|
%xl|V|pause.bmp|12|341|
%xl|W|ff.bmp|12|341|
%T|12|355|46|23|prev|
%T|110|355|46|23|next|
%T|12|355|46|23|&rwd|
%T|110|355|46|23|&ffwd|
%xl|X|rew.bmp|12|341|
%xl|Y|Top.bmp|20|130|
#
%pb|pb.bmp|0|336|240|4|
%?mh<%xdH> ############# Was %?mh<%xdH|%xdI>
%?ps<%xdN|%xdO>
%?mm<|%xdK|%xdL|%xdM|%xdG> ######## Was %?mm<%xdJ|%xdK|%xdL|%xdM|%xdG>
%?mp<%xdT|%xdU|%xdV|%xdW|%xdX>
#
%xl|v|ylbg.bmp|12|302|
%?mv5<%xdv%Vdv>
%xl|w|ylstep.bmp|42|302|10|
#%x|y|ylfull.bmp|42|302|
%?pv<|%xdwa|%xdwb|%xdwc|%xdwd|%xdwe|%xdwf|%xdwg|%xdwh|%xdwi|%xdwj>
#
%T|0|336|240|4|progressbar|
%T|20|3|134|23|browse|
%T|20|3|134|23|&menu|
%T|103|28|136|20|playlist|
%T|2|129|236|85|contextmenu|
%T|2|129|236|85|&playlist|
%T|3|29|98|98|contextmenu|
%T|2|230|236|50|playlist|
%T|16|302|26|26|voldown|
%T|201|302|26|26|volup|
%T|42|302|155|26|volume|
#
%V|50|4|104|30|1|-|-|
%s%al%?pn<%pn>
#
%V|4|30|96|96|0|-|-|
%Cl|0|0|c96|c96|
%C
#
%V|216|18|24|8|0|ffffff|-|
%bl%%
#
%V|105|28|134|20|1|e8e4b4|-|
%s%ac%pp/%pe
#
%V|103|51|136|16|0|-|-|
%s%ar%?fv<~>%fbKbps %fc,%ffHz
%ar%fsKB%?iv<,ID3 v%iv>
#
%V|103|72|136|8|0|-|-|
%s%arU.Rating:%?rr<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>/5.0
%V|143|72|72|8|0|ffffff|-|
%s%arU.Rating:%?rr<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>
%V|103|80|136|16|0|-|-|
%s%arA.Rating:%?ra<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>/5.0
%s%arPlayed %rp
%V|197|80|19|8|0|ffffff|-|
%s%?ra<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>
#
%V|103|111|136|16|0|-|-|
%s%ar%?bs<SleepTimer>
%ar%?bs<%bs>
#
%V|18|129|220|20|1|e8e4b4|-|
%s%al%?ik<Disc %ik->%?in<Nº %in.>%?it<%it|%fn>
%V|18|149|220|85|1|ffffff|-|
%s%al%?ia<%ia|--->
%s%al%?id<%id|--->
%s%al%?ig<%t3%ig|%t3--->;%s%al%?iy<%t3%iy|%t0>
#
%V|18|216|220|70|1|ffffff|-|
%Vp|1|%s%it-%ia|%s%fn|
#
%V|12|292|215|8|0|e8e4b4|-|
%acVolume:%pvdB   RGain:%?rg<Off|%rg|%rg|%rg|%rg|%rg|No tag>
%Vl|v|12|292|215|8|0|ffffff|-|
%acVolume:%pvdB   RGain:%?rg<Off|%rg|%rg|%rg|%rg|%rg|No tag>
#
%V|0|341|60|8|0|ffffff|-|
-%pr/%pc
#
%V|215|341|25|8|0|ffffff|-|
%pt

--- End code ---

[Saint]:
I wanted to show you what I meant by "cleaned up a little/easier to read"


--- Code: ---%wd
#
%X|wps.bmp|
#
%xl|b|bat.bmp|209|2|6|
%xl|h|hdd.bmp|21|11|
%xl|p|charging.bmp|176|2|2|
%xl|v|ylbg.bmp|12|302|
%xl|w|ylstep.bmp|42|302|10|
%xl|G|ab.bmp|160|275|
%xl|H|lock.bmp|5|9|
%xl|K|all.bmp|160|356|
%xl|L|one.bmp|160|356|
%xl|M|shuffle.bmp|160|356|
%xl|N|shuffle_on.bmp|185|355|
%xl|O|shuffle_off.bmp|185|355|
%xl|T|stop.bmp|12|341|
%xl|U|play.bmp|12|341|
%xl|V|pause.bmp|12|341|
%xl|W|ff.bmp|12|341|
%xl|X|rew.bmp|12|341|
%xl|Y|Top.bmp|20|130|
%xl|Z|rating.bmp|175|97|11|
#
%?pv<|%xdwa|%xdwb|%xdwc|%xdwd|%xdwe|%xdwf|%xdwg|%xdwh|%xdwi|%xdwj>
%?rr<%xdZa|%xdZb|%xdZc|%xdZd|%xdZe|%xdZf|%xdZg|%xdZh|%xdZi|%xdZj|%xdZk>
%?lh<%xdh>
%?bl<%xdba|%xdbb|%xdbc|%xdbd|%xdbe|%xdbf>
%?bp<%xdpb>
%?mv5<%xdv%Vdv>
%?mh<%xdH|%xdI>
%?ps<%xdN|%xdO>
%?mm<%xdJ|%xdK|%xdL|%xdM|%xdG>
%?mp<%xdT|%xdU|%xdV|%xdW|%xdX>
%pb|pb.bmp|0|336|240|4|
#
%T|160|355|25|23|repmode|
%T|185|355|24|23|shuffle|
%T|61|345|46|48|play|
%T|61|345|46|48|&stop|
%T|12|355|46|23|prev|
%T|110|355|46|23|next|
%T|12|355|46|23|&rwd|
%T|110|355|46|23|&ffwd|
%T|0|336|240|4|progressbar|
%T|20|3|134|23|browse|
%T|20|3|134|23|&menu|
%T|103|28|136|20|playlist|
%T|2|129|236|85|contextmenu|
%T|2|129|236|85|&playlist|
%T|3|29|98|98|contextmenu|
%T|2|230|236|50|playlist|
%T|16|302|26|26|voldown|
%T|201|302|26|26|volup|
%T|42|302|155|26|volume|
#
%V|50|4|104|30|1|-|-|
%s%al%?pn<%pn>
#
%V|4|30|96|96|0|-|-|
%Cl|0|0|c96|c96|
%C
#
%V|216|18|24|8|0|ffffff|-|
%bl%%
%V|105|28|134|20|1|e8e4b4|-|
%s%ac%pp/%pe
%V|103|51|136|16|0|-|-|
%s%ar%?fv<~>%fbKbps %fc,%ffHz
%ar%fsKB%?iv<,ID3 v%iv>
%V|103|72|136|8|0|-|-|
%s%arU.Rating:%?rr<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>/5.0
%V|143|72|72|8|0|ffffff|-|
%s%arU.Rating:%?rr<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>
%V|103|80|136|16|0|-|-|
%s%arA.Rating:%?ra<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>/5.0
%s%arPlayed %rp
%V|197|80|19|8|0|ffffff|-|
%s%?ra<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>
%V|103|111|136|16|0|-|-|
%s%ar%?bs<SleepTimer>
%ar%?bs<%bs>
%V|18|129|220|20|1|e8e4b4|-|
%s%al%?ik<Disc %ik->%?in<Nº %in.>%?it<%it|%fn>
%V|18|149|220|85|1|ffffff|-|
%s%al%?ia<%ia|--->
%s%al%?id<%id|--->
%s%al%?ig<%t3%ig|%t3--->;%s%al%?iy<%t3%iy|%t0>
%V|18|216|220|70|1|ffffff|-|
%V|12|292|215|8|0|e8e4b4|-|
%acVolume:%pvdB   RGain:%?rg<Off|%rg|%rg|%rg|%rg|%rg|No tag>
%V|0|341|60|8|0|ffffff|-|
-%pr/%pc
%V|215|341|25|8|0|ffffff|-|
%pt
#
%Vl|v|12|292|215|8|0|ffffff|-|
%acVolume:%pvdB   RGain:%?rg<Off|%rg|%rg|%rg|%rg|%rg|No tag>
#
%Vp|1|%s%it-%ia|%s%fn|
--- End code ---


I hope you can see from this, how much easier it would be for someone else coming along to read the code, and probably yourself also...
I haven't made any functional changes to your code, just organised it a little better, and into sections of similar groups of code (which I personally find a lot easier to follow both visually and mentally)
A few more things:

-Why are the identifier tags for the .bmps so seemingly erratic?
Why not: "%xl|A|, %xl|B|, %xl|C| etc?
I put them in alphabetical order at least in my example, I find the identifiers *really* hard to follow in the code you posted.
-I also noticed that "%?bp" calls "%xdpb", but there is no call anywhere for "%xdpa" so, that is one instance where you can *remove* the use of a bitmap-strip (Which contradicts my earlier post a little ;))
-Oh, I also removed that commented line I mentioned earlier.

I realised that running it in a SIM isn't going to do me any good, as you haven't posted the full .wps (including images .etc), so I can't help you any more than I have already really (not without the full .wps zip at least).

My best suggestion would be to go with what karashata said, and attempt to submit your .wps to the themesite.

The themesite runs checkwps to parse the theme for errors and gives you an output telling you what you need to fix before the theme can be accepted (this prevents "broken" themes/themes with unacceptable values from being submitted to the themesite) including an approximate line number of where the code fails (it is supposed to be the exact line number, but it very rarely is...it is usually +/- 1 line).

Unfortunately though, it will only list the first error it finds so you may have to submit/correct your code multiple times before it is finally able to be parsed correctly.
This is probably the best way you can do it without setting up your own build environment and building your own (recent) simulator, or posting the full .wps zip and hoping that someone eventually finds the error for you.


[St.]

jtrodriguez:

--- Code: ---%wd
#
%X|wps.bmp|
#
%xl|b|bat.bmp|209|2|6|
%xl|h|hdd.bmp|21|11|
%xl|p|charging.bmp|176|2|2|
%xl|v|ylbg.bmp|12|302|
%xl|w|ylstep.bmp|42|302|10|
%xl|G|ab.bmp|160|275|
%xl|H|lock.bmp|5|9|
%xl|K|all.bmp|160|356|
%xl|L|one.bmp|160|356|
%xl|M|shuffle.bmp|160|356|
%xl|N|shuffle_on.bmp|185|355|
%xl|O|shuffle_off.bmp|185|355|
%xl|T|stop.bmp|12|341|
%xl|U|play.bmp|12|341|
%xl|V|pause.bmp|12|341|
%xl|W|ff.bmp|12|341|
%xl|X|rew.bmp|12|341|
%xl|Y|Top.bmp|20|130|
%xl|Z|rating.bmp|175|97|11|
#
%?pv<|%xdwa|%xdwb|%xdwc|%xdwd|%xdwe|%xdwf|%xdwg|%xdwh|%xdwi|%xdwj>
%?rr<%xdZa|%xdZb|%xdZc|%xdZd|%xdZe|%xdZf|%xdZg|%xdZh|%xdZi|%xdZj|%xdZk>
%?lh<%xdh>
%?bl<%xdba|%xdbb|%xdbc|%xdbd|%xdbe|%xdbf>
%?bp<%xdpb>
%?mv5<%xdv%Vdv>
%?mh<%xdH>                    ######## Was %?mh<%xdH|%xdI>
%?ps<%xdN|%xdO>
%?mm<|%xdK|%xdL|%xdM|%xdG>                       ####### Was %?mm<%xdJ|%xdK|%xdL|%xdM|%xdG>
%?mp<%xdT|%xdU|%xdV|%xdW|%xdX>
%pb|pb.bmp|0|336|240|4|
#
%T|160|355|25|23|repmode|
%T|185|355|24|23|shuffle|
%T|61|345|46|48|play|
%T|61|345|46|48|&stop|
%T|12|355|46|23|prev|
%T|110|355|46|23|next|
%T|12|355|46|23|&rwd|
%T|110|355|46|23|&ffwd|
%T|0|336|240|4|progressbar|
%T|20|3|134|23|browse|
%T|20|3|134|23|&menu|
%T|103|28|136|20|playlist|
%T|2|129|236|85|contextmenu|
%T|2|129|236|85|&playlist|
%T|3|29|98|98|contextmenu|
%T|2|230|236|50|playlist|
%T|16|302|26|26|voldown|
%T|201|302|26|26|volup|
%T|42|302|155|26|volume|
#
%V|50|4|104|30|1|-|-|
%s%al%?pn<%pn>
#
%V|4|30|96|96|0|-|-|
%Cl|0|0|c96|c96|
%C
#
%V|216|18|24|8|0|ffffff|-|
%bl%%
%V|105|28|134|20|1|e8e4b4|-|
%s%ac%pp/%pe
%V|103|51|136|16|0|-|-|
%s%ar%?fv<~>%fbKbps %fc,%ffHz
%ar%fsKB%?iv<,ID3 v%iv>
%V|103|72|136|8|0|-|-|
%s%arU.Rating:%?rr<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>/5.0
%V|143|72|72|8|0|ffffff|-|
%s%arU.Rating:%?rr<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>
%V|103|80|136|16|0|-|-|
%s%arA.Rating:%?ra<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>/5.0
%s%arPlayed %rp
%V|197|80|19|8|0|ffffff|-|
%s%?ra<0.0|0.5|1.0|1.5|2.0|2.5|3.0|3.5|4.0|4.5|5.0>
%V|103|111|136|16|0|-|-|
%s%ar%?bs<SleepTimer>
%ar%?bs<%bs>
%V|18|129|220|20|1|e8e4b4|-|
%s%al%?ik<Disc %ik->%?in<Nº %in.>%?it<%it|%fn>
%V|18|149|220|85|1|ffffff|-|
%s%al%?ia<%ia|--->
%s%al%?id<%id|--->
%s%al%?ig<%t3%ig|%t3--->;%s%al%?iy<%t3%iy|%t0>
%V|18|216|220|70|1|ffffff|-|
%V|12|292|215|8|0|e8e4b4|-|
%acVolume:%pvdB   RGain:%?rg<Off|%rg|%rg|%rg|%rg|%rg|No tag>
%V|0|341|60|8|0|ffffff|-|
-%pr/%pc
%V|215|341|25|8|0|ffffff|-|
%pt
#
%Vl|v|12|292|215|8|0|ffffff|-|
%acVolume:%pvdB   RGain:%?rg<Off|%rg|%rg|%rg|%rg|%rg|No tag>
#
%Vp|1|%s%it-%ia|%s%fn|

--- End code ---

This is fixed version of [St.]'s clean-up version

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version