Jun 11, 2013; 21:11
Steve Piercy - Web Site Builder
code migration issue: params iterable in 8 but not 9
I'm migrating code from Lasso 8 to 9. I can't find any
documentation to explain what is going on. In 8, params passed
to a method for a custom type are iterable. In the two 9
samples, params has a size, but it appears to be not iterable.
Is this a bug in 9?
=====================Lasso 8
=================== [
define_type('mytype');
define_tag('_unknowntag');
local('result');
if(params->size);
iterate(params,local('i'));
#result += #i + ' | ';
/iterate;
/if;
return(tag_name + ' | ' #result);
/define_tag;
/define_type;
local('a') = mytype;
#a->method('foo' = 'bar', 'moo');
]
=>
method | pair: (foo)=(bar) | moo |
=====================Lasso 9 Original
=====================[
define_type('mytype');
define_tag('_unknowntag');
local('result' = string);
if(params->size);
iterate(params,local('i'));
#result += #i + ' | ';
/iterate;
/if;
return(tag_name + ' | ' #result);
/define_tag;
/define_type;
local('a') = mytype;
#a->method('foo' = 'bar', 'moo');
]
=>
method |
=====================Lasso 9 Modified
=================== [
define_type('mytype');
define_tag('_unknowntag');
local('result' = string);
local(wtflolz_lasso9 = params)
if(params->size);
iterate(#wtflolz_lasso9,local('i'));
#result += #i + ' | ';
/iterate;
/if;
return(tag_name + ' | ' #result);
/define_tag;
/define_type;
local('a') = mytype;
#a->method('foo' = 'bar', 'moo');
]
=>
method |(foo = bar) | moo |
--steve
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy Web Site Builder
Soquel, CA
<web@StevePiercy.com> <http://www.StevePiercy.com/>
#############################################################
Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Jun 12, 2013; 06:17
Jolle Carlestam
Re: code migration issue: params iterable in 8 but not 9
Jun 12, 2013; 00:04
Steve Piercy - Web Site Builder
Re: code migration issue: params iterable in 8 but not 9