<div dir="ltr"><div>Hi,</div><div> packages that add menus can have a lot of repeated code to add them and remove them. </div><div> The attached .cs adds two messages to SystemWindow to avoid that duplicated code: registerAll: and unregisterAll: </div><div> With this messages, code that look like this: </div><div><br></div><div>initialize<br>BrowserWindow </div><div>   at: #systemCatListMenuSpec </div><div>   registerMenuAndShortcutsSpecProvider: (MessageSend receiver: self selector: #systemCatListMenuSpec).<br>   BrowserWindow </div><div>   at: #classListMenuSpec </div><div>   registerMenuAndShortcutsSpecProvider: (MessageSend receiver: self selector: #classListMenuSpec).<br>... and so on</div><div><br><div>unload<br>BrowserWindow </div><div>   at: #systemCatListMenuSpec </div><div>   unregisterMenuAndShortcutsSpecProvider: (MessageSend receiver: self selector: #systemCatListMenuSpec).<br>BrowserWindow </div><div>   at: #classListMenuSpec </div><div>   unregisterMenuAndShortcutsSpecProvider: (MessageSend receiver: self selector: #classListMenuSpec).<br>... and so on</div><br class="gmail-Apple-interchange-newline"></div><div>Now it looks like this:</div><div>initialize<br>   BrowserWindow registerAll: self browserWindowMenuSpecs.<br></div><div><div>unload<br>   BrowserWindow unregisterAll: self browserWindowMenuSpecs.<br></div><div>browserWindowMenuSpecs<br>   ^{  { #systemCatListMenuSpec. self systemCatListMenuSpecSend }.<br>       { #classListMenuSpec. self classListMenuSpecSend }}</div><div><br></div><div>Cheers!</div><div>Hernan.<br>      <br></div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div></div>