=> 10/28/99 12:25:25 PM EDT, Dean_Swan@Mitel.COM => << Under MVC, it seems that the System Browser is quite broken with respect to adding new classes, methods, and method categories, all of which seem to work fine in a Morphic project. >>
I assume you're talking about 2.6. Right? (For once I'm up to date).
Actually, I was using 2.5, but I just checked, and 2.6 has the same problems.
What is your platform? The Browser in MVC seems to be running okay for me on Windows'95.
I've seen this on Win95, WinNT, and MacOS 8.6. On the Mac I was using Squeak 2.4. On both Windoze machines I was using 2.5, but the problem still exists in 2.6.
Do you have a specific test that will demonstrate the problem? I would be glad to run it in my environment to try and isolate whether this is a platform specific bug.
Here's what I did:
1) In the source editing pane of a system browser (in the default MVC project), type:
CursorWithMask subclass: #SoftwareCursor instanceVariableNames: 'saveForm savePoint ' classVariableNames: '' poolDictionaries: '' category: 'Graphics-Display Objects'
2) 'accept' it. (i.e. 'accept' from pane menu, or Alt-s or Cmd-s (Mac)).
This should add the 'SoftwareCursor' class to the class list, and set the browser to 'Graphics-Display Objects' with 'SoftwareCursor' as the current class. It doesn't. It appears to do nothing.
3) Open a system browser in a morphic project.
4) Repeat steps (1) & (2) in the browser in the morphic project. It works as expected.
5) Switch back to the MVC project, close the system browser, and open a new one.
6) Select 'Graphics-Display Objects' in the class category pane, 'SoftwareCursor' in the class pane. In the method category pane, select 'add item' from the pane menu. From the next menu pick 'testing'.
7) In the source code pane, replace the 'message selector and arguments' line with 'display'. Select the whole contents of the pane and 'accept' it from the pane menu or 'save' with Alt-s.
This should complain about 'statements' is undefined, 'declare as temporary' or 'cancel'. It doesn't do this.
8) Swithc back to your morphic project, select a different class, the reselect 'SoftwareCursor' so the browser gets the added method category.
9) Select the 'testing' category.
10) Replace the 'method selector and arguments' line with 'display'.
11) Select the whole contents of the pane and 'accept' it.
Everything works as expected from this point on.
Jerry Archibald systemObjectivesIncorporated
I've encountered similar variations to this problem. The problem is that multiple browsers get confused about what's in their lists vs. what's defined in the system as a whole. Adding something in one browser can confuse another browser which THINKS it sees the whole list, but something was just added to the list.
I posted a fix for a couple of these problems ages ago -- I specifically dealt with classes and message categories. But it really needs a Browser overhaul.
The short term fix is to use update (in the Class Categories pane) when you've changed something in another browser.
Mark
-------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html
There's two parts to this problem:- a) using an index in the pluggable list means that you will inevitably get a problem if the underlying collection changes size or ordering. It can simply be fixed by allowing the use of names instead of the numeric index. At least that way you avoid many of the immediately annoying trouble. Anyone who has an old copy of a ObjectWorks or early VisualWorks will probably be able to find a working implementation to work from. Of course, in some cases you don't want to use the names because they're not unique - so you need to allow a choice for the coder.
b) cross-browser updating would fix much of the rest of the problem EXCEPT you have to consider what to do as part of the update. Simply making the browser fetch a new SystemOrganization might inadvertently dump all your work in a not- yet-accepted TextView for example! Take care....
tim PS I'd dig out working code to suggest but I'm on a short timeline right now. Sorry.
Take a look at the morphic development environment on Squeak 2.7 alpha. You'll find that all the problems mentioned in this thread, and many other related problems as well, are fixed.
Browsers, message-lists, versions-browsers, etc., all now keep themselves up to date automatically. They feel changes made elsewhere -- anywhere (even via file-in or code update, even in other projects) -- and update themselves to be compatible with the latest state of affairs. Both active and inactive windows have this self-updating property, and both the contents of list panes and the contents of code panes are affected. Even the pernicious case where you have unsubmitted code edits for a method in one window, but then the method subsequently gets changed elsewhere, is addressed.
Similarly, inspectors update themselves, even reformulating the instance-variable list if the class structure of the inspectee changes.
Some of these 2.7 alpha "smart updating" improvements also benefit the mvc user -- e.g., an mvc "versions browser" now updates nicely when you revert a method within it, and also whenever you reactivate its window. It wouldn't be hard to bring the remaining improvements across to the mvc environment.
See the preambles for updates 1563 and 1564 for more detailed information on this work.
For a strong effect try this out in 2.7 alpha: set the "optional morphic buttons" and "use annotation panes" preferences to true, then ask to "browse recent submissions" (in the 'changes' menu, or via the button in the Squeak flap), and then proceed to work in your usual fashion. The recent-submissions browser will continuously track all subsequent changes, providing a handy audit trail and an easy way to examine and revisit your recent working set. If you have the "diffs" button set, you will additionally see exactly what was changed in each method.
Once you get used to these congenial new services, you'll soon enough forget the bad old days.
-- Scott
PS: If you do update to 2.7 alpha to try out the improved tools, be aware that pre-existing browsers, inspectors, etc., will *not* have the smart-updating behavior. Only windows launched after you've updated at least through #1564 will have it.
PPS: The problems people have been mentioning have all been present in Squeak since the birth of Squeak, and they have been present in both the mvc and the morphic environments, and indeed they have been continuously present in every system in Squeak's ancestral blood-line dating back to the advent of browsers and inspectors around 25 years ago.
squeak-dev@lists.squeakfoundation.org