Need some advice for my IT folks
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Need some advice for my IT folks
Alternate route: I usually save preferences as xml data and deal with it that way. The revXMLCreateTreeFromFile function does most of the heavy lifting and then I just parse the tree. I don't bother with the revXML functions for saving the data - it's easier to do it myself.
But "line x of" the file seems too error prone to me. It prevents you, for one thing, from storing multiline preferences. And also prevents you from inserting blank lines for formatting.
But "line x of" the file seems too error prone to me. It prevents you, for one thing, from storing multiline preferences. And also prevents you from inserting blank lines for formatting.
-
- Posts: 379
- Joined: Thu Dec 08, 2011 2:43 am
Re: Need some advice for my IT folks
OK, looks like I've got some learnin' to do... 

-
- VIP Livecode Opensource Backer
- Posts: 10049
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Need some advice for my IT folks
XML is a good option, and another one is to use a separate stack file for prefs data, taking advantage of custom properties to get simple name-value pairs.mwieder wrote:Alternate route: I usually save preferences as xml data and deal with it that way. The revXMLCreateTreeFromFile function does most of the heavy lifting and then I just parse the tree.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Need some advice for my IT folks
If I understand it right, if the student has a separate stack, it could act as a key that would identify them and as a wallet that would track their progress. It could be set up so that if you double click their stack off a USB key or what ever, the stack would start on the local machine wherever they are and then ask the student to find the path to the main program itself - either on a network share, a local machine or even remote on the web I suppose. That path could be remembered for them, so next time they are doing their homework from that location, the path would be offered as an option. The stack itself has virtually no code, but has lots of custom properties that contain their data.
At marking time, they would email their stack to the teacher, who would have a marking stack that would read the required data from each stack in a directory and automatically present it in a data grid or export to a nice tab delimited file that they could drop into a spreadsheet or marks program. The main music program wouldn't have to track any of that and could sit on a network or anywhere else and not need to be saved or written to at all.
Please tell me if my ignorance about LC is showing!
Kelly
At marking time, they would email their stack to the teacher, who would have a marking stack that would read the required data from each stack in a directory and automatically present it in a data grid or export to a nice tab delimited file that they could drop into a spreadsheet or marks program. The main music program wouldn't have to track any of that and could sit on a network or anywhere else and not need to be saved or written to at all.
Please tell me if my ignorance about LC is showing!
Kelly
Re: Need some advice for my IT folks
Kelly - that is definitely a workable scenario. And a nice one at that, I think.
Re: Need some advice for my IT folks
Glad to know I'm starting to get a feel for the big picture at least even though I feel like I'm lost in the weeds when it comes to the little syntax and dictionary stuff of LC!
Actually, would the web engine actually work in this sort of scenario? Could you have the main program running on the web, but still have it sending scores or other data back to a calling stack on a USB key?
Thanks
Kelly
Actually, would the web engine actually work in this sort of scenario? Could you have the main program running on the web, but still have it sending scores or other data back to a calling stack on a USB key?
Thanks
Kelly
Re: Need some advice for my IT folks
The web stuff works differently. Revlets live on a server but are downloaded and run in the client's browser. So you can have a stack that communicates with a revlet via socket connections (this is a whole other can of worms), but it will all be on the local client's machine, no interaction with the server. That's the way my PowerDebug stack allows you to debug running revlets.
You could communicate with server process using sockets as well in the way that chat systems work, but that's probably overkill for this situation.
You could communicate with server process using sockets as well in the way that chat systems work, but that's probably overkill for this situation.
Re: Need some advice for my IT folks
Way over my head!
But having multiple engines in different places, keeping individual data stacks for each user and having an automated reader stack for the teacher are all still reasonable ideas.
Thanks
Kelly
But having multiple engines in different places, keeping individual data stacks for each user and having an automated reader stack for the teacher are all still reasonable ideas.
Thanks
Kelly
-
- Posts: 379
- Joined: Thu Dec 08, 2011 2:43 am
Re: Need some advice for my IT folks
Update: I've been able to create an xml file and successfully save it to my preferences folder. So far so good.mwieder wrote: I don't bother with the revXML functions for saving the data - it's easier to do it myself.
Question: What steps do I need to take with a datagrid to save its contents in the xml so that it comes back correctly? So far it's coming in jumbled up a bit, I'm sure I have to be doing something more that putting the dgText into a child node.