We have a class KMUntypeableSingleKeyCombination this is used for key kombinations with tab arrow backspace .... This is useful for printing key kombinations like Ctrl+TAB "space" does not use the KMUntypeableSingleKeyCombination class, therefore a short cut like Character space shift asKeyCombination looks like " Shift + " shouldn't space use this class? And I find the name a little bit misleading, what is a untypeable key? The key is typeable, otherwise we couldn't use it. Renaming the class to KMUnprintableSingleKeyCombination isn't better, because we can print this keycombination. nicolai
Le 7/12/14 12:21, Nicolai Hess a écrit :
We have a class KMUntypeableSingleKeyCombination this is used for key kombinations with tab arrow backspace ....
This is useful for printing key kombinations like Ctrl+TAB
"space" does not use the KMUntypeableSingleKeyCombination class, therefore a short cut like Character space shift asKeyCombination looks like " Shift + "
shouldn't space use this class? And I find the name a little bit misleading, what is a untypeable key? The key is typeable, otherwise we couldn't use it. Renaming the class to KMUnprintableSingleKeyCombination isn't better, because we can print this keycombination.
+1
nicolai
I think (I just think because I didn't write that class ^^) that class is the result of an unfinished refactor... On Mon, Dec 8, 2014 at 2:36 PM, stepharo <stepharo@free.fr> wrote:
Le 7/12/14 12:21, Nicolai Hess a écrit :
We have a class KMUntypeableSingleKeyCombination
this is used for key kombinations with tab arrow backspace ....
This is useful for printing key kombinations like Ctrl+TAB
"space" does not use the KMUntypeableSingleKeyCombination class, therefore a short cut like Character space shift asKeyCombination looks like " Shift + "
shouldn't space use this class? And I find the name a little bit misleading, what is a untypeable key? The key is typeable, otherwise we couldn't use it. Renaming the class to KMUnprintableSingleKeyCombination isn't better, because we can print this keycombination.
+1
nicolai
Fogbugz issue 14936 and slice in inbox After loading this slice, there are still many references to the (now) obsolete class KMUntypeableSingleKeyCombination. I tried to remove these references with the following code : NECPreferences popupShowWithShortcut: nil. KMSingleKeyCombination reset. KMSpecialCharSingleKeyCombination reset. KMRepository reset. But they arent removed. Anyone knows how to re-init all users of KMUntypeableSingleKeyCombination ? nicolai 2014-12-08 15:05 GMT+01:00 Guillermo Polito <guillermopolito@gmail.com>:
I think (I just think because I didn't write that class ^^) that class is the result of an unfinished refactor...
On Mon, Dec 8, 2014 at 2:36 PM, stepharo <stepharo@free.fr> wrote:
Le 7/12/14 12:21, Nicolai Hess a écrit :
We have a class KMUntypeableSingleKeyCombination
this is used for key kombinations with tab arrow backspace ....
This is useful for printing key kombinations like Ctrl+TAB
"space" does not use the KMUntypeableSingleKeyCombination class, therefore a short cut like Character space shift asKeyCombination looks like " Shift + "
shouldn't space use this class? And I find the name a little bit misleading, what is a untypeable key? The key is typeable, otherwise we couldn't use it. Renaming the class to KMUnprintableSingleKeyCombination isn't better, because we can print this keycombination.
+1
nicolai
On 19 Feb 2015, at 10:19, Nicolai Hess <nicolaihess@web.de> wrote:
Fogbugz issue 14936 and slice in inbox
After loading this slice, there are still many references to the (now) obsolete class KMUntypeableSingleKeyCombination. I tried to remove these references with the following code :
NECPreferences popupShowWithShortcut: nil. KMSingleKeyCombination reset. KMSpecialCharSingleKeyCombination reset. KMRepository reset.
But they arent removed.
Anyone knows how to re-init all users of KMUntypeableSingleKeyCombination ?
Very strange⦠using âexplore pointersâ with the old inspector, it shows lots of instances⦠I sadly have no time to now look deeper, but the pointer explorer should be a way to find who holds onto them⦠Marcus
We now use a new class for the space-key as key combination. fixed and included in 50045 (https://pharo.fogbugz.com/default.asp?15529) This way we don't end up with hundreds of obsolete class instances. But the problem with circular references still exist. 15535 <https://pharo.fogbugz.com/default.asp?15535> break circular reference for keymappings I could need some help here, any idea how to work with the key mapping registration without holding (or how to release) strong references? thanks in advance nicolai 2015-02-20 9:26 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 19 Feb 2015, at 10:19, Nicolai Hess <nicolaihess@web.de> wrote:
Fogbugz issue 14936 and slice in inbox
After loading this slice, there are still many references to the (now) obsolete class KMUntypeableSingleKeyCombination. I tried to remove these references with the following code :
NECPreferences popupShowWithShortcut: nil. KMSingleKeyCombination reset. KMSpecialCharSingleKeyCombination reset. KMRepository reset.
But they arent removed.
Anyone knows how to re-init all users of KMUntypeableSingleKeyCombination ?
Very strange⦠using âexplore pointersâ with the old inspector, it shows lots of instances⦠I sadly have no time to now look deeper, but the pointer explorer should be a way to find who holds onto themâ¦
Marcus
2015-05-15 9:55 GMT+02:00 Nicolai Hess <nicolaihess@web.de>:
We now use a new class for the space-key as key combination. fixed and included in 50045 (https://pharo.fogbugz.com/default.asp?15529) This way we don't end up with hundreds of obsolete class instances.
But the problem with circular references still exist. 15535 <https://pharo.fogbugz.com/default.asp?15535> break circular reference for keymappings
I could need some help here, any idea how to work with the key mapping registration without holding (or how to release) strong references?
thanks in advance nicolai
Can anyone help me with this. I need a way to break the circular references. a class is referenced by its compiled method the compiled method is referenced by the method context the method context is reference by a block context (the keymapping action) the block context is referenced by the registration item the registration item is referenced by the pragma registration builder the builder is reference by the method context (it is the method argument) and here the circle closes.
2015-02-20 9:26 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 19 Feb 2015, at 10:19, Nicolai Hess <nicolaihess@web.de> wrote:
Fogbugz issue 14936 and slice in inbox
After loading this slice, there are still many references to the (now) obsolete class KMUntypeableSingleKeyCombination. I tried to remove these references with the following code :
NECPreferences popupShowWithShortcut: nil. KMSingleKeyCombination reset. KMSpecialCharSingleKeyCombination reset. KMRepository reset.
But they arent removed.
Anyone knows how to re-init all users of KMUntypeableSingleKeyCombination ?
Very strange⦠using âexplore pointersâ with the old inspector, it shows lots of instances⦠I sadly have no time to now look deeper, but the pointer explorer should be a way to find who holds onto themâ¦
Marcus
2015-05-18 21:28 GMT+02:00 Nicolai Hess <nicolaihess@web.de>:
2015-05-15 9:55 GMT+02:00 Nicolai Hess <nicolaihess@web.de>:
We now use a new class for the space-key as key combination. fixed and included in 50045 (https://pharo.fogbugz.com/default.asp?15529) This way we don't end up with hundreds of obsolete class instances.
But the problem with circular references still exist. 15535 <https://pharo.fogbugz.com/default.asp?15535> break circular reference for keymappings
I could need some help here, any idea how to work with the key mapping registration without holding (or how to release) strong references?
thanks in advance nicolai
Can anyone help me with this. I need a way to break the circular references.
a class is referenced by its compiled method the compiled method is referenced by the method context the method context is reference by a block context (the keymapping action) the block context is referenced by the registration item the registration item is referenced by the pragma registration builder the builder is reference by the method context (it is the method argument) and here the circle closes.
anyone?
Can anyone help me with this. I need a way to break the circular references.
a class is referenced by its compiled method the compiled method is referenced by the method context the method context is reference by a block context (the keymapping action) the block context is referenced by the registration item the registration item is referenced by the pragma registration builder the builder is reference by the method context (it is the method argument) and here the circle closes.
anyone?
We did the same analysis when we were chasing memory leaks in 30. And this is why we favored when: send: to: instead of when:do: This is why igor hacked a ephemeron support. Now the right solution is nearly there: Spur
For now could not we use when: send: to: instead of a block in key registration? Stef
2015-05-30 10:53 GMT+02:00 Nicolai Hess <nicolaihess@web.de>:
2015-05-30 9:49 GMT+02:00 stepharo <stepharo@free.fr>:
For now could not we use
when: send: to: instead of a block in key registration?
I will check.
That are many many senders. And I don't fully understand what to change. For example, a keymapping registration like (aBuilder shortcut: #browseIt) category: #SmalltalkEditor default: PharoShortcuts current browseShortcut do: [ :morph | morph browseIt ]. how to define it without the block? (aBuilder shortcut: #browseIt) category: #SmalltalkEditor default: PharoShortcuts current browseShortcut send: #browseIt to: ?what
Thank you for your response.
Stef
Nicolai Hess wrote
I don't fully understand what to change.
If Spur will be ready for the next release, why don't we just wait... ----- Cheers, Sean -- View this message in context: http://forum.world.st/untypeable-key-combination-tp4794607p4829511.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
2015-05-30 16:01 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com>:
Nicolai Hess wrote
I don't fully understand what to change.
If Spur will be ready for the next release, why don't we just wait...
I would like to better understand what is the problem and I am sure there is some kind of software pattern to prevent this circular reference situation.
----- Cheers, Sean -- View this message in context: http://forum.world.st/untypeable-key-combination-tp4794607p4829511.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 30 May 2015, at 5:20 , Nicolai Hess <nicolaihess@web.de> wrote:
2015-05-30 16:01 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com <mailto:sean@clipperadams.com>>: Nicolai Hess wrote
I don't fully understand what to change.
If Spur will be ready for the next release, why don't we just wait...
I would like to better understand what is the problem and I am sure there is some kind of software pattern to prevent this circular reference situation.
A block usually references its outer context.* The default subscriber of a block is the object that defines it. Thus, if added to a Weak SubscriptionDictionary, the value/block (which is held strongly) references the key/subscriber (held weakly), and it never gets garbage collected. While the big selling point of ephemerons is to get notifications when an object is *about* to be GC'd instead of after it has been GC'd (so instead of the executor being a shadow copy of an object, the executor can be the object itself), they also solves the above by disregarding any references to the key from the value when checking liveliness. Cheers, Henry * The exception being "clean" blocks that do not reference inst vars / temps declared outside the block (which aren't of much use for announcements)
On Sat, May 30, 2015 at 8:20 AM, Nicolai Hess <nicolaihess@web.de> wrote:
2015-05-30 16:01 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com>:
Nicolai Hess wrote
I don't fully understand what to change.
If Spur will be ready for the next release, why don't we just wait...
I would like to better understand what is the problem and I am sure there is some kind of software pattern to prevent this circular reference situation.
Yes, they're called ephemerons. Read the Wikipedia page and the paper. They explain things well. http://en.wikipedia.org/wiki/Ephemeron
----- Cheers, Sean -- View this message in context: http://forum.world.st/untypeable-key-combination-tp4794607p4829511.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- best, Eliot
2015-06-01 22:06 GMT+02:00 Eliot Miranda <eliot.miranda@gmail.com>:
On Sat, May 30, 2015 at 8:20 AM, Nicolai Hess <nicolaihess@web.de> wrote:
2015-05-30 16:01 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com>:
Nicolai Hess wrote
I don't fully understand what to change.
If Spur will be ready for the next release, why don't we just wait...
I would like to better understand what is the problem and I am sure there is some kind of software pattern to prevent this circular reference situation.
Yes, they're called ephemerons. Read the Wikipedia page and the paper. They explain things well. http://en.wikipedia.org/wiki/Ephemeron
Yes now I understand why ephemerons can solve this issue. But what I was thinking of is, maybe we don't need this circular reference for our keymapping registry, it looks like some the references only there because we need this information during building the keymap but not afterwards.
----- Cheers, Sean -- View this message in context: http://forum.world.st/untypeable-key-combination-tp4794607p4829511.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- best, Eliot
Now I think I solved the issue. At least, if you remove a class from the system that defined a keymapping, there is no reference to an obsolete class anymore. background: the keymap registration works in three steps: 1. collect methods with pragma <keymap> 2. build the registration items with one builder-instance (this builder collects the items too). 3. register all of the collected items. my change is at the third step, instead of working on the collection of the builder, I make a copy and remove all items from the builder. That way the builder does not hold a reference to the shortcut items after they went to the registry. nicolai 2015-06-01 22:16 GMT+02:00 Nicolai Hess <nicolaihess@web.de>:
2015-06-01 22:06 GMT+02:00 Eliot Miranda <eliot.miranda@gmail.com>:
On Sat, May 30, 2015 at 8:20 AM, Nicolai Hess <nicolaihess@web.de> wrote:
2015-05-30 16:01 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com>:
Nicolai Hess wrote
I don't fully understand what to change.
If Spur will be ready for the next release, why don't we just wait...
I would like to better understand what is the problem and I am sure there is some kind of software pattern to prevent this circular reference situation.
Yes, they're called ephemerons. Read the Wikipedia page and the paper. They explain things well. http://en.wikipedia.org/wiki/Ephemeron
Yes now I understand why ephemerons can solve this issue. But what I was thinking of is, maybe we don't need this circular reference for our keymapping registry, it looks like some the references only there because we need this information during building the keymap but not afterwards.
----- Cheers, Sean -- View this message in context: http://forum.world.st/untypeable-key-combination-tp4794607p4829511.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- best, Eliot
Hi Nicolai, On Mon, May 18, 2015 at 12:28 PM, Nicolai Hess <nicolaihess@web.de> wrote:
2015-05-15 9:55 GMT+02:00 Nicolai Hess <nicolaihess@web.de>:
We now use a new class for the space-key as key combination. fixed and included in 50045 (https://pharo.fogbugz.com/default.asp?15529) This way we don't end up with hundreds of obsolete class instances.
But the problem with circular references still exist. 15535 <https://pharo.fogbugz.com/default.asp?15535> break circular reference for keymappings
I could need some help here, any idea how to work with the key mapping registration without holding (or how to release) strong references?
thanks in advance nicolai
Can anyone help me with this. I need a way to break the circular references.
a class is referenced by its compiled method the compiled method is referenced by the method context the method context is reference by a block context (the keymapping action) the block context is referenced by the registration item the registration item is referenced by the pragma registration builder the builder is reference by the method context (it is the method argument) and here the circle closes.
Are there any dictionaries in the above? If there are then we can probably use ephemerons to break the circularity. This will require Spur and Pharo 5 or ^ (which ever is going to be based on Spur; I can't remember which). This may seem like a ways off but it isn't.
2015-02-20 9:26 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 19 Feb 2015, at 10:19, Nicolai Hess <nicolaihess@web.de> wrote:
Fogbugz issue 14936 and slice in inbox
After loading this slice, there are still many references to the (now) obsolete class KMUntypeableSingleKeyCombination. I tried to remove these references with the following code :
NECPreferences popupShowWithShortcut: nil. KMSingleKeyCombination reset. KMSpecialCharSingleKeyCombination reset. KMRepository reset.
But they arent removed.
Anyone knows how to re-init all users of KMUntypeableSingleKeyCombination ?
Very strange⦠using âexplore pointersâ with the old inspector, it shows lots of instances⦠I sadly have no time to now look deeper, but the pointer explorer should be a way to find who holds onto themâ¦
Marcus
-- best, Eliot
Definitively ephemerons will help to solve that nicely. I cannot wait for Spur. Stef Le 30/5/15 02:20, Eliot Miranda a écrit :
Hi Nicolai,
On Mon, May 18, 2015 at 12:28 PM, Nicolai Hess <nicolaihess@web.de <mailto:nicolaihess@web.de>> wrote:
2015-05-15 9:55 GMT+02:00 Nicolai Hess <nicolaihess@web.de <mailto:nicolaihess@web.de>>:
We now use a new class for the space-key as key combination. fixed and included in 50045 (https://pharo.fogbugz.com/default.asp?15529) This way we don't end up with hundreds of obsolete class instances.
But the problem with circular references still exist. 15535 <https://pharo.fogbugz.com/default.asp?15535> break circular reference for keymappings
I could need some help here, any idea how to work with the key mapping registration without holding (or how to release) strong references?
thanks in advance nicolai
Can anyone help me with this. I need a way to break the circular references.
a class is referenced by its compiled method the compiled method is referenced by the method context the method context is reference by a block context (the keymapping action) the block context is referenced by the registration item the registration item is referenced by the pragma registration builder the builder is reference by the method context (it is the method argument) and here the circle closes.
Are there any dictionaries in the above? If there are then we can probably use ephemerons to break the circularity. This will require Spur and Pharo 5 or ^ (which ever is going to be based on Spur; I can't remember which). This may seem like a ways off but it isn't.
2015-02-20 9:26 GMT+01:00 Marcus Denker <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr>>:
> On 19 Feb 2015, at 10:19, Nicolai Hess <nicolaihess@web.de <mailto:nicolaihess@web.de>> wrote: > > Fogbugz issue 14936 > and slice in inbox > > After loading this slice, there are still many references to the (now) obsolete class KMUntypeableSingleKeyCombination. > I tried to remove these references with the following code : > > NECPreferences popupShowWithShortcut: nil. > KMSingleKeyCombination reset. > KMSpecialCharSingleKeyCombination reset. > KMRepository reset. > > > But they arent removed. > > Anyone knows how to re-init all users of KMUntypeableSingleKeyCombination ? > >
Very strange⦠using âexplore pointersâ with the old inspector, it shows lots of instances⦠I sadly have no time to now look deeper, but the pointer explorer should be a way to find who holds onto themâ¦
Marcus
-- best, Eliot
2015-05-30 2:20 GMT+02:00 Eliot Miranda <eliot.miranda@gmail.com>:
Hi Nicolai,
On Mon, May 18, 2015 at 12:28 PM, Nicolai Hess <nicolaihess@web.de> wrote:
2015-05-15 9:55 GMT+02:00 Nicolai Hess <nicolaihess@web.de>:
We now use a new class for the space-key as key combination. fixed and included in 50045 (https://pharo.fogbugz.com/default.asp?15529) This way we don't end up with hundreds of obsolete class instances.
But the problem with circular references still exist. 15535 <https://pharo.fogbugz.com/default.asp?15535> break circular reference for keymappings
I could need some help here, any idea how to work with the key mapping registration without holding (or how to release) strong references?
thanks in advance nicolai
Can anyone help me with this. I need a way to break the circular references.
a class is referenced by its compiled method the compiled method is referenced by the method context the method context is reference by a block context (the keymapping action) the block context is referenced by the registration item the registration item is referenced by the pragma registration builder the builder is reference by the method context (it is the method argument) and here the circle closes.
Are there any dictionaries in the above? If there are then we can probably use ephemerons to break the circularity. This will require Spur and Pharo 5 or ^ (which ever is going to be based on Spur; I can't remember which). This may seem like a ways off but it isn't.
Hi Eliot, yes, we use an OrderedCollection. I hoped one of our weak collections can solve this issue. But I don't know exaclty how.
2015-02-20 9:26 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 19 Feb 2015, at 10:19, Nicolai Hess <nicolaihess@web.de> wrote:
Fogbugz issue 14936 and slice in inbox
After loading this slice, there are still many references to the (now) obsolete class KMUntypeableSingleKeyCombination. I tried to remove these references with the following code :
NECPreferences popupShowWithShortcut: nil. KMSingleKeyCombination reset. KMSpecialCharSingleKeyCombination reset. KMRepository reset.
But they arent removed.
Anyone knows how to re-init all users of KMUntypeableSingleKeyCombination ?
Very strange⦠using âexplore pointersâ with the old inspector, it shows lots of instances⦠I sadly have no time to now look deeper, but the pointer explorer should be a way to find who holds onto themâ¦
Marcus
-- best, Eliot
participants (7)
-
Eliot Miranda -
Guillermo Polito -
Henrik Johansen -
Marcus Denker -
Nicolai Hess -
Sean P. DeNigris -
stepharo