Nope, same problem :'(
I think I'm getting a grasp of its nature though. Here's the thing: The application has plenty of widgets, and some of them are interdependent, so using #addDependantWidget: would result in crossed-references and infinite loops, which is why I'm using announcements to decouple widgets.
My announcer is held by a custom session class, and when a widget needs another widget to perform some task, it fires a new announcement that is caught by the second widget. The problem happens when the announcement is captured, specifically when the receiving widget tries to mark itself dirty.
My guess is that, on initialization, the widget knows who its context is, but when the announcement is caught, self context is not the widget's context anymore, so: MyWidget >> initialize
(...) self session announcer on: SomeAnnouncement do: [:ann | self doWhateverYouHaveToDo. self markDirty ] " ← self markDirty eventually resolves to self context, which is nil "
Should I set up an example that triggers this problem with the ILCounter so you can debug it in your machine? Cheers, 2011/7/8 Bernat Romagosa <[hidden email]> Hi Nico, -- Bernat Romagosa. |
Hi,
Here's a little test that triggers the problem, just click on "Test me" in the counter widget example, this will launch an announcement that's gonna be intercepted by the counter widget and fire a debugger. Notice that it happens when trying to markDirty the counter widget.
We're closing in! :) Cheers,
2011/7/8 Bernat Romagosa <[hidden email]> Nope, same problem :'( -- Bernat Romagosa. ILIssueTestWidget.zip (5K) Download Attachment |
Free forum by Nabble | Edit this page |