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
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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--- Jannik Laval
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.comwrote:
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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
because the block is only executed if the first arg is absent. this comes from dictionary
my dict at: kjhkjh ifAbsentPut: []
stef On Nov 6, 2011, at 3:37 PM, Andre Hora wrote:
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.com 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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
ok thanx... the answer was coming from cache as I tried various combos... so I needed to clear cache (i.e. attribute at #authors) ...
On Sun, Nov 6, 2011 at 4:10 PM, Stéphane Ducasse stephane.ducasse@inria.frwrote:
because the block is only executed if the first arg is absent. this comes from dictionary
my dict at: kjhkjh ifAbsentPut: []
stef On Nov 6, 2011, at 3:37 PM, Andre Hora wrote:
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.com
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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
btw... just for info... famixmethod already has author information embedded in timestamp attribute ...
On Sun, Nov 6, 2011 at 5:54 PM, Usman Bhatti usman.bhatti@gmail.com wrote:
ok thanx... the answer was coming from cache as I tried various combos... so I needed to clear cache (i.e. attribute at #authors) ...
On Sun, Nov 6, 2011 at 4:10 PM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
because the block is only executed if the first arg is absent. this comes from dictionary
my dict at: kjhkjh ifAbsentPut: []
stef On Nov 6, 2011, at 3:37 PM, Andre Hora wrote:
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.com
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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
On Nov 6, 2011, at 5:56 PM, Usman Bhatti wrote:
btw... just for info... famixmethod already has author information embedded in timestamp attribute ...
On Sun, Nov 6, 2011 at 5:54 PM, Usman Bhatti usman.bhatti@gmail.com wrote: ok thanx... the answer was coming from cache as I tried various combos... so I needed to clear cache (i.e. attribute at #authors) ...
On Sun, Nov 6, 2011 at 4:10 PM, Stéphane Ducasse stephane.ducasse@inria.fr wrote: because the block is only executed if the first arg is absent. this comes from dictionary
my dict at: kjhkjh ifAbsentPut: []
stef On Nov 6, 2011, at 3:37 PM, Andre Hora wrote:
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.com 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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On Nov 6, 2011, at 18:12 , Stéphane Ducasse wrote:
In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
What are these changes ?
Jannik
On Nov 6, 2011, at 5:56 PM, Usman Bhatti wrote:
btw... just for info... famixmethod already has author information embedded in timestamp attribute ...
On Sun, Nov 6, 2011 at 5:54 PM, Usman Bhatti usman.bhatti@gmail.com wrote: ok thanx... the answer was coming from cache as I tried various combos... so I needed to clear cache (i.e. attribute at #authors) ...
On Sun, Nov 6, 2011 at 4:10 PM, Stéphane Ducasse stephane.ducasse@inria.fr wrote: because the block is only executed if the first arg is absent. this comes from dictionary
my dict at: kjhkjh ifAbsentPut: []
stef On Nov 6, 2011, at 3:37 PM, Andre Hora wrote:
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.com 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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--- Jannik Laval
http://code.google.com/p/pharo/issues/detail?id=4971
In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
Hi Stef,
It is not so simple :) Take this example from Moose:
=== LANNode methodDictionary collect:[:e | e timeStamp ifNotEmpty: [:s | s subStrings first ]] ===
LANNode has no author, so if you take the first substring you will have the date of creation. I have not a good solution, but for my scripts, I test the first character of the substring: if it is a letter, this is an author, else, there is no author. === ((myString subStrings) first at:1) isLetter ===
Cheers,
On Nov 6, 2011, at 21:48 , Stéphane Ducasse wrote:
http://code.google.com/p/pharo/issues/detail?id=4971
In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--- Jannik Laval
good idea. if you have a piece of code send it.
Stef
On Nov 9, 2011, at 9:32 AM, jannik.laval wrote:
Hi Stef,
It is not so simple :) Take this example from Moose:
=== LANNode methodDictionary collect:[:e | e timeStamp ifNotEmpty: [:s | s subStrings first ]] ===
LANNode has no author, so if you take the first substring you will have the date of creation. I have not a good solution, but for my scripts, I test the first character of the substring: if it is a letter, this is an author, else, there is no author. === ((myString subStrings) first at:1) isLetter ===
Cheers,
On Nov 6, 2011, at 21:48 , Stéphane Ducasse wrote:
http://code.google.com/p/pharo/issues/detail?id=4971
In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
self timeStamp ifNotEmpty: [:s | |subS| subS := s subStrings first subS first isLetter ifTrue:[^subS]]. ^''
On Nov 12, 2011, at 22:44 , Stéphane Ducasse wrote:
good idea. if you have a piece of code send it.
Stef
On Nov 9, 2011, at 9:32 AM, jannik.laval wrote:
Hi Stef,
It is not so simple :) Take this example from Moose:
=== LANNode methodDictionary collect:[:e | e timeStamp ifNotEmpty: [:s | s subStrings first ]] ===
LANNode has no author, so if you take the first substring you will have the date of creation. I have not a good solution, but for my scripts, I test the first character of the substring: if it is a letter, this is an author, else, there is no author. === ((myString subStrings) first at:1) isLetter ===
Cheers,
On Nov 6, 2011, at 21:48 , Stéphane Ducasse wrote:
http://code.google.com/p/pharo/issues/detail?id=4971
In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
--- Jannik Laval
On Sun, Nov 6, 2011 at 6:12 PM, Stéphane Ducasse stephane.ducasse@inria.frwrote:
In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
yes. there is FamixMethod>>timeStamp
On Nov 6, 2011, at 5:56 PM, Usman Bhatti wrote:
btw... just for info... famixmethod already has author information
embedded in timestamp attribute ...
On Sun, Nov 6, 2011 at 5:54 PM, Usman Bhatti usman.bhatti@gmail.com
wrote:
ok thanx... the answer was coming from cache as I tried various combos... so I
needed to clear cache (i.e. attribute at #authors) ...
On Sun, Nov 6, 2011 at 4:10 PM, Stéphane Ducasse <
stephane.ducasse@inria.fr> wrote:
because the block is only executed if the first arg is absent. this
comes from dictionary
my dict at: kjhkjh ifAbsentPut: []
stef On Nov 6, 2011, at 3:37 PM, Andre Hora wrote:
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.com
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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
No, I want to say the one that Stef added in Pharo.
Jannik
On Nov 6, 2011, at 19:49 , Usman Bhatti wrote:
On Sun, Nov 6, 2011 at 6:12 PM, Stéphane Ducasse stephane.ducasse@inria.fr wrote: In moose ? because in pharo this is like that and the changes I added where just to make sure that all the clients do not have to deal with timestamp stupid parsing.
yes. there is FamixMethod>>timeStamp
On Nov 6, 2011, at 5:56 PM, Usman Bhatti wrote:
btw... just for info... famixmethod already has author information embedded in timestamp attribute ...
On Sun, Nov 6, 2011 at 5:54 PM, Usman Bhatti usman.bhatti@gmail.com wrote: ok thanx... the answer was coming from cache as I tried various combos... so I needed to clear cache (i.e. attribute at #authors) ...
On Sun, Nov 6, 2011 at 4:10 PM, Stéphane Ducasse stephane.ducasse@inria.fr wrote: because the block is only executed if the first arg is absent. this comes from dictionary
my dict at: kjhkjh ifAbsentPut: []
stef On Nov 6, 2011, at 3:37 PM, Andre Hora wrote:
You should write:
self privateState attributeAt: #authors ifAbsentPut: [self myAuthors]
On Sun, Nov 6, 2011 at 11:02 AM, jannik.laval jannik.laval@gmail.com 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@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Jannik Laval
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--- Jannik Laval