> I will use either call 4d method or execute in 4d when I need to execute a
> 4D method.

I didn't read your previous message correctly. If you just need to call a 4D 
method, call it directly the same way you would in 4D. There is no need to use 
either 'call 4d method' or 'execute in 4d'. Just do something like this:

$text := MyMethodIn4D($foo; "bar"; 7)

If you want to call 4D commands that are not supported by Active4D, use 
'execute in 4d':

$value := 100
$currency := "Euro"
$targetCurrency := "French Franc"
$value := execute in 4d("return(Euro converter({0}; {1}; {2}))" %% ($value; 
$currency; $targetCurrency); *)

If you need to dynamically execute an entire block of text, use execute and 
return() to get a value back. This works for me:

code := """$value := 100
$currency := "Euro"
$targetCurrency := "French Franc"
$value := execute in 4d("return(Euro converter({0}; {1}; {2}))" %% ($value; 
$currency; $targetCurrency); *)
return ($value)"""

$converted := execute($code)
write($converted)

Kind regards,

   Aparajita
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to