Skip to content

Commit 1378e9e

Browse files
committed
Factor out subclass creation
Factor out subclass creation and add Pharo 13 implementation.
1 parent a982e66 commit 1378e9e

File tree

5 files changed

+26
-10
lines changed

5 files changed

+26
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*Seaside-Pharo-Welcome
2+
subclassOf: aSuperClass named: aNameSymbol categorized: aCategoryString
3+
^ (aSuperClass respondsTo: #<<)
4+
ifTrue: [
5+
aSuperClass << aNameSymbol
6+
package: aCategoryString;
7+
install ]
8+
ifFalse: [
9+
super
10+
subclassOf: aSuperClass
11+
named: aNameSymbol
12+
categorized: aCategoryString ]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SystemOrganization addCategory: #'Seaside-Pharo-Welcome'!
1+
self packageOrganizer ensurePackage: #'Seaside-Pharo-Welcome' withTags: #()!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*Seaside-Welcome
2+
subclassOf: aSuperClass named: aNameSymbol categorized: aCategoryString
3+
^ aSuperClass
4+
subclass: aNameSymbol
5+
instanceVariableNames: ''
6+
classVariableNames: ''
7+
poolDictionaries: ''
8+
category: aCategoryString

Diff for: repository/Seaside-Welcome.package/WAWelcomeComponentCreator.class/instance/createComponent..st

+4-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ createComponent: componentName
99
self inform: '''', componentName, ''' is not a valid name for a component. Component names should begin with a letter. Please choose again.'.
1010
^ nil ].
1111

12-
userComponent := WAComponent
13-
subclass: componentName
14-
instanceVariableNames: ''
15-
classVariableNames: ''
16-
poolDictionaries: ''
17-
category: 'Seaside-User-Examples'.
12+
userComponent := GRPlatform current
13+
subclassOf: WAComponent
14+
named: componentName
15+
categorized: 'Seaside-User-Examples'.
1816

1917
userComponent isNil ifTrue: [
2018
self inform: 'A problem occurred creating ''', componentName, ''' component..'.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
SystemOrganization addCategory: #'Seaside-Welcome'!
2-
SystemOrganization addCategory: #'Seaside-Welcome-Base'!
3-
SystemOrganization addCategory: #'Seaside-Welcome-Examples'!
1+
self packageOrganizer ensurePackage: #'Seaside-Welcome' withTags: #(#Base #Examples)!

0 commit comments

Comments
 (0)