HRegistry.st
author Claus Gittinger <cg@exept.de>
Thu, 23 Nov 1995 15:23:19 +0100
changeset 624 f09ad5cf21d4
parent 615 e9d0e782206d
child 630 b785d23d7c5b
permissions -rw-r--r--
cannot access Objects classVars directly in nil-subclass
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
375
claus
parents:
diff changeset
     1
"
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents:
diff changeset
     3
	      All Rights Reserved
claus
parents:
diff changeset
     4
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    10
 hereby transferred.
claus
parents:
diff changeset
    11
"
claus
parents:
diff changeset
    12
claus
parents:
diff changeset
    13
Registry subclass:#HandleRegistry
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    14
	 instanceVariableNames:''
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    15
	 classVariableNames:''
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    16
	 poolDictionaries:''
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    17
	 category:'System-Support'
375
claus
parents:
diff changeset
    18
!
claus
parents:
diff changeset
    19
claus
parents:
diff changeset
    20
!HandleRegistry class methodsFor:'documentation'!
claus
parents:
diff changeset
    21
claus
parents:
diff changeset
    22
copyright
claus
parents:
diff changeset
    23
"
claus
parents:
diff changeset
    24
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents:
diff changeset
    25
	      All Rights Reserved
claus
parents:
diff changeset
    26
claus
parents:
diff changeset
    27
 This software is furnished under a license and may be used
claus
parents:
diff changeset
    28
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
    30
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
    31
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    32
 hereby transferred.
claus
parents:
diff changeset
    33
"
claus
parents:
diff changeset
    34
!
claus
parents:
diff changeset
    35
claus
parents:
diff changeset
    36
documentation
claus
parents:
diff changeset
    37
"
claus
parents:
diff changeset
    38
    HandleRegistries are like Registries, in that they watch for the death of
claus
parents:
diff changeset
    39
    a registered object. However, they send a self-change notification, passing the registered
claus
parents:
diff changeset
    40
    handle as argument, instead of creating a shallow copy and letting it do the finalization.
claus
parents:
diff changeset
    41
    Use Registry for objects which know themself how to clean up;
claus
parents:
diff changeset
    42
    use HandleRegistry, if someone else does the cleanup.
claus
parents:
diff changeset
    43
"
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    44
!
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    45
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    46
version
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    47
    ^ '$Header: /cvs/stx/stx/libbasic/Attic/HRegistry.st,v 1.5 1995-11-23 02:00:59 cg Exp $'
375
claus
parents:
diff changeset
    48
! !
claus
parents:
diff changeset
    49
claus
parents:
diff changeset
    50
!HandleRegistry methodsFor:'dispose handling'!
claus
parents:
diff changeset
    51
claus
parents:
diff changeset
    52
informDispose:someHandle
claus
parents:
diff changeset
    53
    self changed:#finalize with:someHandle from:self
claus
parents:
diff changeset
    54
! !
claus
parents:
diff changeset
    55
claus
parents:
diff changeset
    56
!HandleRegistry methodsFor:'redefined to block'!
claus
parents:
diff changeset
    57
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    58
register:anObject
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    59
    "not useful for HandleRegistry - use #register:as:"
375
claus
parents:
diff changeset
    60
claus
parents:
diff changeset
    61
    self shouldNotImplement
claus
parents:
diff changeset
    62
!
claus
parents:
diff changeset
    63
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    64
registerChange:anObject
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    65
    "not useful for HandleRegistry"
375
claus
parents:
diff changeset
    66
claus
parents:
diff changeset
    67
    self shouldNotImplement
claus
parents:
diff changeset
    68
! !
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    69