Open ackerleytng opened 4 years ago
Hi @ackerleytng it is possible you need to also load https://github.com/pharo-spec/Spec
@StevenCostiou I tried loading Spec with the Metacello code on the Spec readme, but I'm still getting the same error. I tried editing the .class.st file directly, and I'm able to load FileDialog if I delete these two lines
#traits : 'TSpDynamicPresenter',
#classTraits : 'TSpDynamicPresenter classTrait',
Is there something else I can try?
Here's the full stack in the debugger, which I get when I load FileDialog.
UndefinedObject(Object)>>doesNotUnderstand: #asTraitComposition
UndefinedObject>>doesNotUnderstand: #asTraitComposition
MCClassDefinition>>traitCompositionCompiled
[ :builder |
builder
superclass: superClass;
name: name;
layoutClass: (ObjectLayout layoutForType: type);
slots: self instanceVariables;
sharedVariables: self classVariables;
sharedPools: self sharedPoolsString;
classSlots: self classInstanceVariables;
traitComposition: self traitCompositionCompiled;
classTraitComposition: self classTraitCompositionCompiled;
comment: comment stamp: commentStamp;
category: category;
environment: superClass environment ] in [ Smalltalk classInstaller
make: [ :builder |
builder
superclass: superClass;
name: name;
layoutClass: (ObjectLayout layoutForType: type);
slots: self instanceVariables;
sharedVariables: self classVariables;
sharedPools: self sharedPoolsString;
classSlots: self classInstanceVariables;
traitComposition: self traitCompositionCompiled;
classTraitComposition: self classTraitCompositionCompiled;
comment: comment stamp: commentStamp;
category: category;
environment: superClass environment ] ] in MCClassDefinition>>createClass in Block: [ :builder | ...
ShiftClassInstaller>>make:
ShiftClassInstaller class>>make:
[ Smalltalk classInstaller
make: [ :builder |
builder
superclass: superClass;
name: name;
layoutClass: (ObjectLayout layoutForType: type);
slots: self instanceVariables;
sharedVariables: self classVariables;
sharedPools: self sharedPoolsString;
classSlots: self classInstanceVariables;
traitComposition: self traitCompositionCompiled;
classTraitComposition: self classTraitCompositionCompiled;
comment: comment stamp: commentStamp;
category: category;
environment: superClass environment ] ] in MCClassDefinition>>createClass in Block: [ Smalltalk classInstaller...
FullBlockClosure(BlockClosure)>>on:do:
MCClassDefinition>>createClass
MCClassDefinition>>load
MCClassDefinition(MCDefinition)>>addMethodAdditionTo:
[ :each | each addMethodAdditionTo: methodAdditions ] in MCPackageLoader>>basicLoadDefinitions in Block: [ :each | each addMethodAdditionTo: methodAddition...etc...
[ :each | | newLabel |
"Special handling for first and last element"
(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]])
ifTrue: [
bar current: count.
oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel])
ifFalse: [
bar label: newLabel.
oldLabel := newLabel ].
lastUpdate := Time millisecondClockValue ].
aBlock value: each.
count := count + 1 ] in [:bar |
labelBlock := aStringOrBlock isString
ifTrue: [
bar label: aStringOrBlock.
[ :dummyItem | aStringOrBlock] ]
ifFalse: [ aStringOrBlock ].
self do: [ :each | | newLabel |
"Special handling for first and last element"
(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]])
ifTrue: [
bar current: count.
oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel])
ifFalse: [
bar label: newLabel.
oldLabel := newLabel ].
lastUpdate := Time millisecondClockValue ].
aBlock value: each.
count := count + 1 ] ] in OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [ :each | | newLabel |...
OrderedCollection>>do:
[:bar |
labelBlock := aStringOrBlock isString
ifTrue: [
bar label: aStringOrBlock.
[ :dummyItem | aStringOrBlock] ]
ifFalse: [ aStringOrBlock ].
self do: [ :each | | newLabel |
"Special handling for first and last element"
(count = 0 or: [ count + 1 = size or: [(Time millisecondsSince: lastUpdate) >= msecs]])
ifTrue: [
bar current: count.
oldLabel = (newLabel := (labelBlock cull: each) ifNil: [oldLabel])
ifFalse: [
bar label: newLabel.
oldLabel := newLabel ].
lastUpdate := Time millisecondClockValue ].
aBlock value: each.
count := count + 1 ] ] in OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [:bar |...
FullBlockClosure(BlockClosure)>>cull:
[ ^ block cull: self ] in [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ ^ block cull: self ]
[ activeProcess
psValueAt: index
put: anObject.
aBlock value ] in CurrentJob(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
CurrentJob(DynamicVariable)>>value:during:
CurrentJob class(DynamicVariable class)>>value:during:
[ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run in Block: [ self prepareForRunning....
FullBlockClosure(BlockClosure)>>ensure:
Job>>run
MorphicUIManager(UIManager)>>displayProgress:from:to:during:
ByteString(String)>>displayProgressFrom:to:during:
OrderedCollection(Collection)>>do:displayingProgress:every:
OrderedCollection(Collection)>>do:displayingProgress:
MCPackageLoader>>basicLoadDefinitions
[self basicLoadDefinitions] in MCPackageLoader>>basicLoad in Block: [self basicLoadDefinitions]
I try and I have the same error. I think this error is a consequence of trait renaming, proof: https://github.com/pharo-spec/Spec/issues/748 TSpDynamicPresenter is not existed but SpTDynamicPresenter exist
as we saw self traitCompositionString
return 'TSpDynamicPresenter'
we can see from FDPathPresenter.class.st
Class {
#name : #FDPathPresenter,
#superclass : #SpPresenter,
#traits : 'TSpDynamicPresenter',
#classTraits : 'TSpDynamicPresenter classTrait',
#instVars : [
'action',
'count'
],
#category : #'NewTools-FileDialog-UI'
}
so the error come from monticello trying to evaluate 'TSpDynamicPresenter' that don't exist
Thanks for the feedback. From monday I will ask pablo to show me how I can work on fix some problems in Spec2 and newTools.
I'm getting a
#asTraitComposition was sent to nil
, whereSmalltalk compiler evaluate: self traitCompositionString
is nil.To reproduce, I'm using a Pharo 9.0 image and after doing this
I manually loaded
NewTools-FileDialog
and got this issue.I noticed that
TSpDynamicPresenter
is nowhere in this repository, could that be why?