[BUG| [FIX] Loading KeymappingInstaller-5.sar

Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Mon Nov 19 14:50:42 UTC 2007


To who own or maintain Keymap.

When trying to load into Squeak3.10.1beta.7155.image I have the attached
error.

I add a fix working for me.

And don't said I should do a Mantis report, as I know I should.

Think I must make the cake, sell and eat too ? :=)

Edgar

-------------- next part --------------
From: edgardec2001 at yahoo.com
To: squeak-dev at lists.squeakfoundation.org
Subject: [BUG]Keymap class(Object)>>error:

Tryng to load .KeymappingInstaller-5.sar on FunSqueak///

19 November 2007 9:26:02 am

VM: Mac OS - a SmalltalkImage
Image: FunSqueak3.10alpha [latest update: #1]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir Discovery:Users:admin:Squeak3.10:FunSqueak
Trusted Dir Discovery:Users:admin:Squeak3.10:FunSqueak
Untrusted Dir Discovery:Users:admin:Library:Preferences:Squeak:Internet:My Squeak

Keymap class(Object)>>error:
	Receiver: Keymap
	Arguments and temporary variables: 
		aString: 	'Only classes supported as targets.'
	Receiver's instance variables: 
		superclass: 	Model
		methodDict: 	a MethodDictionary(#addEntry:->a CompiledMethod (3274) #addSequence...etc...
		format: 	136
		instanceVariables: 	#('entries' 'category')
		organization: 	('entries' addEntry: addSequence:action: addSequence:selector:arg...etc...
		subclasses: 	nil
		name: 	#Keymap
		classPool: 	nil
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	#Keymapping
		traitComposition: 	nil
		localSelectors: 	nil

Keymap class>>privateActionForTarget:selector:
	Receiver: Keymap
	Arguments and temporary variables: 
		tgt: 	a Project(KeymappingInstaller-5.sar)
		sel: 	#toggleFlapsSuppressed
	Receiver's instance variables: 
		superclass: 	Model
		methodDict: 	a MethodDictionary(#addEntry:->a CompiledMethod (3274) #addSequence...etc...
		format: 	136
		instanceVariables: 	#('entries' 'category')
		organization: 	('entries' addEntry: addSequence:action: addSequence:selector:arg...etc...
		subclasses: 	nil
		name: 	#Keymap
		classPool: 	nil
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	#Keymapping
		traitComposition: 	nil
		localSelectors: 	nil

[] in Keymap class>>privateInstallWorldCommandKeys {[:trip |  trip second = World   ifTrue: [action := self privateActionForWorl...]}
	Arguments and temporary variables: 
		km: 	a Keymap<World>
		trip: 	an Array($F a Project(KeymappingInstaller-5.sar) #toggleFlapsSuppressed '...etc...
		event: 	KMFakeKeyEvent[key: '<m-z>']
		action: 	#undoOrRedoCommand

Array(SequenceableCollection)>>do:
	Receiver: an Array(an Array($o a PasteUpMorph(1622) [world] #activateObjectsTool 'Activate the "Obje...etc...
	Arguments and temporary variables: 
		aBlock: 	[] in Keymap class>>privateInstallWorldCommandKeys {[:trip |  trip seco...etc...
		index: 	4
		indexLimiT: 	18
	Receiver's instance variables: 
an Array(an Array($o a PasteUpMorph(1622) [world] #activateObjectsTool 'Activate the "Obje...etc...


--- The full stack ---
Keymap class(Object)>>error:
Keymap class>>privateActionForTarget:selector:
[] in Keymap class>>privateInstallWorldCommandKeys {[:trip |  trip second = World   ifTrue: [action := self privateActionForWorl...]}
Array(SequenceableCollection)>>do:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Keymap class>>privateInstallWorldCommandKeys
Keymap class>>installWorldKeymap
Keymap class>>initializeKeymap
[] in Keymap class>>findAndRegisterKeymaps {[:each | ((each respondsTo: #initializeKeymap)    and: [each class includesS...]}
[] in Model class(Behavior)>>allSubclassesDo: {[:cl |  aBlock value: cl.  cl allSubclassesDo: aBlock]}
Array(SequenceableCollection)>>do:
Model class(Class)>>subclassesDo:
Model class(Behavior)>>allSubclassesDo:
[] in Object class(Behavior)>>allSubclassesDo: {[:cl |  aBlock value: cl.  cl allSubclassesDo: aBlock]}
Array(SequenceableCollection)>>do:
Object class(Class)>>subclassesDo:
Object class(Behavior)>>allSubclassesDo:
Keymap class>>findAndRegisterKeymaps
SARInstaller>>DoIt
Compiler>>evaluate:in:to:notifying:ifFail:logged:
Compiler class>>evaluate:for:notifying:logged:
Compiler class>>evaluate:for:logged:
[] in MultiByteBinaryOrTextStream(PositionableStream)>>fileInFor:announcing: {[val := (self peekFor: $!)     ifTrue: [(Compiler       evaluate: self nextC...]}
BlockContext>>on:do:
[] in MultiByteBinaryOrTextStream(PositionableStream)>>fileInFor:announcing: {[:bar |  [self atEnd]   whileFalse: [bar value: self position.    self skipS...]}
[] in ProgressInitiationException>>defaultMorphicAction {[result := workBlock value: progress]}
BlockContext>>ensure:
ProgressInitiationException>>defaultMorphicAction
ProgressInitiationException>>defaultAction
UndefinedObject>>handleSignal:
ProgressInitiationException(Exception)>>signal
ProgressInitiationException>>display:at:from:to:during:
ProgressInitiationException class>>display:at:from:to:during:
...etc...
-------------- next part --------------
'From FunSqueak3.10alpha of 19 November 2007 [latest update: #1] on 19 November 2007 at 11:41:26 am'!

!Keymap class methodsFor: 'sample keymaps' stamp: 'edc 11/19/2007 11:39'!
privateInstallWorldCommandKeys
	| km |
	km := KeymapManager default mapForCategoryOrCreate: #World.
	World defaultDesktopCommandKeyTriplets
		do: [:trip | 
			| event action | 
			trip second = World
				ifTrue: [action := self privateActionForWorldSelector: trip third]
				ifFalse: [trip second isBehavior ifTrue:[
					
					action := self privateActionForTarget: trip second selector: trip third]].
			event := KMFakeKeyEvent fromChar: trip first.
			trip first isUppercase
				ifTrue: [event shiftPressed: true].
			event commandKeyPressed: true.
			km addSequence: event kmString action: action].
	km addSequence: '<ms-K>' action: (ClassMethodAction forClass: KeymapEditor selector: #open)! !


More information about the Squeak-dev mailing list