<br><br><div class="gmail_quote">On Wed, Mar 2, 2011 at 1:45 PM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@angband.za.org">frank.shearar@angband.za.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 2010/09/06 02:00, Eliot Miranda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
     while all these cool new browsers are great I get on well with the<br>
standard browser and my multi-window hack around it.  But the<br>
multi-window hack shows up one major weakness with the default Browser,<br>
and that is it&#39;s use of list indices (systemCategoryListIndex<br>
classListIndex messageCategoryListIndex messageListIndex).  These should<br>
just be systemCategoryName, className, messageProtocol (categories are<br>
in System-Organization; classes have protocols) messageSelector.  If<br>
this happened the indices the browser has into the system would never<br>
become obsolete as does happen for example when one adds a class to a<br>
category, invalidating any classListIndex values into the same category,<br>
or systemCategoryListIndexes as happens often when the<br>
SystemOrganization changes on loading a package.  So if anyone is<br>
looking for a small useful project, someone who probably has RB chops,<br>
how about reimplementing Browser so that it is essentially unchanged<br>
except for the indexes being ripped out, buried and stomped on?<br>
</blockquote>
<br></div>
Browser already has methods like #selectedSystemCategoryName. Do these methods do what you want? (Never mind that internally they use the dreaded indices.)<br></blockquote><div><br></div><div>What I want is that internally the browser /not/ use indices, and instead use symbols for the selected category name, the selected class name, the selected method protocol name, and the selected selector.  The reason is of course that the indices become stale very quickly when the system is changed, either in other browsers or when packages are loaded/unloaded etc.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Lots of places simply check the systemCategoryListIndex just to see if something&#39;s selected; obviously, it&#39;s easy to just replace &quot;systemCategoryListIndex = 0&quot; with &quot;self selectedSystemCategoryName isNil&quot;<br>
</blockquote><div><br></div><div>Right.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
By far the biggest hurdle to easily mucking around (apart from the fun of breaking essential infrastructure) is the serious lack of tests.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If someone did this I&#39;d get round to using menu pragmas throughout and<br>
integrating the RB into the base Browser.<br>
</blockquote>
<br></div>
That&#39;s a very tasty carrot you&#39;re dangling there.<br></blockquote><div><br></div><div>I find that carrot delicious too :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
I&#39;ve started slowly, carefully, weeding out the index stuff: for now, I&#39;ve just started on some baby steps (Tools-fbs.300) towards a Grand Refactoring.<br></blockquote><div><br></div><div>Cool!  That&#39;s great to hear.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888">
<br>
frank<br>
<br>
</font></blockquote></div><br>