SyntaxMorph (was Re: About the new syntax)
Bob Arning
arning at charm.net
Fri Jun 9 14:17:27 UTC 2000
On Fri, 9 Jun 2000 09:44:42 -0400 (EDT) Bijan Parsia <bparsia at email.unc.edu> wrote:
> http://www.unc.edu/~bparsia/squeak/debugmorph.gif
>
>You'll have to imagine the little popups appearing over the variables with
>thier contents in them.
Bijan,
Try this. It adds an item to the control-menu for a morph which will write the gif after a 3 second delay. This allows time for you to position the cursor to get the balloons to appear.
Cheers,
Bob
===== code follows =====
'From Squeak2.8alpha of 13 January 2000 [latest update: #2299] on 9 June 2000 at 10:13:32 am'!
"Change Set: morphSnapshot
Date: 9 June 2000
Author: Bob Arning
adds an item <GIF to disk> to the control-menu for a morph. This will wait 3 seconds so you can position the mouse to get balloons, etc to appear. Then it writes a GIF of the morph's bounds to disk."!
!Morph methodsFor: 'drawing' stamp: 'RAA 6/9/2000 10:09'!
saveGIF
| form fileName |
[
(Delay forSeconds: 3) wait.
form _ Form fromDisplay: self boundsInWorld.
form bits size = 0 ifTrue: [^ self beep].
fileName _ FileDirectory default nextNameFor: 'Morph' extension: 'gif'.
Utilities informUser: 'Writing ' , fileName
during: [GIFReadWriter putForm: form onFileNamed: fileName].
] forkAt: Processor highIOPriority! !
!Morph methodsFor: 'menus' stamp: 'RAA 6/9/2000 10:07'!
addCustomMenuItems: aCustomMenu hand: aHandMorph
"Add morph-specific items to the given menu which was invoked by the given hand."
aCustomMenu add: 'add drop-shadow' action: #addDropShadow.
(self isKindOf: SystemWindow)
ifFalse: [aCustomMenu add: 'put in a window' action: #embedInWindow].
aCustomMenu addUpdating: #stickinessString target: self action: #toggleStickiness.
aCustomMenu add: 'adhere to edge...' action: #adhereToEdge.
Preferences noviceMode ifFalse:
[self addDebuggingItemsTo: aCustomMenu hand: aHandMorph].
aCustomMenu add: 'GIF to disk' action: #saveGIF.
! !
More information about the Squeak-dev
mailing list
|