[ANN] Documentation for Omnibrowser
Damien Cassou
damien.cassou at gmail.com
Fri May 4 12:45:57 UTC 2007
2007/5/4, Daniel Vainsencher <danielv at tx.technion.ac.il>:
> Damien Cassou wrote:
>
> > Even with a new image, upgrading OB is currently not a good solution.
> > This is because at least two installed packages (DynamicProtocols and
> > OmniBrowserFixes) overrides some methods.
> Ouch
> > Upgrading OB would then
> > remove those overrides. I don't know what I can do for this :-(
> >
> Not include packages that include overrides?
Sometimes there is no other solution than doing an override.
> At least for fixes, move them into their intended permanent home...
This is not possible because the fixes are trait-specific and OB must
be backward compatible.
> For extensions, refactor them and the base package until the override is
> no longer needed.
I refactored DynamicProtocols so that I don't have an override for it
anymore. The code is really ugly however.
OBSystemBrowser>>addTo: root class: classSel comment: commentSel
metaclass: metaclassSel
"Adds the dynamic protocols to the metagraph"
|class metaclass method|
super addTo: root class: classSel comment: commentSel metaclass: metaclassSel.
"Get back the meta nodes from the root. Really ugly"
class := root children detect: [:node | node name = 'Class'].
metaclass := root children detect: [:node | node name = 'Metaclass'].
method := class children anyOne children first.
DynamicProtocols
installDPOnClass: class
metaClass: metaclass
method: method.
^ root
I have exactly the same code in OBHierarchyBrowser. It can be enhanced
a bit but I think a bigger refactoring is needed in methods creating
metagraphs.
If you have time and solutions, you can commit to OmniBrowser,
OmniBrowserFixes and DynamicProtocols. They are all open to
modifications.
--
Damien Cassou
More information about the Squeak-dev
mailing list
|