Textbox Control issue
#1
Question 
Hey all,

I am new to XBMC development and I hope this is a known issue with an easy fix. I am working on a Wikipedia lookup script which dumps the result into a Textbox control in a WindowXMLDialog.

If the text goes beyond 4 pages, the text box messes up. When I hit the down button on page 3, the text scrolls up (page down), but the spincontrol stays at (page) 3/5, and I can't go down any farther. I can go to the top and hit up to go to page 5. But if I hit pageup again, it goes to page 4 but still says 3/5. I turned on debug logging, but the python doesn't throw any exceptions. The program doesn't crash, it is still responsive, it just won't page down.

Any ideas?
Reply
#2
can you try a scrollbar to eliminate if it's a spinner issue or number of pages issue.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
I don't know how to add a scrollbar... it might be because I don't have skin files for one, or maybe I messed something else up.

I did investigate the problem a little more. If I change the font size to font12 I can go up to 26 pages before it messes up. I can also go a little farther than 3 pages if I change the textbox height (but it doesn't make as much difference as I thought it might).

I also have a problem when going up pages with the spinner, except that it never gets stuck. Instead, it will skip a page and scroll up two pages instead of one.

It looks to me like the problem is that the spinner and textbox have different ideas about what page they are on (like a rounding problem). If I am on page 3, and move down, the textbox will scroll to page 4, but the spinner thinks it is still on page 3 (maybe it is actually on page 3.95). If I page down, nothing happens because the textbox is already on page 4 and the spinner still thinks it is on page 3. Is this possible?
Reply
#4
I believe you've pointed out the problem exactly. There is no unique way to define when one is on page 2 rather than page 1 when there's some items from both pages.

So when you reach the end of the list and there isn't an integral multiple of the number of lines available to fill the last page, then this sort of thing happens. Currently we only tell it to display the final page number unless the final item is onscreen, so it's actually possible to have page 3 displayed up until there's just 2 items ofscreen, where it then flicks to page 4 then page 5 immediately as you go down the next 2 rows.

If you actually think there's a bug, and can reproduce it using a simple script that does not depend on anything external (internet), then supply the script, and let me know exactly how to reproduce, and I'll take a quick look.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
This is a textbox.

Does this issue only happen when you hold the button down or when you individually click the spinner?

I just tried the changelog script which displays 5 pages of info fine. There was a fix for spinners a while ago, what date is your build?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
The Changelog script I have seen used GUIBuilder which is a completely different animal.

I decided to look at the T3CH upgrader script for reference and saw the <spinposx> and <spinposy> tags which I hadn't seen before. I got rid of the separate spincontrol in the XML and added these tags to the textbox. The issue has completely disappeared.

I am satisfied with this fix.
Reply

Logout Mark Read Team Forum Stats Members Help
Textbox Control issue0