Hi Lukas, all,
#isRestful is called by PRContext >> urlOn:, typically via the PRMenuRenderer (so, upon every page refresh), which delegates to the current Command, which, in the case of PRViewCommand, delegates in turn to its 'viewComponent'. To avoid creating an instance of the #viewComponentClass just to check if its #isRestful, would it make sense to: 1) Move to the class side the four occurrences of #isRestful implementation in the PRViewComponent hierarchy, and then 2) Change the code in PRViewCommand to delegate to #viewComponentClass? Regards, Reza _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Sorry for not replying earlier. That sounds like a good idea. I don't
see anybody depending on the instance-side implementation. Lukas On 10 August 2010 23:41, Reza Razavi <[hidden email]> wrote: > Hi Lukas, all, > > #isRestful is called by PRContext >> urlOn:, typically via the > PRMenuRenderer (so, upon every page refresh), which delegates to the current > Command, which, in the case of PRViewCommand, delegates in turn to its > 'viewComponent'. > > To avoid creating an instance of the #viewComponentClass just to check if > its #isRestful, would it make sense to: > 1) Move to the class side the four occurrences of #isRestful implementation > in the PRViewComponent hierarchy, and then > 2) Change the code in PRViewCommand to delegate to #viewComponentClass? > > Regards, > Reza > > _______________________________________________ > Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
At 08:53 18/08/2010, Lukas Renggli wrote:
>I don't see anybody depending on the instance-side implementation. Thanks for your response Lukas. I'll propose a patch asap. Regards, Reza _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
I already committed a patch :-)
On 18 August 2010 09:28, Reza Razavi <[hidden email]> wrote: > At 08:53 18/08/2010, Lukas Renggli wrote: >> >> I don't see anybody depending on the instance-side implementation. > > Thanks for your response Lukas. > I'll propose a patch asap. > > Regards, > Reza > _______________________________________________ > Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Name: Pier-Seaside-lr.489
Author: lr Time: 18 August 2010, 9:20:02 am UUID: 4b4b1ed3-369e-4a1b-93cd-bc3dc0374ddd Ancestors: Pier-Seaside-lr.488 - moved #isRestful to class-side Also Seaside needs a patch to work with the latest Pier: Name: Seaside-Core-lr.656 Author: lr Time: 18 August 2010, 9:19:12 am UUID: 8571f819-9d9b-4fbd-bf2f-0e612da035cf Ancestors: Seaside-Core-pmm.655 - re-added #hasCookieInContext:, it is required by other software On 18 August 2010 09:29, Lukas Renggli <[hidden email]> wrote: > I already committed a patch :-) > > On 18 August 2010 09:28, Reza Razavi <[hidden email]> wrote: >> At 08:53 18/08/2010, Lukas Renggli wrote: >>> >>> I don't see anybody depending on the instance-side implementation. >> >> Thanks for your response Lukas. >> I'll propose a patch asap. >> >> Regards, >> Reza >> _______________________________________________ >> Magritte, Pier and Related Tools ... >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki >> > > > > -- > Lukas Renggli > www.lukas-renggli.ch > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In reply to this post by Lukas Renggli
At 09:29 18/08/2010, Lukas Renggli wrote:
I already committed a patch :-) Impressive; thanks! Just in case you would still have some time to devote, a similar case is "PRViewCommand >> label", which is in particular often called by "WAAnchorTag >> goto:" An alternative would be: PRViewCommand >> label Which would imply for example: PRDefaultView class >> labelIn: aContext And eventually: PRDefaultView >> label In the "worth" case, the class would instantiate itself to compute its label. That could though break the plug-ins that depend on the current behavior. Regards, Reza _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |