H
Hendrik Maryns
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tegiri Nenashi schreef:
|> No. The graph looks like this:
|>
|> Window <-> Widget <- Data Manager
|
| Fair enough. Let's return to Mike's original claim then:
|
|> 1. G can be careful to unsubscribing when its parent window exits.
|> 2. G can subscribe via a WeakReference to itself.
|
|> 2 involves less bookkeeping, and so is more robust.
|
| The bookkeeping can be hidden in the widget cleanup procedure, can't
| it? Just make widget to be aware of the objects it lisens to. Joshua
| diagramm becomes
|
| Window <-> Widget <-> Data Manager
|
| So one needs to enhance two methods:
| 1. The one that registers the widget as a listener.
| 2. The widget cleanup.
|
| Both are the GUI library methods, so whatever happens onside them is
| transparent to the end user! This can be done high enough in widget
| class hierarchy, of course, to avoid repeating it for every widget
| type.
Well, you’re completely ignoring Joshua’s argument:
|> 2 involves less bookkeeping, and so is more robust.
Your solution involves a lot of bookkeeping.
H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iEYEARECAAYFAkh3HWcACgkQe+7xMGD3itRbBACbBjdIF+x9eokUbxTTRTSOp+sM
iMwAnR0uq3NhGWRKuER4DdOmL35T35Ol
=rdWp
-----END PGP SIGNATURE-----
Hash: SHA1
Tegiri Nenashi schreef:
|> No. The graph looks like this:
|>
|> Window <-> Widget <- Data Manager
|
| Fair enough. Let's return to Mike's original claim then:
|
|> 1. G can be careful to unsubscribing when its parent window exits.
|> 2. G can subscribe via a WeakReference to itself.
|
|> 2 involves less bookkeeping, and so is more robust.
|
| The bookkeeping can be hidden in the widget cleanup procedure, can't
| it? Just make widget to be aware of the objects it lisens to. Joshua
| diagramm becomes
|
| Window <-> Widget <-> Data Manager
|
| So one needs to enhance two methods:
| 1. The one that registers the widget as a listener.
| 2. The widget cleanup.
|
| Both are the GUI library methods, so whatever happens onside them is
| transparent to the end user! This can be done high enough in widget
| class hierarchy, of course, to avoid repeating it for every widget
| type.
Well, you’re completely ignoring Joshua’s argument:
|> 2 involves less bookkeeping, and so is more robust.
Your solution involves a lot of bookkeeping.
H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iEYEARECAAYFAkh3HWcACgkQe+7xMGD3itRbBACbBjdIF+x9eokUbxTTRTSOp+sM
iMwAnR0uq3NhGWRKuER4DdOmL35T35Ol
=rdWp
-----END PGP SIGNATURE-----