Multiuser or not multiuser

Sarah Reichelt sarah.reichelt at gmail.com
Thu Nov 15 06:20:48 EST 2007


> I am working on a small restaurant app for my school.
> Now there is a paper list where you put your name on and choose your lunch.
> The teacher, who works with disabled children in the restaurant, wants it to
> be more streamlined so therefore my app.
>
> Because the app is put on a Server 2003 with XP clients it needs to be
> multiuser or not.
> What I did is that I put on startup the code:
> on openstack
> add 1 to fld "inuse"
> if fld "inuse" = 1 then go stack "order"
> if fld "inuse" = 2
> then answer "Sorry, software in use try again in a few minutes!"
> then quit stack "order"
> end if
> end openstack
>
> This doesn't work with clients in a netwerk!

When the first client gets access to the stack, they need to save it
after setting the "inuse" field to 2. Otherwise they are only changing
the copy in their own RAM and not doing anything to the copy filed on
the server. In the same way, once the client leaves the program, they
need to reduce the value of "inuse" and save again.

An alternative might be to have a text file on the server that just
stores whether the stack is in use, or possibly who is using it.

Cheers,
Sarah



More information about the use-livecode mailing list