Adding things to the Main Palette

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding things to the Main Palette

Jerome Chan
Any hints on where I should look in order to add things to the main
palette (where the system transcript, view composer, workspace icons
are), tool bars and menu bars ? I'm tired of executing

TestRunner show.

everytime I want to run the SUnit tester.


Reply | Threaded
Open this post in threaded view
|

Re: Adding things to the Main Palette

Ian Bartholomew
Jerome,

"Jerome Chan" <[hidden email]> wrote in message
news:[hidden email]...
> Any hints on where I should look in order to add things to the main
> palette (where the system transcript, view composer, workspace icons
> are), tool bars and menu bars ? I'm tired of executing
>
> TestRunner show.
>
> everytime I want to run the SUnit tester.

It's all done in class methods belonging to your main Presenter.  Have a
look at the various #initialize, #uninitialize, #toolsFolderIcon and
#displayOn class methods that exist in subclasses of Presenter.

AXControlBrowser, Calculator and ProtocolBrowserShell give examples of
adding icons to the three available locations.

Adding an icon in this way automatically adds the tool to the "Tools" menu
bar option that appears for most (all?) of the development tools.

You are on your own with the toolbar though, you will have to add that
yourself. If you modify one of the existing toolbar resources,
Toolbar.Smalltalk tools is probably your best bet, then any development tool
that uses this toolbar section will automatically display your new tool as
well.

#registerTool / #unregisterTool are only needed, IIRC, when you want to have
an entry in the "Dolphin Options" tree for your application.

Ian


Reply | Threaded
Open this post in threaded view
|

Re: Adding things to the Main Palette

Steve Waring-2
In reply to this post by Jerome Chan
Hi Jerome,

> TestRunner show.

I got sick of that too. I ended up adding a couple of context menu commands
to the CHB class TreeView. This brings up a TestRunner (if one isnt open
already), and runs the tests of the local hierarchy of the selected
TestCase.

If you want to see how I did it (for SUnit 2.7), you can download a package
at;
http://www.chartexplorer.com/dolphin/Env/index.html

I have a new version for SUnit3, but I havnt uploaded it as yet. If you are
using v3, and want to test it out, email me at the mail address at the above
link, and I'll send it through.

Steve



"Jerome Chan" <[hidden email]> wrote in message
news:[hidden email]...
> Any hints on where I should look in order to add things to the main
> palette (where the system transcript, view composer, workspace icons
> are), tool bars and menu bars ? I'm tired of executing
>
> TestRunner show.
>
> everytime I want to run the SUnit tester.