2008/11/26 David Röthlisberger <squeak@webcitas.ch>:
Just download a latest pharo-dev image. Then file-in (not through MC) a .st file which having a package not-yet existing in your image. And then try to find this package in package browser , or one of the classes in it. System browser sees it, package browser don't.
ok, I could reproduce this problem.
It has two components: One was that the package list is cached and updating of the unpackaged categories is not really possible as they are not first-class entities, so we can't get a notification when they change easily. This problem I fixed by not caching the unpackages categories. There is a second problem though, namely that OB only refreshes when it gets a step signal from World. In the case of file in the step signal doesn't get triggered automatically, so the browser won't update immediately. But after a while it will. Of course we could always update whenever there is a change in the system, but this would lead to a huge performance penalty, particular when loading or fileing in code, so I didn't change that.
I think that is fairly simple: SystemChangeNotifier uniqueInstance notify: self "browser" ofSystemChangesOfItem: #class change: #Recategorize using: #someClassChanged:. In #someClassChanged: post a deferred message to update browser cache, so it will be handled just after file-in will be complete. This works bad, when you compiling code in background process , which having a lower priority than UI process. But in most cases squeak lives & compiling stuff in UI process. I'm not saying its good, but this is what we living with :)
David
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.