Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifies WAServerManager to support subclasses to be defined as default #1344

Merged
merged 2 commits into from
Mar 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
configuring
beDefault
"Set an instance of receiver to be the default Server Manager."

self setDefault: self new
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
accessing
default
default contents ifNil: [ default contents: self new ].
^ default contents

self initializeDefaultValueHolder.
jbrichau marked this conversation as resolved.
Show resolved Hide resolved
Default contents ifNil: [ Default contents: self new ].
^ Default contents
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class initialization
initializeDefaultValueHolder
default isNil ifTrue: [
default := GRPlatform current newTransientValueHolder ]
Default isNil ifTrue: [
Default := GRPlatform current newTransientValueHolder ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
configuring
setDefault: aWAServerManager
"Private - Sets aWAServerManager as the default instance of receiver."

self initializeDefaultValueHolder.
Default contents: aWAServerManager.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"commentStamp" : "TorstenBergmann 9/18/2021 23:06",
"super" : "WAObject",
"category" : "Seaside-Core-Server",
"classinstvars" : [
"default"
],
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"classvars" : [
"Default"
],
"instvars" : [
"adaptors"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tests
testBeDefault

| previous |
previous := WAServerManager default.
[
WATestServerManager beDefault.
self
assert: WAServerManager default class
equals: WATestServerManager
] ensure: [
WAServerManager setDefault: previous
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tests
testSetDefault

| previous |
previous := WAServerManager default.
[
WAServerManager setDefault: WATestServerManager new.
self
assert: WAServerManager default class
equals: WATestServerManager
] ensure: [
WAServerManager setDefault: previous
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I am a server manager used as an alternative of the WAServerManager, because some Smalltalk dialects have subclasses of WAServerManager.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "EstebanMaringolo 9/13/2022 16:08",
"super" : "WAServerManager",
"category" : "Seaside-Tests-Core-Server",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WATestServerManager",
"type" : "normal"
}