Link | Async |
Author | Ke Carlton |
Category | Action |
Version | 8.x |
License | Public Domain |
Posted | 11 Feb 2007 |
Updated | 02 May 2007 |
More by this author... |
This is a simple tag that allows any tag to be run asyncronously. It support's ctypes via the -owner property (providing the ctype is still "active"). Allows for modification of referenced variables and full logging via log_critical.
Async: -tag = \include_url, -params = array('http://www.google.com', -nodata), -log;
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag:'Async',-Async,-privileged; handle_error; // log error if -log specified local_defined('log')?log_critical:tag_name' - 'error_currenterror; /handle_error; fail_if:!local_defined('tag'), -2, 'Missing -tag param (escape with \\)'; fail_if: local('tag')->type != 'tag', -2, '-tag requires a valid tag'; fail_if: local_defined('params') && local('params')->type != 'array' , -2, '-params requires an array'; !local_defined('params')? local: 'params' = array; !local_defined('owner') ? local: 'owner' = null; local:'result' = #tag->run(-params=#params,-owner=#owner); // log result if -log specified local_defined('log') ? log_critical:#tag' - '#result; // set result if -set @var supplied // useful for triggering simultaneous async events local_defined('set') ? #set = @#result; /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft