We have a class KMUntypeableSingleKeyCombination this is used for key kombinations with tab arrow backspace .... Ctrl+TAB a short cut like Character space shift asKeyCombination looks like 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 <[hidden email]> 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 ? nicolai 2014-12-08 15:05 GMT+01:00 Guillermo Polito <[hidden email]>:
|
> On 19 Feb 2015, at 10:19, Nicolai Hess <[hidden email]> 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) break circular reference for keymappings thanks in advance 2015-02-20 9:26 GMT+01:00 Marcus Denker <[hidden email]>:
|
2015-05-15 9:55 GMT+02:00 Nicolai Hess <[hidden email]>:
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-05-18 21:28 GMT+02:00 Nicolai Hess <[hidden email]>:
anyone? |
In reply to this post by Nicolai Hess
Hi Nicolai,
On Mon, May 18, 2015 at 12:28 PM, Nicolai Hess <[hidden email]> wrote:
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.
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 :
|
In reply to this post by Nicolai Hess
Can anyone help me with this. I need a way to break the circular references.
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 |
In reply to this post by Nicolai Hess
For now could not we use
when: send: to: instead of a block in key registration? Stef |
In reply to this post by Eliot Miranda-2
2015-05-30 2:20 GMT+02:00 Eliot Miranda <[hidden email]>:
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.
|
In reply to this post by stepharo
2015-05-30 9:49 GMT+02:00 stepharo <[hidden email]>: For now could not we use I will check. Thank you for your response.
|
2015-05-30 10:53 GMT+02:00 Nicolai Hess <[hidden email]>:
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
|
Administrator
|
If Spur will be ready for the next release, why don't we just wait...
Cheers,
Sean |
2015-05-30 16:01 GMT+02:00 Sean P. DeNigris <[hidden email]>: Nicolai Hess wrote 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)
|
In reply to this post by Nicolai Hess
On Sat, May 30, 2015 at 8:20 AM, Nicolai Hess <[hidden email]> wrote:
Yes, they're called ephemerons. Read the Wikipedia page and the paper. They explain things well. http://en.wikipedia.org/wiki/Ephemeron
best,
Eliot |
2015-06-01 22:06 GMT+02:00 Eliot Miranda <[hidden email]>:
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.
|
Free forum by Nabble | Edit this page |