Ok I think get your question. Not an easy one :)So LabelModel knows its AbstractSpec with a class side method:LabelModel class>>defaultSpec<spec>^ {#LabelSpec.#model:. #model.#getEnabledSelector:. #enabled.#getTextSelector:. #getText.#vResizing:. #shrinkWrap.#hResizing:. #spaceFill.#borderWidth:. #(model borderWidth).#borderColor:. #(model borderColor).#dragEnabled:. #(model dragEnabled).#dropEnabled:. #(model dropEnabled).#setBalloonText:. { #model . #help}}So you have LabelModel->#LabelSpec.This symbol, #LabelSpec, corresponds to a class. You can check:SpecBinder class>>initializeBindings"self initializeBindings"bindings := IdentityDictionary new.bindingsat: #ListSpec put: ListSpec;at: #MultiColumnListSpec put: MultiColumnListSpec;at: #IconListSpec put: IconListSpec;at:#model put: ModelSpec;at: #RawSpec put: RawSpec;at: #ComposableSpec put: ComposableSpec;at: #TextSpec put: TextSpec;at: #ButtonSpec put: ButtonSpec;at: #CheckboxSpec put: CheckboxSpec;at: #DropListSpec put: DropListSpec;at: #LabelSpec put: LabelSpec;at: #FrameLayoutSpec put: FrameLayoutSpec;at: #TextFieldSpec put: TextFieldSpec;at: #TreeSpec put: TreeSpec;at: #WindowSpec put: WindowSpec;at:#DialogWindowSpec put: DialogWindowSpec;So you have LabelModel->#LabelSpec->LabelSpec.LabelSpec is an AbstractSpec and subclasses of AbstractSpec has the method classSymbol. Here we haveLabelSpec>>classSymbol^ #Label
So you have LabelModel->#LabelSpec->LabelSpec->#Label.
Now this symbol corresponds to a class. You can check:MorphicBindings>>initializeClassesDictionary^ IdentityDictionary newat: #List put: #PluggableListMorph;at: #IconList put: #PluggableIconListMorph;at: #Text put: #PluggableTextMorph;at: #Button put: #PluggableButtonMorph;at: #Panel put: #PanelMorph;at: #Checkbox put: #CheckboxMorph;at: #DropList put: #DropListMorph;at: #TextField put: #PluggableTextFieldMorph;at: #Label put: #LabelMorph;at: #MultiColumnList put: #PluggableMultiColumnListMorph;at: #Tree put: #MorphTreeMorph;at: #Slider put: #PluggableSliderMorph;at: #FrameLayout put: #LayoutFrame;at: #Window put: #SpecWindow;at: #DialogWindow put: #SpecDialogWindow;yourself
So you have LabelModel->#LabelSpec->LabelSpec->#Label->LabelMorph.Does that answer your question this time ?
2013/8/13 Erwan Douaille <douailleerwan@gmail.com>
Hi,�Does anyone can explain me how/where the link is ?I guess its related to AbstractSpec subclasses, but i don't know how does it work.I will be at lab the whole week.2013/8/12 Cl�ment Bera <clement.bera@minesdedouai.fr>A spec model (ComposableModel) has a window (WindowModel), this window has a window (SpecWindow), this window inherits from StandardWindow which inherits from SystemWindow�which inherits from MorphicModel�which inherits fromBorderedMorph�which inherits from MorphDoes that answer your question ?No :)I mean How the labelModel know than his morph is a LabelMorph ?