10.2A Method is not available. Why?

Posted by weihe on 09-Jun-2009 11:27

Hi,

I'm trying to implement a diagram from the Open Diagram project on codeplex: http://opendiagram.codeplex.com/

There is a class called "Model". The signature shown in VS.NET is this:


public class Shapes : Open.Diagramming.Collections.Elements<Shape>
    Member von Open.Diagramming

The collection Elements has the method "Add":

public override void Add(string key, Open.Diagramming.Shape value)
    Member von Open.Diagramming.Collections.Elements<Shape>

This method (and any other methods with the Collection "Elements") are not available in Progress, if I add the assemblys to my project.

Anything else is working.

I tried to add the same assembly to a new C# project, and the method Model.Shapes.Add() is available.

What's the problem here?

Thanks in advance!

PS. Here is my code (inspired by the .NET example )

define variable model as Open.Diagramming.Model.
model = diagram1:Model.
       
define variable tbl as Open.Diagramming.Table.
tbl = new Open.Diagramming.Table().
       
tbl:Location = new System.Drawing.PointF(100,100).

model:Shapes:Add(tbl). /* This raises an error */

All Replies

Posted by Admin on 09-Jun-2009 11:42

This

Open.Diagramming.Collections.Elements

indicates a static type. .NET static types are not usuable in 10.2A.

Posted by Admin on 09-Jun-2009 11:44

indicates a static type. .NET static types are not usuable in 10.2A.

It's too late already - a generic type, not a static type. But it does not help you either. It's not supported by the ABL.

If you can, create a C# assembly on your own where you work around the generics.

Sorry for the confusion.

Posted by weihe on 09-Jun-2009 11:52

Thanks for the answer.

Then I'm going to write a wrapper class for that.

I like additional work

Posted by Peter Judge on 09-Jun-2009 12:04

Thanks for the answer.

Then I'm going to write a wrapper class for that.

I like additional work

I hate to be the bearer of good news and deprive you of your additional work , but the 10.2B Beta program might be of some interest to you. From http://communities.progress.com/pcom/docs/DOC-101182

Generics provide the ability to instantiate and access a .NET Generic class form the ABL.

Alternatively, it looks like OpenDiagram is an open source product/project; you could ask for or provide a non-generic collection

-- peter

Posted by Admin on 09-Jun-2009 12:06

provide a non-generic collection


Sounds like even more work

This thread is closed