Products

Price/Order

Support

Partners

Testimonials

Test Results

About us

Contact
 Implementing a dialog box?
Bottom
 
Total posts: 3
 Author Implementing a dialog box?
Seppo Grönfors

03.07.2007 07:34:25
Registered user
I have been away from this for a few months, and find it very hard again to understand the language spoken here.

There must be a way to implement a simple dialog box, but I can't figure it out.

1. Client calls a function on the server
2. server does it's thing until it needs to ask a question of the client
3. server sends the question to the client, a box or a menu pops up
4. the human client answers the question by selecting from the menu or pressing a button or a key
5. client sends the answer back to the server
6. server continues
7. function call is ready, client receives the function result.

Someone? In plainspeak?

Thanks in advance
Danijel Tkalcec [RTC]

03.07.2007 12:12:16
Registered user
Even though what you want to do is possible (you can call a remote function, then use WaitForCompletion to wait until Server returns with a result, then display a message box and call the next remote function), I would recommend you to re-think your problem, since it is not how client/server application should work.

The Server should never need to ask a Client anything. The Server is there to Serve the Client, not the other way arround. The Client is the one who sends requests to the Server, the Server only answers to requests. If a Server needs some specific information to be able to process data requested by the Client, the Client should provide that information as part of it's request.

In other words, the Client prepares a remote function call, sends it to the Server, the Server executes the function and prepares the result, the Client receives the Result. Everything you do should follow this strict schema.

You can prepare and send multiple function calls at once from the Client, you will then receive multiple results from the Server, but the Server should never need to ask a Client something while executing a remote function.

So, before the Server starts processing the remote function call received from the Client, it should check if it has all the data it needs to complete the process. If some parameters are missing, the Server should either raise an exception, or prepare a result which would let the Client know it needs more information before it can execute the function.

Best Regards,
Danijel Tkalcec
Seppo Grönfors

03.07.2007 12:30:12
Registered user
Ok