Toolbox modifications--do you want them?

Topics: Enhancement Request
Oct 7, 2010 at 3:51 PM

Not sure who's in charge of the Toolbox. I have several enhancements that I showed at Southwest Fox 2009 that I've been meaning to contribute.

1) Using the native extension mechanism, add a Link type tool for holding hyperlinks.

2) Using the native extension mechanism, add the new Link type, as well as File and Text Scrap types to the context menu to make them easier to add.

3) Modify the Toolbox code so that you can create your own lists of dynamic file sets (the sets of file types used when specifying dynamic folders) by just adding to a table.

4) Using the native extension mechanism, add a menu item to let you handle moved class libraries that are already in the Toolbox. The issue here is that if you move a project, all the links to it in the Toolbox are ruined. This menu item lets you specify how to update the Toolbox data.

Please let me know if you want all or some of these.

Oct 7, 2010 at 5:04 PM

Am embarrassed to say that I don't even use Toolbox.  (sigh)

Oct 8, 2010 at 8:11 PM

I make use of Toolbox. Please collaborate with whomever's in charge of Toolbox (or create a new subproject - "ToolboxX" or similar - like BrowserX ) and add these features (as long as they're opt-in/out don't see why someone would have a problem with it). 

I've made a couple of changes to my toolbox, replacing Chr(9) characters with Chr(32) in tooltips and item's caption, making the item properties dialog resize-able (the default it's ridiculously small) so please take this under consideration for ToolBoxX (or whatever is going to be named).

Oct 8, 2010 at 8:56 PM

Hi Tamar,

I didn't use the Toolbox either until I saw your session at SW Fox. :)  Question for you: It seems that drag & drop is the primary mechanism for doing things in the Toolbox.  That makes sense, but I've been thinking about adding a category for my own build tools.  Would #1 make it possible to launch a form simply by clicking on an item, rather than dragging it?  Or maybe that is already possible in the standard Toolbox and I'm missing it? 

I'm not sure how modifications to VFP components are handled here.  I don't know if you should modify the code already in source control, or create a new separate project.  Doug & Rick should be able to offer suggestions.  They may ask you to be the project manager, but I can't think of a better choice. :)



Oct 8, 2010 at 8:59 PM

IS somebody in charge of the toolbox??

Oct 9, 2010 at 5:12 PM

@joelleach: i've made my tools available by a custom menu. Pretty archaic but works well. A category type for toolbox that will allow to execute a script by click would be awesome. I would drag my script to that category, the toobox would perform a syntax/compile checking the add the item. By rightclick i would be able to change/customize the script and caption/description and by click the script would run in a try/catch block. It could go further by allowing reuse / inheritance as i found out in my tools i often reuse some blocks of code. 

@Tamar: I will support you 100% if you take on this endeavor and i'll beta-test as much as my free time will allow. But please fork a new Toolbox project from the original keeping that one as it is (in xsource)

Oct 12, 2010 at 4:25 PM

Joel: Try adding a tool or form as a file item; not sure if that will work.

Edy: Most of my enhancements are simply data-driven, using the native extension mechanism, so no need to make a branch for those. The only one that requires recompiling the toolbox is the data-driven file sets list. Even there, I designed it so that if you don't have the table it's looking for, it uses the original code.

Oct 12, 2010 at 5:06 PM


That works, but you have to right-click on the item to run it (default is modify).  Probably good enough.  I had tried a script before, but that apparently only runs when dragging.



Oct 29, 2010 at 1:15 PM

I've had a work-around for running PRG files with a left-click since VFP8.
Setup the toolbox class and then manually adjust settings for each new PRG added to the toolbox.
It won't allow you to natively add this kind of handling, but you can adjust each file after you've added it to the toolbox.

1. Backup the original toolbax class library.

2. Add a new class to the toolbox class library based on the PRG handler class:
CREATE CLASS _rprgtool OF (HOME() + "Toolbox\_toolbox") AS _prgtool FROM (HOME() + "Toolbox\_toolbox")

3. Edit this class and in method OnDblClick, add:
*- Allow certain PRGS to run on single click.
IF THIS.AllowDropOnContainer

4. Add an entry for this new handler class in the Toolbox Type table:
USE (HOME() + "Toolbox\tooltype")
REPLACE uniqueid   WITH "RPRG", ;
        showtype   WITH "T", ;
        tooltype   WITH "Runnable Program", ;
        classname  WITH "_rprgtool", ;
        filetype   WITH "PRG", ;
        displayord WITH 21

5. Adjust settings for each PRG file added to your toolbox:
USE (HOME(7) + "toolbox")

For each entry, change:
Tooltypeid from PRG to RPRG
Tooltype from Program to Runnable Program
Classname from _prgtool to _rprgtool

6. Save and close the toolbox table. Next time you open the toolbox, you can run PRGs with a single click.