XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Oct 22日 18:27

All times are UTC - 8 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: 2016年 Mar 18日 09:05 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
Other widget engines have built-in functions to open files for reading data. They support different file types. Using Xwidget I want to read a json data file and so I simply want Xwidget to open this target file and be able to format and display the various fields.

It seems that Xwidget has few methods to open and read a data file. The Xwidget engine has a core to read RSS style data but no others seem to exist, which is a severe limitation.

So, if you know of a widget that opens/reads data files using anything other than the rsscore then please let me know, if there is any documentation please point me in the right direction. For the moment as a workaround I suppose I will have to resort to pure javascript but I'd really rather not.

Having looked into the problem, Xwidget's limitations lead me to think that I will have to create my next widget using the Yahoo Widget engine that has all this functionality built by default into the filesystem object. I can easily open/read data from files using this engine -

filesystem.volumes
filesystem.copy()
filesystem.createDirectory()
filesystem.emptyRecycleBin()
filesystem.emptyTrash()
filesystem.getDirectoryContents()
filesystem.getDisplayName()
filesystem.getFileInfo()
filesystem.getMD5()
filesystem.getRecycleBinInfo()
filesystem.getTrashInfo()
filesystem.isDirectory()
filesystem.isPathAllowed()
filesystem.itemExists()
filesystem.move()
filesystem.moveToRecycleBin()
filesystem.moveToTrash()
filesystem.open()
filesystem.openRecycleBin()
filesystem.openTrash()
filesystem.readFile()
filesystem.reveal()
filesystem.remove()
filesystem.unzip()
filesystem.writeFile()
filesystem.zip()

I would have preferred to use the Xwidget engine as this is what I am teaching myself at the moment and the widget I want to build is compatible graphically with my Panzer widgets.

Image

Image

I suppose what is wanted is a filesystem core to enable a file to be read and the data parsed. If the API to write core was revealed then perhaps it could be provided by the community.

Post changed from a request for help to a feature request.


Last edited by yereverluvinuncleber on 2016年 Mar 19日 04:34, edited 6 times in total.

Top
 Profile  
 
PostPosted: 2016年 Mar 18日 19:35 
Offline
User avatar

Joined: 2014年 Apr 6日 05:20
Posts: 24
I [ab]use the RSS core for this, using a Regex to try and pull the data I need from the target file on disk or remotely.


Top
 Profile  
 
PostPosted: 2016年 Mar 19日 04:21 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
I guessed this might be the way. I think I will use the Yahoo widget engine to create the more complex widgets as the Xwidget engine is still a little immature to to the advanced stuff. Do you have some code as an example?


Note: that the Yahoo widget engine has a whole range of filesystem tools that will open almost all file types. I have added these to the OP.

I will change this post into a feature request.


Top
 Profile  
 
PostPosted: 2016年 Mar 20日 05:06 
Offline
User avatar

Joined: 2014年 Apr 6日 05:20
Posts: 24
yereverluvinuncleber wrote:
I guessed this might be the way. I think I will use the Yahoo widget engine to create the more complex widgets as the Xwidget engine is still a little immature to to the advanced stuff. Do you have some code as an example?


Note: that the Yahoo widget engine has a whole range of filesystem tools that will open almost all file types. I have added these to the OP.

I will change this post into a feature request.


Oh my bad it was the webparser core not RSS.

This example pulls in a text file off the hard drive; I just have a text area bound to the core to display the data. This Regex just grabs all the contents.


Attachments:
File comment: How I have it set up.
ss (2016-03-20 at 09.04.43).png
ss (2016-03-20 at 09.04.43).png [ 18.29 KiB | Viewed 991 times ]
Top
 Profile  
 
PostPosted: 2016年 Mar 21日 09:26 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
Thankyou! I'll need to do a lot of coding to handle the .json data file. I have the konfabulator widget working already as you can see on this screenshot.

Image


Top
 Profile  
 
PostPosted: 2016年 Apr 2日 06:32 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
Image

The latest version of my win rate widget, this is the konfabulator version that works, I have built an identical Xwidget version but so far it seems to be too much work to get it to parse a json file. It might be possible so I won't abandon the Xwidget version just yet.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 7 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:  
cron

Powered by phpBB® Forum Software © phpBB Group