From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!j29g2000yqm.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Properties Date: Fri, 3 Dec 2010 05:53:00 -0800 (PST) Organization: http://groups.google.com Message-ID: <0c899bff-c580-4b9f-9c94-b9226c089cde@j29g2000yqm.googlegroups.com> References: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> <4pnv7nl4cdui$.1n28i7lqk4mek$.dlg@40tude.net> <1k7367gtebsgm$.18auo6u3nfg34.dlg@40tude.net> <1u5dftkqqi68c.10079qnqyyfwb$.dlg@40tude.net> <15tv4yga36dpi$.1hc09dlbgcmqe.dlg@40tude.net> <18768dde-5817-40b9-aaa1-03c620ad7187@i32g2000pri.googlegroups.com> <1sp30ekj4pmer$.1753nbz1zyzid$.dlg@40tude.net> <2a3219cb-5793-4e5b-97aa-036da124ccba@y31g2000vbt.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1291384380 27008 127.0.0.1 (3 Dec 2010 13:53:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 3 Dec 2010 13:53:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j29g2000yqm.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15775 Date: 2010-12-03T05:53:00-08:00 List-Id: On Dec 3, 5:43=A0am, "Randy Brukardt" wrote: > When it comes to GUI programming, this supposedly "good design principle" > often doesn't make any sense. > > For example, consider the series of SLED (Simple Little EDitor) examples = in > Claw. These show how a Notepad-like editor could be constructed using Cla= w. Yes. There are two points, however: 1. Text editors (in particular text widgets) are both sources and destinations of data. That is, they not only display something, they also control the content by allowing the user to interact with it and modify it. Thanks to this coupling of functionality (content control and rendering) it makes sense to delegate the data structure management to the same component as well. In this regard text widgets are self-contained. Unfortunately this reasoning has no applicability in a real-time oscilloscope display, where such coupling does not occur - data source is definitely separate from the rendering component so there is no justification for coupling data model with widgets. On the contrary, it makes perfect sense to decouple them - for starters, did I mention several displays showing the same signal, but with different filtering settings? 2. Your text-editing example has little relation to multitasking as a general GUI feature. Of course one can imagine, for example, a background spellchecker task or something in this area, but this is so particular to the text editing domain that is hardly a justification for requiring that the whole GUI framework must be task-safe. -- Maciej Sobczak * http://www.inspirel.com