Skip to content

Commit

Permalink
Factor out subclass creation
Browse files Browse the repository at this point in the history
Factor out subclass creation and add Pharo 13 implementation.
  • Loading branch information
marschall committed Jul 10, 2024
1 parent aadb7a0 commit 305baf7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*Seaside-Pharo-Welcome
subclassOf: aSuperClass named: aNameSymbol categorized: aCategoryString
^ (aSuperClass respondsTo: #<<)
ifTrue: [
aSuperClass << aNameSymbol
package: aCategoryString;
install ]
ifFalse: [
super
subclassOf: aSuperClass
named: aNameSymbol
categorized: aCategoryString ]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #'Seaside-Pharo-Welcome'!
self packageOrganizer ensurePackage: #'Seaside-Pharo-Welcome' withTags: #()!
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*Seaside-Welcome
subclassOf: aSuperClass named: aNameSymbol categorized: aCategoryString
^ aSuperClass
subclass: aNameSymbol
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: aCategoryString
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ createComponent: componentName
self inform: '''', componentName, ''' is not a valid name for a component. Component names should begin with a letter. Please choose again.'.
^ nil ].

userComponent := WAComponent
subclass: componentName
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Seaside-User-Examples'.
userComponent := GRPlatform current
subclassOf: WAComponent
named: componentName
categorized: 'Seaside-User-Examples'.

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

0 comments on commit 305baf7

Please sign in to comment.