. .

smalltalk

Comparing Objects in a Complex UI

May 25, 2011 14:25:52.731

This afternoon I had to export part of a tree of objects from one UI to a smaller one (to allow for end user editing of those objects). This all backs to a database, so I didn't want the AspectAdaptors (this is VisualWorks) I was hooking up to make changes to the actual domain objects; I wanted copies. Using #copy and #postCopy is pretty straightforward, but I wanted to check to make sure that I was doing it correctly

As part of our development toolset, we have some mods that add a little "inspect it" button to every window. That's highly useful, and got me most of where I wanted to go. The last step was simply using base functionality of VW that a lot of people probably aren't aware of - you can drag objects from an inspector and drop them on a workspace, creating a workspace variable that points to that object. Doing that from each piece of the UI, I was then able to run a simple #== check on the objects, and verify that my copy operation was working correctly. Kind of a cool thing to be able to do, that drag/drop between tools.

 Share Tweet This