System.Drawing.Design.ToolboxService

Posted by Admin on 07-Jul-2009 03:42

Hi,

Does anyone have any experience of using this abstract class in the ABL.

I'm using the Data dynamics Active Reports designer component which also uses the data Dynamics Toolbox.

The problem is when trying to assign the Designer toolbox to be that of the Toolbox component e.g

designer1:Toolbox = toolbox1.

In this instance the designer1:Toolbox property is expecting System.Drawing.Design.IToolboxService which is an implementation.

It is System.Drawing.Design.ToolboxService which implements System.Drawing.Design.IToolboxService.

I am unsure as to how to proceed with this problem and any help would be greatly appreciated.

Thankyou.

All Replies

Posted by Peter Judge on 07-Jul-2009 07:49

Does anyone have any experience of using this abstract class in the ABL.

I'm using the Data dynamics Active Reports designer component which also uses the data Dynamics Toolbox.

The problem is when trying to assign the Designer toolbox to be that of the Toolbox component e.g

designer1:Toolbox = toolbox1.

In this instance the designer1:Toolbox property is expecting System.Drawing.Design.IToolboxService which is an implementation.

It is System.Drawing.Design.ToolboxService which implements System.Drawing.Design.IToolboxService.

I am unsure as to how to proceed with this problem and any help would be greatly appreciated.

Thankyou.

What are the types (ie definitions) of designer1 and toolbox1 ?

-- peter

Posted by Admin on 08-Jul-2009 02:52

Hi,

I think this is the information you asked for:

DataDynamics.ActiveReports.Design.Designer.

DataDynamics.ActiveReports.Design.ToolBox.ToolBox.

Mark.

Posted by Admin on 08-Jul-2009 02:57

Hi,

I think this is the information you asked for:

DataDynamics.ActiveReports.Design.Designer.

DataDynamics.ActiveReports.Design.ToolBox.ToolBox.

Mark.

Posted by Peter Judge on 08-Jul-2009 08:18

I think this is the information you asked for:

DataDynamics.ActiveReports.Design.Designer.

DataDynamics.ActiveReports.Design.ToolBox.ToolBox.

I can drop this control on a form just fine, and attach it to the designer. I've also checked that the ToolBox class does indeed implement IToolboxService.

This class belongs to the assemblies in DataDynamics.ActiveReports.ToolBoxClassLib.dll , which is in the samples directory (location depends on installer), and these assemblies are not registered in the GAC. You must copy this DLL into the directory used for the -assemblies parameter (this is typically the project's root directory) in order for OE to use them.

The above is the functional equivalent of the "adding a reference" bit reference in the Data Dynamics help (http://www.datadynamics.com/Help/ARNET3/ar3wlkAddingCodefortheEnd-UserReportDesigner.html).

-- peter

Posted by Admin on 09-Jul-2009 03:27

Hi,

Thanks for the reply.

Unfortunately it didn't make any difference.

The same problem still exists in the initialise components block and the .cls file will not compile:

THIS-OBJECT:designer1:Toolbox = ?.

Commenting this line out and manually assigning generates a compile error:

THIS-OBJECT:designer1:ToolBox = toolbox1.

Have I missed something really obvious here? :-)

Thanks,

Mark.

Posted by jquerijero on 23-Sep-2009 11:12

Try using a dummy System.Object.

Assign the toolbox1 to the dummy object.

Assign CAST(dummy, ....IToolboxService) to the designer1:Toolbox.

I think OE Architect still has some issues with casting derived class to base (and then cast the object back to derived class). Using System.Object probably by-passes the type checking.

This thread is closed