It is currently March 29th, 2024, 8:01 am

BBC Feed Reader - w/ sorting

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: BBC Feed Reader - w/ sorting

Post by jsmorley »

SKIN:Bang("!DisableMeasure MeasureLuaScript")

That one should work, I'll do some testing today and see if there is something about it I am missing. You don't by any chance have two skins loaded at once with a measure named [MeasureLuaScript]?

Edit: Yes, this works fine. I set the Lua to "return os.date()". Without the disable, the return value is updating once a second as the script is run. When I put in the disable, the counter does not get set to 0 or null, but does stop updating until the calling skin's WebParser measure is again executed and turns the script back on with OnFinishAction.

I do really recommend this approach when you are using a WebParser measure to get a web site and just write it to a file, then calling a Lua script to parse the file and take some action.

Use Disabled=1 on the script measure, then enable it with a bang on OnFinishAction on the WebParser measure, reading the file and taking whatever action you want in the Lua script. Then have the last thing the script does be setting itself back to disabled. That way you have a single "driver", the WebParser measure, which ensures you don't have any conflict between the two, and the entire execution timing is controlled by the UpdateRate on the WebParser measure. You don't need or want any UpdateDivider on the script measure itself.
User avatar
Mordasius
Posts: 1167
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: BBC Feed Reader - w/ sorting

Post by Mordasius »

jsmorley wrote:SKIN:Bang("!DisableMeasure MeasureLuaScript")

Yes, this works fine. I set the Lua to "return os.date()". Without the disable, the return value is updating once a second as the script is run.
So that means it's working even though the About view shows there is a value?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: BBC Feed Reader - w/ sorting

Post by jsmorley »

Mordasius wrote: So that means it's working even though the About view shows there is a value?
Yes.