Tag Info

New answers tagged

9

I read a really good blog some time ago which discuss this issue (mentioned by Karl Bielefeldt), what it basically says is that it is very dangerous to try and make the UI kit thread safe, as it introduces possible deadlocks and depending on how it's implemented, race conditions into the framework. There is also a performance consideration. Not so much ...


19

Toward the end of his failed dream essay, Graham Hamilton (a major Java architect) mentions if developers "are to preserve the equivalence with an event queue model, they will need to follow various non-obvious rules," and having a visible and explicit event queue model "seems to help people to more reliably follow the model and thus construct GUI programs ...


15

Threadedness (in a shared memory model) is a property that tends to defy abstraction efforts. A simple example is a Set-type: while Contains(..) and Add(...) and Update(...) is a perfectly valid API in a single threaded scenario, the multi-threaded scenario needs a AddOrUpdate. The same thing applies to the UI - if you want to display a list of items with a ...


22

Because making the GUI lib thread safe is a massive headache and a bottleneck. Control flow in GUIs often goes in 2 directions from the event queue to root window to the gui widgets and from the application code to the widget propagated up to the root window. Devising a locking strategy that isn't lock the root window (will cause a lot of contention) is ...


1

It depends, of course, on the semantics that the user of your function would expect, based on the domain. With lat1, long1, lat2, long2 you’re essentially taking two points: lat1, long1 and lat2, long2. *-(lat1, long1) --+ | | | | +-- -* (lat2, long2) Whereas with lat1, lat2, long1, ...


6

When the HTTP request is completed, it will return some data, and the model gets updated by the responsible part of your system. Then raise an event which tells everyone who subscribed to it "new data has arrived", but do not pass the actual data in this event, only the relevant information for the subscribers which part of the model has changed. The event ...


0

I can't help but feel like you missed an obvious solution. Maybe I'm missing something here, but why doesn't your form implement all three interfaces? I don't see the need to try to keeping trances of the views inside of another view. public class DocumentationViewer : Form, IDocumentationViewerView, ITocPaneView, ISearchView { public ...



Top 50 recent answers are included