-
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.
- Loading branch information
Showing
10 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
...es/SimulationStudio-Sandbox.package/RestrictivePragmaticSandbox.class/README.md
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
I am a more restrictive version of the pragmatic sandbox. I explicitly disallow common headful operations that should typically not be done in headless environments. |
5 changes: 5 additions & 0 deletions
5
...Sandbox.package/RestrictivePragmaticSandbox.class/instance/doMorphOpenInWorld.context..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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pragmatic methods - Morph | ||
doMorphOpenInWorld: aMorph context: aContext | ||
<pragmaticClass: #Morph selector: #openInWorld> | ||
|
||
^ self pragmatic: aContext forbidden: 'Use #imageForm instead' |
5 changes: 5 additions & 0 deletions
5
...ox.package/RestrictivePragmaticSandbox.class/instance/doObjectInspect.perform.context..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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pragmatic methods - Object | ||
doObjectInspect: aMorph perform: selector context: aContext | ||
<pragmaticClass: #Object selectors: #(inspect explore)> | ||
|
||
^ self pragmatic: aContext forbidden: 'Use #longPrintString instead' |
6 changes: 6 additions & 0 deletions
6
...ckage/RestrictivePragmaticSandbox.class/instance/doToolSetBrowse.perform.args.context..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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pragmatic methods - ToolSet | ||
doToolSetBrowse: aToolSetClass perform: selector args: args context: aContext | ||
<pragmaticClass: #'ToolSet class'> | ||
|
||
self assert: (selector beginsWithAnyOf: #(browse open handle inspect)). | ||
^ self pragmatic: aContext forbidden: 'Don''t use ToolSet in headless context' |
5 changes: 5 additions & 0 deletions
5
...Studio-Sandbox.package/RestrictivePragmaticSandbox.class/instance/pragmatic.forbidden..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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
private | ||
pragmatic: aContext forbidden: messageText | ||
|
||
^ self nextSimulator context: aContext primitiveFailTokenFor: | ||
[self nextSimulator context: aContext activateOperationForbidden: messageText] |
4 changes: 4 additions & 0 deletions
4
...nStudio-Sandbox.package/RestrictivePragmaticSandbox.class/instance/pragmaticForbidden..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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
private | ||
pragmaticForbidden: aContext | ||
|
||
^ self pragmatic: aContext forbidden: 'Operation forbidden' |
9 changes: 9 additions & 0 deletions
9
.../SimulationStudio-Sandbox.package/RestrictivePragmaticSandbox.class/methodProperties.json
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"doMorphOpenInWorld:context:" : "ct 1/3/2025 01:32", | ||
"doObjectInspect:perform:context:" : "ct 1/3/2025 01:32", | ||
"doToolSetBrowse:perform:args:context:" : "ct 1/3/2025 01:35", | ||
"pragmatic:forbidden:" : "ct 1/3/2025 01:31", | ||
"pragmaticForbidden:" : "ct 1/3/2025 01:27" } } |
14 changes: 14 additions & 0 deletions
14
packages/SimulationStudio-Sandbox.package/RestrictivePragmaticSandbox.class/properties.json
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "SimulationStudio-Sandbox", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "ct 1/3/2025 02:22", | ||
"instvars" : [ | ||
], | ||
"name" : "RestrictivePragmaticSandbox", | ||
"pools" : [ | ||
], | ||
"super" : "PragmaticSandbox", | ||
"type" : "normal" } |