Begin forwarded message:

From: Antony Blakey <[EMAIL PROTECTED]>
Date: October 29, 2008 8:36:49 AM CEST
To: Stéphane Ducasse <[EMAIL PROTECTED]>
Subject: Re: [Pharo-project] ToolSet


On 29/10/2008, at 5:55 PM, Stéphane Ducasse wrote:

With a registration in a post load phase the tool registers and the MENU or whatever does not have to do a
query over the complete system.

When I mean discovery, I don't mean that the discovery is performed every time. Discovery is used on two occasions:

1. When re-initializing the system.
2. When showing the user what methods define commands i.e. a UI for system exploration.

Discovery finds the methods, and then you call those methods, which return a command, which you then 'register'. So really, it's like a registration system but the framework is declarative rather than programatic.

You need the ability to listen for method redefinitions, so that you can incrementally maintain the registration data, but even that can be lazily batched i.e. when a method containing a 'pragma' symbol (or pragma if you want) is redefined, you clear the registration cache, and the next call recreates it.

For a full command invocation system such as Commando, there are a number of optimizations I do, such as maintaining a cache of accelerators -> applicable commands, and context classes -> applicable commands. I use Commando in both VW and Squeak, and there is no delay, because everything is cached.

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.
 -- Douglas Adams





_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to