Unregistering Stamps in Newton Works Draw

One of the Newton 2.x OS Q&As
Copyright © 1997 Newton, Inc. All Rights Reserved. Newton, Newton Technology, Newton Works, the Newton, Inc. logo, the Newton Technology logo, the Light Bulb logo and MessagePad are trademarks of Newton, Inc. and may be registered in the U.S.A. and other countries. Windows is a registered trademark of Microsoft Corp. All other trademarks and company names are the intellectual property of their respective owners.


For the most recent version of the Q&As on the World Wide Web, check the URL: http://www.newton-inc.com/dev/techinfo/qa/qa.htm
If you've copied this file locally,click here to go to the main Newton Q&A page.
This document was exported on 7/23/97.


NEW: Unregistering Stamps in Newton Works Draw (7/2/97)

Q: When I call the Newton Works Draw stationery's UnRegStamps method, my registered stamps do not get unregistered. What is going wrong?

A: There is a bug in the Draw application's UnRegStamps method that causes stamps to remain registered. Use the following code to unregister your stamps:

local viewDef := GetViewDefs( 'drawPaper ).default;if viewDef then    begin        // Call UnregStamps conditionally.  If the Draw application is not        // installed, GetViewDefs will return the "Missing Stationery"        // stationery.        viewDef:?UnregStamps( kStampRegistrySymbol );        local registry := GetViewDefs( 'drawPaper ).StampListRegistry;        if registry AND HasSlot( registry, kStampRegistrySymbol ) then            RemoveSlot( registry, kStampRegistrySymbol );    end;


Note that calling the UnRegStamps method is required for future compatibility.