You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval <jannik.laval(a)gmail.com>wrote;wrote:
Hi Usman,
The method at:ifAbsentPut: does not interpret the argument.
Just put "self myAuthor" instead of #myAuthor, it should work.
Cheers,
Jannik
On Nov 6, 2011, at 13:17 , Usman Bhatti wrote:
I am trying to create a cache for an attribute that I introduce in
MooseEntityState of FamixType.
The following expression:
self privateState attributeAt: #authors ifAbsentPut: #myAuthors
returns me a symbol #myAuthors instead of evaluating the method myAuthors.
myAuthors is a method that I introduce in FamixType as an extension and it
returns a Bag.
Why is this expression returning a symbol instead of evaluating #myAuthors
as a block?
thanx
Usman
P.S: The package can be downloaded here:
http://www.squeaksource.com/FamixAuthors
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
---
Jannik Laval
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev