Page 2 of 2

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 3:15 am
by mwieder
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.

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 2:28 pm
by teacherguy
OK, looks like I've got some learnin' to do... :)

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 2:56 pm
by FourthWorld
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.
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.

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 5:09 pm
by kdjanz
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

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 5:23 pm
by mwieder
Kelly - that is definitely a workable scenario. And a nice one at that, I think.

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 5:28 pm
by kdjanz
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

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 6:25 pm
by mwieder
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.

Re: Need some advice for my IT folks

Posted: Fri Jan 13, 2012 7:28 pm
by kdjanz
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

Re: Need some advice for my IT folks

Posted: Sun Jan 15, 2012 9:10 pm
by teacherguy
mwieder wrote: I don't bother with the revXML functions for saving the data - it's easier to do it myself.
Update: I've been able to create an xml file and successfully save it to my preferences folder. So far so good.

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.