Le 21/6/15 19:47, Tudor Girba a écrit :
Hi,
In the latest Pharo #50125, I do this from the command line:
./pharo Pharo.image eval "SystemWindow allSubInstances" ==> an OrderedCollection(a RubFindReplaceDialogWindow(534511616) a GLMSystemWindow(58720256))
There are two strange things: - the GLMSystemWindow has a nil model, although if you inspect it, it visually looks like a Playground window (normal playgrounds have a GTPlayground instance as model). - the RubFindReplaceDialogWindow has findTextField as nil (while normally it should be some PluggableTextFieldMorph). The RubFindReplaceDialogWindow only get its findTextField when the morph is built.
newMainPanel "Answer a new main panel." ^self newDialogPanel addMorphBack: self newContentMorph; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ addMorphBack: self newButtonRow; yourself newContentMorph ^(self newColumn: { (self newGroupbox: nil for: (self newColumn: { self newFindTextEntryMorph. (self newRow: { (self newColumn: { (self newCheckboxFor: self getSelected: #isRegex setSelected: #isRegex: getEnabled: nil label: 'Regular expression' translated help: nil). (self newCheckboxFor: self getSelected: #caseSensitive setSelected: #caseSensitive: getEnabled: nil label: 'Case sensitive' translated help: nil). (self newCheckboxFor: self getSelected: #entireWordsOnly setSelected: #entireWordsOnly: getEnabled: nil label: 'Entire words only' translated help: nil) } ). (self newColumn: { (self newCheckboxFor: self getSelected: #searchBackwards setSelected: #searchBackwards: getEnabled: nil label: 'Search backwards' translated help: nil). (self newCheckboxFor: self getSelected: #wrapAround setSelected: #wrapAround: getEnabled: nil label: 'Wrap around' translated help: nil) } ) } ) } ) ). (self newLabelGroup: {'Replace with: ' translated -> self newReplaceTextEntryMorph}) vResizing: #shrinkWrap} ) newFindTextEntryMorph | entryCompletion pt | entryCompletion := EntryCompletion new dataSourceBlock: [:currText | self prevFinds ]; filterBlock: [:currApplicant :currText | currText size = 0 or: [currApplicant asUppercase includesSubstring: currText asString asUppercase]]. pt := (self newAutoAcceptTextEntryFor: self get: #findText set: #findText: class: String getEnabled: nil help: 'Enter the text to find' translated entryCompletion: entryCompletion) acceptOnCR: false; ghostText: 'Text to find'; withDropListButton; crAction: [:t | self find]; yourself. pt textMorph autoFit: true; wrapFlag: false; margins: (2@1 corner: 2@1). textFieldMorph := pt. ^ pt We could initialize and set the variable to the "pt" and avoid to have to do it in the newFindTextEntryMorph but I do not see what we would gain.
Does anyone know where these come from?
Cheers, Doru
-- www.tudorgirba.com <http://www.tudorgirba.com>
"Every thing has its own flow"