Mar 09
Jolle Carlestam Invoking methods stored inside types does not render output
Mar 09, 2014; 01:24
Jolle Carlestam
Invoking methods stored inside types does not render output
I am confused by the following.
This works:
define the_method => {
stdoutnl('the_method was hit')
return 'So you found me!'
}
local(my_methods = map(
'a_method' = {^the_method^}
)
)
local(mylocal = #my_methods -> find('a_method'))
#mylocal -> type
'<br />'
#mylocal -> invoke
->capture
So you found me!
And in the log:
the_method was hit
But, if I do it this way:
define my_test => type {
data
public my_methods = map(
'a_method' = {^the_method^}
)
}
local(mylocal = my_test -> my_methods -> find('a_method'))
#mylocal -> type
'<br />'
#mylocal -> invoke
->capture
// <- as in no output
And in the log:
the_method was hit
So, the method is indeed invoked in both cases. But only the first one returns any output. What am I doing wrong?
HDB
Jolle
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Mar 09
Brad Lindsay Re: Invoking methods stored inside types does not render output
Mar 09, 2014; 10:33
Brad Lindsay
Re: Invoking methods stored inside types does not render output
Mar 10
Jolle Carlestam Re: Invoking methods stored inside types does not render output
Mar 10, 2014; 00:44
Jolle Carlestam
Re: Invoking methods stored inside types does not render output