Documentation > PST v2.0a Modifications to Squeak v2.7
 
  • System Modifications
  • The following list indicates methods modified in the Squeak distribution and briefly explains why. The modifications are listed as extensions or modifications to the indicated classes.

    Most of the changes that had to be made had to do with the fact that a lot of the Browser code assumes that the classes are stored in the Smalltalk dictionary. The modifications included in PST allow a Squeak Project to specify the environment it wishes to have active when the Project itself is active.

    Extensions:

    Class>>method Description
    Bag>>asAssociations Need access to the object and counts from the bag.
    Character class>>esc Did not want to hard code a 27 asCharacter, wanted Characte to give it to me.
    Character class>>null Same as for #esc.
    Collection>>allSatisfy: From discussions on the Squeak list, this may already exist.
    Collection>>select:do: Why not? Does the equivalent select, followed by a do on the result of the select. This operation saves having a new collection to hold the result of the select.
    Float>>printString: Prints a Float with the specified number of digits after the decimal place.
    Object>>assert: Implemented by a bunch of classes already, don't know why its not in object or somewhere more useful like that. So added it, since my code does assertion checks.
    Project>>entering This method now gets called on a Project when it is about to be entered.
    Project>>environment Return the default environment for the project. I needed this in order to support having a different environment while being in a Pocket Smalltalk project. I created a specialized PstSqueakProject class that overrides these accordingly.
    ReturnNode>>expression A Pocket Smalltalk method can specify the execution of a primitive, by using . This is the same as Squeak. Well, the primitive numbers and their functionality between Pocket Smalltalk and Squeak are not the same. So I do a cheap trick where the special Pocket Smalltalk compiler I have built, will replace the code with special other code that calls a primitive handler. This special compiler, instead of building a parse tree manually, spawns another compiler and extracts the parse tree from this one and glues it into the original compiler's result.

     

    Method Changes:

    Class>>method Description
    Browser>>copyClass For some reason, the same goes for renameClass, even though a class can answer the environment its defined in, the Browser code insists on using the Smalltalk global. This poses a problem since the Pocket Smalltalk classes never exist on the Smalltalk global. So all references to Smalltalk were changed to asking the class for its environment.
    Browser>>renameClass Same as for copyClass.
    MessageSet class>>parse:toClassAndSelector: This method referenced the Smalltalk global. This won't work for classes in Pocket Smalltalk. So replaced references to Smalltalk with Project current environment.
    ParagraphEditor>>browseIt The usual, reference to Smalltalk.
    Preferences class>>personalizeUserMenu: I just made a small personalized menu that fits Pocket Smalltalk development. You can ignore this on
    Project>>enter:revert:saveForRevert: Had to modify this code to make it notify the new project being entered, that it was being entered. This allows the project to do something if it needs to. Why this is not there by default I don't know. But in my case it was VERY necessary. Its a fairly simple change.

     

     

     

     

     

     

     

     

     

 

Last updated: Dec 7, 2001

Palm Powered is a trademark of Palm Inc. Pocket Smalltalk is trademark of Pocket Smalltalk Group. Copyright (c) 1998 - 2001 Pocket Smalltalk Group.