XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 8th, 2025, 8:47 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: February 9th, 2013, 9:59 pm 
Offline

Joined: February 9th, 2013, 9:03 pm
Posts: 4
Hello Tony,

after playing with WebParserCore, it seems there is a limit of 99 RegEx matches.(?)
In my opinion that is very restrictive and too low.

I created a football widget, with results and ranking table.

Example: English premier league (20 teams)

99 RegEx matches divided by 20 = 4.95 => 4 RegEx matches per team.
"Ranking position" and "team name" already take 2 RegEx matches, so there are only 2 RegEx matches left.

Usualy you will have at least these basic informations:
1. position
2. team name
3. matches played
4. won
5. draw
6. lost
7. points
8. goals
9. goal difference

9 x 20 = 180 RegEx matches (for basic infos)

I also wanted to grab a betting table (35 members/lines). Same trouble... because then you only can get 2 RegEx matches per member (position, name), so neither the points for the current day nor the points overall :(

Would it be possible to increase this limit to at least 256 (or even better 1024)?
Is there any other solution?
(In the first step I was thinking to grab line by line and to use the substitute function for replacing HTML-tags with tabulators but I could not manage that either)

And another short question:

How can I start a widget from inside a widget?
(Button in "Widget_A" should start "Widget_D" at position x,y on the screen)


Top
 Profile  
 
PostPosted: February 22nd, 2013, 2:28 am 
Offline
User avatar

Joined: August 2nd, 2012, 12:43 am
Posts: 26
I agree, more would be nice. But for huge feeds I prefer using a RegExp object in Javascript. You hand it the RSS source and the regex parser, and it returns an array of all the matches. I also converted that into a two dimensional array using nested loops for easier manipulation. I used a webparsercore to grab the whole RSS feed off the net, then fed it to the RegExp object. The skin I'm working on once pulled in over 2500 matches and it worked fine. (It'll be called Steam Specials or something like that, if you want to see the code when I release it soon.)
RegExp object docs: http://www.w3schools.com/js/js_obj_regexp.asp

And for your last question, there's actually a single function that does exactly that:
startupWidget(string widgetPath, int X, int Y);

_________________
deviantArt profile

My Widgets:
Game Specials v1.1


Top
 Profile  
 
PostPosted: March 5th, 2013, 2:40 am 
Offline

Joined: March 4th, 2013, 9:38 pm
Posts: 17
Sooner266 wrote:
startupWidget(string widgetPath, int X, int Y);
Works like charm, many thanks for this :)

I'm not an expert on JavaScript. Before I was using "Samurize" with the wonderful PageScraper plugin to create my widgets and with that it was really easy and flexible to parse and filter the information I'd like to have without "programming".
Anyway, I would be very happy if I could migrate my Samurize widgets to Xwidget, and if it needs JavaScript to do it, well then it has to be that way.
I don't know if you are willed to publish your "Steam Special" widget and if I would be able to use it as a kind of skeleton for my own webparsing stuff.
Maybe a simple widget (JavaScript/Regex) as an example could already help me, which then I could extend.


Top
 Profile  
 
PostPosted: March 5th, 2013, 4:47 am 
Offline
User avatar

Joined: May 12th, 2012, 8:32 pm
Posts: 594
Hello jackiD,

Thanks for your feedback, I will increase this limit to 256 in next version v1.82. will be release in this week.

Tony

_________________
XWidget Software Developer
[XWidget for Android] [Lastest version of XWidget] [Lastest patch of XWidget]
[XDesktop for Android/Windows]


Top
 Profile  
 
PostPosted: March 5th, 2013, 5:00 am 
Offline

Joined: March 4th, 2013, 9:38 pm
Posts: 17
Wonderful news and many thanks, Tony :)


Top
 Profile  
 
PostPosted: March 20th, 2013, 3:06 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268
Quote:
(It'll be called Steam Specials or something like that, if you want to see the code when I release it soon.)

Very interested to see, thank you.. Can you let us know when you release it ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 61 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group