XWidgetSoft Forum https://www.bbs.xwidget.com/ |
|
Open a file for reading data https://www.bbs.xwidget.com/viewtopic.php?f=8&t=6230 |
Page 1 of 1 |
Author: | yereverluvinuncleber [ March 18th, 2016, 9:05 am ] |
Post subject: | Open a file for reading data |
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. ![]() ![]() 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. |
Author: | Dr_Xadium [ March 18th, 2016, 7:35 pm ] |
Post subject: | Re: HELP: How to open a file for reading data |
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. |
Author: | yereverluvinuncleber [ March 19th, 2016, 4:21 am ] |
Post subject: | Re: HELP: How to open a file for reading data |
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. |
Author: | yereverluvinuncleber [ March 21st, 2016, 9:26 am ] |
Post subject: | Re: FEATURE REQUEST: Open a file for reading data |
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. ![]() |
Author: | yereverluvinuncleber [ April 2nd, 2016, 6:32 am ] |
Post subject: | Re: FEATURE REQUEST: Open a file for reading data |
![]() 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. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |