-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finished testing and last changes in Core Package
- Loading branch information
1 parent
6f76170
commit 2bbe667
Showing
7 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/outputFileDirectory.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
saveJson | ||
outputFileDirectory | ||
^ UIManager default saveFilenameRequest: 'Please, enter file name.' initialAnswer: 'test'. | ||
^ UIManager default saveFilenameRequest: 'Please, enter file name.' initialAnswer: 'animation'. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
...es/AnimationsEditor-Core.package/AnimationsEditor.class/instance/writeJsonToFile.with..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
saveJson | ||
writeJsonToFile: aJsonString with: aDirectory | ||
| outputStream | | ||
aDirectory | ||
ifNotNil: [ | ||
outputStream := StandardFileStream newFileNamed: aDirectory, '.json'. | ||
aJsonString storeOn: outputStream | ||
] | ||
|
||
|
||
FileDirectory default forceNewFileNamed: aDirectory, '.json' do: [:stream | | ||
stream nextPutAll: aJsonString]. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/testWriteJsonToFile.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
saveJson | ||
testWriteJsonToFile | ||
| jsonString | | ||
| jsonString fileContent | | ||
|
||
jsonString := '{ "Test": { "id": "1"} }'. | ||
self animationsEditorInstance writeJsonToFile: jsonString with: 'test'. | ||
self assert: false. | ||
"read json using STON reader and compare. Delete Test file" | ||
fileContent := (FileStream fileNamed: 'test.json') contents. | ||
self assert: fileContent isEmpty not. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters