ICANHAZLOLCATS?

Discussion about user contributed plugins

Moderator: Moderator

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

ICANHAZLOLCATS?

Postby arj » Sat Mar 15, 2008 9:49 pm

Image

Image

http://wiki.mymediasystem.org/wiki/index.php/Download_Pyglets

kthxbye

PS: Fredde, I can't get setText working so there are no funny messages :(

Fredde
veteran
Posts: 288
Joined: Tue Dec 06, 2005 7:18 am
Location: Sweden

Re: ICANHAZLOLCATS?

Postby Fredde » Sun Mar 16, 2008 11:22 am

arj wrote:PS: Fredde, I can't get setText working so there are no funny messages :(

In the onAction method you set textbox visibility to false

Code: Select all

self.textbox.setVisible(False)

Maybe a copy and paste error? You also need to trigger a screen update after setting the text in the textbox. The screen will update (automatically) after the onAction metod, but in your case you do a lengthly task in that method. Use the function mmsv2gui.redraw() to force a screen update:

Code: Select all

def download_lolcats_to_drive(self):
        i = 1

        matcher = re.compile('snap_preview\'><p><img src="(.*)" style')

        local_lolcats = os.listdir(storage)

        while i < 100:
            self.textbox.setText("Downloading page " + str(i))
            mmsv2gui.redraw()
            ...

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Postby Uatschitchun » Sun Mar 16, 2008 12:19 pm

Arj ... you're making me wonder if everything is ok with you :twisted:
Lg
Roman

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Postby acmelabs » Sun Mar 16, 2008 12:28 pm

Uatschitchun wrote:Arj ... you're making me wonder if everything is ok with you :twisted:

LOL! Didn't dare to post that, was imho, also my first thought :)

Regards,
Andreas

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

Re: ICANHAZLOLCATS?

Postby arj » Sun Mar 16, 2008 1:08 pm

Fredde wrote:
arj wrote:PS: Fredde, I can't get setText working so there are no funny messages :(

In the onAction method you set textbox visibility to false

Code: Select all

self.textbox.setVisible(False)

Maybe a copy and paste error? You also need to trigger a screen update after setting the text in the textbox. The screen will update (automatically) after the onAction metod, but in your case you do a lengthly task in that method. Use the function mmsv2gui.redraw() to force a screen update:

Code: Select all

def download_lolcats_to_drive(self):
        i = 1

        matcher = re.compile('snap_preview\'><p><img src="(.*)" style')

        local_lolcats = os.listdir(storage)

        while i < 100:
            self.textbox.setText("Downloading page " + str(i))
            mmsv2gui.redraw()
            ...


Perfect. 0.2 out now :D


Return to “user plugins”

Who is online

Users browsing this forum: No registered users and 2 guests