Need some advice for my IT folks

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Need some advice for my IT folks

Post by mwieder » Fri Jan 13, 2012 3:15 am

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.

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Need some advice for my IT folks

Post by teacherguy » Fri Jan 13, 2012 2:28 pm

OK, looks like I've got some learnin' to do... :)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Need some advice for my IT folks

Post by FourthWorld » Fri Jan 13, 2012 2:56 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm

Re: Need some advice for my IT folks

Post by kdjanz » Fri Jan 13, 2012 5:09 pm

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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Need some advice for my IT folks

Post by mwieder » Fri Jan 13, 2012 5:23 pm

Kelly - that is definitely a workable scenario. And a nice one at that, I think.

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm

Re: Need some advice for my IT folks

Post by kdjanz » Fri Jan 13, 2012 5:28 pm

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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Need some advice for my IT folks

Post by mwieder » Fri Jan 13, 2012 6:25 pm

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.

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm

Re: Need some advice for my IT folks

Post by kdjanz » Fri Jan 13, 2012 7:28 pm

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

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Need some advice for my IT folks

Post by teacherguy » Sun Jan 15, 2012 9:10 pm

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.

Post Reply