|
I see your point. I guess I implemented it a bit broadly, and that
some receivers of the same announcement may want rate limiting and
while others do not. However I am working with the Glamour-Roassal
framework, which predefines the use of announcements as... (#update:
Announcement on: myAnnouncer) and
it seemed easier to plug in a modified Announcer than to dig into the
framework code. By the time my layout code is reached,
the framework has already discarded the previous view and handed me a
blank one, so I had presumed that delaying the view creation and
layouting would flicker the display - but I should test
that properly. Also I would prefer to keep the complexity of rate limiting announcement handling hidden from that part of my application code. Perhaps I could define it at the receiver per subscription as ( Announcer>>subscribe: anAnnouncement noFasterThan: 100 do: [ something ] ) - but digging in there quickly gets above my current competency. Thanks for you thoughts. I will consider it further. cheers -Ben Fernando Olivero wrote: Hi, instead of subclassing Announcement, i would add the limiting logic to the one receiving the announcements. To keep everything but the view agnostic of this "optimization" detail. Because all you need is to prevent the UI from rendering in intervals less then 100ms. The announcement doesn't care wether the UI should redraw or not.Fernando On Sun, Jan 20, 2013 at 11:16 AM, Stéphane Ducasse < [email protected]> wrote: |
- [Pharo-project] RateLimitingAnnouncer Ben Coman
- Re: [Pharo-project] RateLimitingAnnouncer Stéphane Ducasse
- Re: [Pharo-project] RateLimitingAnnouncer Fernando Olivero
- Re: [Pharo-project] RateLimitingAnnouncer Ben Coman
