Skip to content

Commit

Permalink
fix bug Globals Tab in dictionary list fails if globals nil
Browse files Browse the repository at this point in the history
removed unsent method, too
  • Loading branch information
Eric Winger authored and Eric Winger committed Aug 26, 2022
1 parent 1901cf0 commit ac1aa41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
10 changes: 6 additions & 4 deletions sources/JadeiteBrowserPresenter.cls
Original file line number Diff line number Diff line change
Expand Up @@ -710,15 +710,15 @@ editSaveClass
a debugger is raised as not much information is available
without a stack."

| browserService |
| browserService |
browserService := RowanBrowserService new.
browserService
command: #compileClass:;
commandArgs: (Array with: classDefinitionPresenter value).
browserService selectedClass: self selectedClass name.
[self issueCommand: browserService] on: Error
do:
[:ex |
[:ex |
(ex isKindOf: GsCompileError)
ifTrue: [self handleClassCompileError: ex]
ifFalse: [self statusBarText: 'ERROR: ' , ex messageText].
Expand Down Expand Up @@ -1962,8 +1962,10 @@ updateGlobalsTab
with: 'Value').
dictionaryPresenter selections isEmpty
ifFalse:
[dictionaryPresenter selections
do: [:dictionaryService | dictionaryService globals do: [:globalArray | array nextPut: globalArray]]].
[dictionaryPresenter selections do:
[:dictionaryService |
dictionaryService globals
ifNotNil: [:globals | globals do: [:globalArray | array nextPut: globalArray]]]].
globalsTab list: array contents!
updateHierarchy
Expand Down
25 changes: 0 additions & 25 deletions sources/Rowan UI Base.pax
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ package methodNames
add: #JadeSystemBrowserPresenter -> #createSchematicWiring;
add: #JadeSystemBrowserPresenter -> #createSchematicWiringForClassHierarchyTabs;
add: #JadeSystemBrowserPresenter -> #currentMethodSource;
add: #JadeSystemBrowserPresenter -> #editSaveClass;
add: #JadeSystemBrowserPresenter -> #findClass;
add: #JadeSystemBrowserPresenter -> #handleClassCompileError:;
add: #JadeSystemBrowserPresenter -> #instanceClassTabs;
Expand Down Expand Up @@ -4451,29 +4450,6 @@ createSchematicWiringForClassHierarchyTabs
currentMethodSource
^self currentMethodSourceFrom: methodSourcePresenter value!

editSaveClass
| string stream flag |
string := classDefinitionPresenter value
collect: [:each | each codePoint < 32 ifTrue: [Character space] ifFalse: [each]].
stream := (WriteStream on: String new)
nextPutAll: 'class';
tab;
nextPutAll: string;
lf;
yourself.
flag := false.

[self updateCommand: stream contents , self requestString
onSuccessDo:
[classDefinitionPresenter view isModified: false.
flag := true]]
on: GsCompileError
do:
[:ex |
string := self handleClassCompileError: ex.
^self].
flag ifTrue: [self editSaveClassA]!

findClass
"
Array with: className with: dictionaryName with: catetory with: packageName.
Expand Down Expand Up @@ -4970,7 +4946,6 @@ createComponents!overrides!public! !
createSchematicWiring!create schemantic wiring!overrides!public! !
createSchematicWiringForClassHierarchyTabs!create schemantic wiring!public! !
currentMethodSource!menu handlers!public! !
editSaveClass!menu handlers!public! !
findClass!menu handlers!public! !
handleClassCompileError:!compiling!public! !
instanceClassTabs!accessing!private! !
Expand Down

0 comments on commit ac1aa41

Please sign in to comment.