mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-28 12:28:21 +01:00
31 lines
557 B
Smalltalk
31 lines
557 B
Smalltalk
Class {
|
|
#name : #DiyaRootNode,
|
|
#superclass : #DiyaNode,
|
|
#classVars : [
|
|
'singleton'
|
|
],
|
|
#category : #'Diya-Graphics'
|
|
}
|
|
|
|
{ #category : #'instance creation' }
|
|
DiyaRootNode class >> new [
|
|
self error: 'Please use uniqueInstance'
|
|
]
|
|
|
|
{ #category : #'instance creation' }
|
|
DiyaRootNode class >> reset [
|
|
singleton := nil
|
|
]
|
|
|
|
{ #category : #'instance creation' }
|
|
DiyaRootNode class >> uniqueInstance [
|
|
singleton ifNil: [ singleton := super new].
|
|
^singleton
|
|
]
|
|
|
|
{ #category : #initialization }
|
|
DiyaRootNode >> initialize [
|
|
super initialize.
|
|
parent := self.
|
|
]
|