The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Calendar for New Pollock - Step 1

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Calendar for New Pollock - Step 1 Posted: Oct 27, 2005 2:26 PM
Reply to this message Reply

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
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Pollock

Advertisement

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).

Then, we enter and accept the following:

	Smalltalk.Pollock defineClass: #ActionDisplay
		superclass: #{Core.Object}
		indexedType: #none
		private: false
		instanceVariableNames: ''
		classInstanceVariableNames: ''
		imports: ''
		category: '(none)'

Then:

	Smalltalk.Pollock defineClass: #ActionDisplayArtist
		superclass: #{Core.Object}
		indexedType: #none
		private: false
		instanceVariableNames: ''
		classInstanceVariableNames: ''
		imports: ''
		category: '(none)'

And finally:

	Smalltalk.Pollock defineClass: #ActionDisplayAgent
		superclass: #{Core.Object}
		indexedType: #none
		private: false
		instanceVariableNames: ''
		classInstanceVariableNames: ''
		imports: ''
		category: '(none)'

Wave The Magic Wand

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:

	MacOSXLookPolicy class>>calendarArtistClass
		^Pollock.CalendarArtist

What's Up Pussycat?

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.

And So It Goes
Sames

Read: Calendar for New Pollock - Step 1

Topic: Get your typos here Previous Topic   Next Topic Topic: And now... Halloween!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use