Skip to content

Commit

Permalink
Clarify the advantages of the approach.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-fryatt committed Jul 5, 2022
1 parent 936a610 commit 1230959
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Chapters/ch05-does-order-matter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ PROChandle_pane_windows(q%)</code>

<p>If an application needs the Nested Wimp for some other reason, and will therefore not be able to run without it, then there&rsquo;s no harm in relying on the redraw optimisation in order to simplify the pane handling code. However, it&rsquo;s also worth remembering that the Nested Wimp will deal with many pane requirements &ndash; including those in this chapter &ndash; directly, with no need for any custom event handling; we&rsquo;ll see how this works in <reference id="chap-nest-wimp">the next chapter</reference>. The main thing that the Nested Wimp does not support is panes which fall outside the outline of the parent window, such as the side toolbox that we created in <reference id="chap-side-box"/>.</p>

<p>For applications which do not need the Nested Wimp for other reasons, and would otherwise work fine back to RISC&nbsp;OS&nbsp;3 or earlier, it seems a shame to restrict their compatibility for no good reason. Save for the situation when the window first opens, the more compatible solution is no less efficient than this optimised one: they both call <swi>Wimp_OpenWindow</swi> once for the main window and once for each pane.</p>
<p>For applications which do not need the Nested Wimp for other reasons, and would otherwise work fine back to RISC&nbsp;OS&nbsp;3 or earlier, it seems a shame to restrict their compatibility for no good reason. Save for the situation when the window first opens, the more compatible solution is no less efficient than this optimised one: they both call <swi>Wimp_OpenWindow</swi> once for the main window and once for each pane. The only real difference is in the complexity of the code itself, and how easy it is for developers to understand.</p>

<p>Which approach to use will be a decision for individual developers, based on their applications&rsquo;s requirements. If you do use the optimisation, though, it&rsquo;s a good idea to check for its presence in the <file>!Run</file> of the application using an <command>*RMEnsure</command>.</p>

Expand Down

0 comments on commit 1230959

Please sign in to comment.