This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Calendar for New Pollock - Step 1
Feed Title: Pollock
Feed URL: http://www.cincomsmalltalk.com/rssBlog/pollock-rss.xml
Feed Description: Pollock - the next VW GUI
Today we'll start the task of getting our Calendar widget working in the newest version of Pollock.
Wash And Wear
We start by going to the Cincom Public Repository, and loading the last version of our Calendar. Package "Pollock-Calendar", version 1.21. What we get is a window with the following and an OK button:
Warning: Package "Pollock-Calendar" cannot be loaded.
The following classes cannot be loaded because their superclasses are neither in the image nor in the package being loaded:
CalendarAgent (subclass of Root.Smalltalk.Pollock.ActionDisplayAgent)
CalendarArtist (subclass of Root.Smalltalk.Pollock.ActionDisplayArtist)
Calendar (subclass of Root.Smalltalk.Pollock.ActionDisplay)
Now, that's not too nice.
If we go ahead and press the "OK" button, we get a new window titled "Unloadable Definitions for Pollock-Calendar". In there we see all of the code that wasn't loaded. From the window text above though, and previous posts about changes in Pollock, we know what's missing. ActionDisplay and it's cousins have been renamed to ComponentPair.
So the question is, how do we get this code in our image so we can start fixing it?
Dirty Tricks
Here's what we'll do... We'll start by opening a system browser, and selecting the "(none)" package (at the bottom of the list of packages).
Now, we go back and load the Pollock-Calendar again from the Published Items tool. First we get a dialog asking if we want to load that version (to which we reply Yes).
Then we get a dialog asking "The selected version is already loaded. Reconcile and reload?", to which we answer, Yes.
Finally, we get a dialog asking "Image package Pollock-Calendar" was modified. Replace it with a new version?", to which we answer, Replace.
Almost everything loads now. We get one definition that didn't load... For #calendarArtistClass of "Pollock.MacOSXLookPolicy" class. This is because between the time we last worked on the Calendar, we merged the then special Pollock MacOSX look policy into the standard MacOSX look policy, and removed the Pollock only version. That's ok. We can fix that easily enough.
First, we go to our newly loaded Pollock-Calendar package, go to the main menu's Class menu, select the "New >>" submenu, then from that submenu the "Class Extension..." item. In the resulting dialog, simply enter "MacOSXLookPolicy" and press the OK button.
Now we have a new class extension for the MacOSXLookPolicy in our package. Then, on the class side, in the "constants" protocol, we add:
Now all the code is loaded into our image, but none of it will work. Next week we'll move the old classes to their new place in the Pollock hierarchy, and getting them working.