Thanks!

actually - 
I think the simplest method is:
On Server startup - set interprocess variables with which ever folder 
paths I want.
Use Get Process Variable from client to grab these values when needed.

Since in this instance there is nothing dynamic (i.e. changing during 
execution)
The various folder paths will be the same on the server from server 
start to server shut down.

Then I have no need to worry about asynchronous behavior



On Sat, 20 Aug 2016 09:59:54 +0200, Joaquin Mendes Castro wrote:
> Hi
> 
> When using EOS to retrieve results from server variables, you have to take
> into account that the execution is asynchronous. You have to loop until you
> get a non empty result, or better use another variable to know when you can
> get the values from the server. This is not necesary if you use a method
> with the EOS server attribute set, as others have already said, but could
> be useful for other purposes.
> 
> So your code could look like this (not tested):
> 
> method1
> -----------
> done:=false
> Directory_path:=get 4d folder(3)
> done:=True
> repeat
>     idle
> until (not(done))
> 
> 
> method 2
> ------------
> $p:=execute on server("method1";12345)
> repeat
>    get process variable($p;Directory_path;$Server_Path;done;$done)
>    delay process(current process;10)
> until ($done)
> set process variable($p;done;False)
> 
> 
> I like to put a timeout also in the loops exits just in case something does
> not go as expected. Something like:
> 
> until ($done | (milliseconds > $timelimit))
> 
> 
>> Message: 1
>> Date: Wed, 17 Aug 2016 15:51:47 -0400
>> From: Chip Scheide <4d_o...@pghrepository.org>
>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>> Subject: v13 - how to get directory path on server from client
>> Message-ID: <20160817155147352090.4b9c0...@pghrepository.org>
>> Content-Type: text/plain; charset=us-ascii
>> 
>> I tried:
>> method1
>> <>Directory_path:=get 4d folder(3)
>> 
>> method2
>> execute on server("method1";12345)
>> get process variable(<> Directory_path;$Server_path)
>> 
>> 
>> but the variable $Server_path is blank.
>> 
>> Thanks
>> Chip
>> 
>> 
>> ------------------------------
>> 
>> 
> 
> 
> -- 
> *******************************************************************
> Joaquín Mendes Castro
> ASEMAT, S.A.                                     tlf: 34-91-4015099
> Agustina de Aragón 3, Bajo C                     fax: 34-91-4018646
> 28006 Madrid (SPAIN)               e-mail: joaquin.men...@asemat.es
> *******************************************************************
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to