Whats the best way - console to communicate and act synchronously?

  1. 4 months ago

    Tim S

    Jul 9 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Hello all.

    I have a main app that on occassion needs to have an object send an email, SMS or other update to one or more addresses. My question is, if I want synchronous communication, so that the main app is not waiting for the *other* app to finish, how is that accomplished? I understand that normally an IPC Socket is used, but when the main sends a command via the IPC Socket does it sit as a variable and use a timer to execute, or does it just execute? It seems to me that a timer is necessary so the communication *loop* is completed thereby allowing the synchronous communication to exist. Am I correct?

    Alternatively, is it better for the *other* app to periodically read a database or other means, to check for a flag/data to send xyz info in abc manner?

    Thoughts, opinions and guidance are appreciated!
    Thank you,
    Tim

  2. Greg O

    Jul 10 Xojo Inc

    @Tim S My question is, if I want synchronous communication, so that the main app is not waiting for the *other* app to finish, how is that accomplished?

    Actually what you’re describing is Asynchronous communication.

    What you do is set the Mode to 1 and implement the events of the Shell class.

  3. Tim S

    Jul 10 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Whooops... My bad Greg!

    Where is it that you set Mode = 1? Is there a sample I should review?
    Thank you for your response!

    Tim

  4. Greg O

    Jul 10 Xojo Inc

    Either in the inspector or in code.

    http://docs.xojo.com/index.php/Shell.Mode

or Sign Up to reply!