<div dir="ltr">But can we agree that File should not bother with UI things, it&#39;s not it&#39;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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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&#39;s implementation is clearly in this spirit, so +1<br>
<br>
</div>There&#39;s nothing wrong with Juan&#39;s code. It just doesn&#39;t have much to<br>
do with the problem that spawned this thread.<br>
<br>
The link is, however: Vassili and Travis are saying &quot;remove Cursor<br>
showWhile:&quot;. And that _would_ solve my problem. Removing these senders<br>
would make Files no longer depend on Graphics.<br>
<br>
(Juan&#39;s suggestion would address the second half of the linked<br>
article. Again, it&#39;s great, and maybe we should port that to Trunk<br>
ASAP, but it&#39;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&#39;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&#39;d prefer to not have the latter either, but it&#39;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&#39;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&#39;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 &#39;bad&#39; 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 &quot;wait cursor&quot; 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?  If so, then I do understand the interest<br>
&gt;&gt; &gt;&gt; in wanting to soften those dependencies.  If we&#39;re going to extend<br>
&gt;&gt; &gt;&gt; &quot;UIManager&quot; 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;   UIManager default indicateBusyWhile: [ ... ]<br>
&gt;&gt; &gt;&gt;   UIManager default indicateReadingWhile: [ ... ]<br>
&gt;&gt; &gt;&gt;   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 &quot;Cursor wait showWhile:&quot; 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>