<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Well, there needs to be *some* mechanism for communication from low-level code to the UI. A direct dependency is bad, obviously.</div><div><br></div><div>Juan's suggestion works for any long-running operation, without the need to code anything. That's great. But it wouldn't let us distinguish what the cause of it is - showing the read cursor or write cursor did that.</div><div><br></div><div>Maybe the two should be combined? For example, there could be a ResourceAccessProgressNotification that knew about read/write/network access. This combined with Juan's "watchdog" would let the UI indicate more specifically what the cause of the delay is.</div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; font-family: 'Lucida Grande'; font-size: 12px; "><div style="font-family: Helvetica; ">- Bert -</div></span></div></div><div><br></div><div>On 25.06.2013, at 08:52, Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">But can we agree that File should not bother with UI things, it's not it's business, be it by direct access to Cursor, or indirect access thru a UIManager?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/6/25 Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
On 25 June 2013 16:35, Nicolas Cellier<br>
<div class="im">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt; That reminds me the post from Travis Griggs, citing ideas from Vassili Bykov<br>
&gt;<br>
&gt; <a href="http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&amp;printTitle=Cursor_consider_showWhile:_[Harmful]&amp;entry=3432339015" target="_blank">http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&amp;printTitle=Cursor_consider_showWhile:_[Harmful]&amp;entry=3432339015</a><br>

&gt;<br>
&gt; And I think that Juan's implementation is clearly in this spirit, so +1<br>
<br>
</div>There's nothing wrong with Juan's code. It just doesn't have much to<br>
do with the problem that spawned this thread.<br>
<br>
The link is, however: Vassili and Travis are saying "remove Cursor<br>
showWhile:". And that _would_ solve my problem. Removing these senders<br>
would make Files no longer depend on Graphics.<br>
<br>
(Juan's suggestion would address the second half of the linked<br>
article. Again, it's great, and maybe we should port that to Trunk<br>
ASAP, but it's not what I was posting about.)<br>
<span class="HOEnZb"><font color="#888888"><br>
frank<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt; 2013/6/25 H. Hirzel &lt;<a href="mailto:hannes.hirzel@gmail.com">hannes.hirzel@gmail.com</a>&gt;<br>
&gt;<br>
&gt;&gt; On 6/25/13, David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt; wrote:<br>
&gt;&gt; &gt; On Tue, Jun 25, 2013 at 07:16:03AM -0300, Juan Vuletich (mail lists)<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; Quoting Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;...<br>
&gt;&gt; &gt;&gt; &gt;I realise that I'm advocating the removal of a host of Graphics<br>
&gt;&gt; &gt;&gt; &gt;dependencies only to replace them with ToolBuilder-Kernel<br>
&gt;&gt; &gt;&gt; &gt;dependencies. I'd prefer to not have the latter either, but it's a<br>
&gt;&gt; &gt;&gt; &gt;lesser of two evils.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;...<br>
&gt;&gt; &gt;&gt; &gt;frank<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; What about my suggestion? I mean, doesn't it deserve a comment?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Yes indeed it does. I have not been following this discussion closely,<br>
&gt;&gt; &gt; but<br>
&gt;&gt; &gt; I'll comment anyway :-)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Mon, Jun 24, 2013 at 10:28:31AM -0300, Juan Vuletich (mail lists)<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; I recently did something better fo Cuis. The idea is to let Morphic<br>
&gt;&gt; &gt;&gt; handle that. If Morphic frame rate drops below some threshold, show<br>
&gt;&gt; &gt;&gt; the wait cursor. This way, there are no 'bad' references to UI from<br>
&gt;&gt; &gt;&gt; non-UI code, and you only get the wait cursor if appropriate (for<br>
&gt;&gt; &gt;&gt; instance, not if the very same code is run on a forked process). It is<br>
&gt;&gt; &gt;&gt; trivial to add protocol to set the "wait cursor" to be used. This<br>
&gt;&gt; &gt;&gt; allowed me to clean a lot of methods.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; It is in update #1704 at <a href="https://github.com/jvuletich/Cuis" target="_blank">https://github.com/jvuletich/Cuis</a> .<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This sounds like like a really elegant approach, because it does not<br>
&gt;&gt; &gt; require advance knowledge that some operation is likely to take a long<br>
&gt;&gt; &gt; time, and it will do the right thing on both slow and fast hardware.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; It does however seem to depend on the Morphic update mechanism, so it<br>
&gt;&gt; &gt; may not translate well to other UI styles. (I look to MVC to keep us<br>
&gt;&gt; &gt; honest in these matters, but you can imagine a SeasideProject in<br>
&gt;&gt; &gt; addition<br>
&gt;&gt; &gt; to MorphicProject and MVCProject, and the same principle applies.)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Mon, Jun 24, 2013 at 09:12:08PM -0500, Chris Muller wrote:<br>
&gt;&gt; &gt;&gt; After more thought, I should rebut myself for sounding so harsh.<br>
&gt;&gt; &gt;&gt; Frank, are Cursor showWhile:, et al. the _sole_ cause of dependency on<br>
&gt;&gt; &gt;&gt; Graphics from many packages? &nbsp;If so, then I do understand the interest<br>
&gt;&gt; &gt;&gt; in wanting to soften those dependencies. &nbsp;If we're going to extend<br>
&gt;&gt; &gt;&gt; "UIManager" I think we should call it something generic to a UI that<br>
&gt;&gt; &gt;&gt; may not even support a cursor:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &nbsp; UIManager default indicateBusyWhile: [ ... ]<br>
&gt;&gt; &gt;&gt; &nbsp; UIManager default indicateReadingWhile: [ ... ]<br>
&gt;&gt; &gt;&gt; &nbsp; etc.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This sounds like a promising approach. It is easy to read and the intent<br>
&gt;&gt; &gt; is clear. It seems like it would provide a mechinism for using an<br>
&gt;&gt; &gt; optimal<br>
&gt;&gt; &gt; implementation for various types of projects. For example, an MVCProject<br>
&gt;&gt; &gt; might use the traditional "Cursor wait showWhile:" idiom, and a<br>
&gt;&gt; &gt; MorphicProject<br>
&gt;&gt; &gt; could use the new Cuis approach. Meanwhile if someone was (finally!)<br>
&gt;&gt; &gt; implementing SeasideProject, they could figure out an implementation<br>
&gt;&gt; &gt; that<br>
&gt;&gt; &gt; makes sense for a web app.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Dave<br>
&gt;&gt;<br>
&gt;&gt; + 1<br>
<br>
</div></div></blockquote></div><br></div>
<br></blockquote></div><br></body></html>