How to decorate classes, methods and properties with attribu

Posted by Gabriel Hautclocq on 13-Jun-2012 09:03

I have to use Progress Openedge Architect in my work, and I need to convert some C# code to ABL code (ABL is the language name). So I need to find how to decorate my classes, properties and methods with .NET attributes. I searched through this guide ( http://documentation.progress.com/output/OpenEdge102b/pdfs/dvngm/dvngm.pdf ) but there is no mention about decoration in the C# to ABL mapping section.

A simple C# example:

[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("9.75")]
public decimal POLICE {
  get {
    return ((decimal)(this["POLICE"]));
  }
  set {
    this["POLICE"] = value;
  }
}

Thanks for any help on this!

Kind regards,

Gabriel

All Replies

Posted by Admin on 13-Jun-2012 09:51

This is not supported out of the Box in the ABL.

You need to implement the ICustomTypeDescriptor Interface for that purpose. Have fun with that There are some details in the "Customizing the OpenEdge Architect Visual Designer" presentation available from http://blog.consultingwerk.de

Posted by Gabriel Hautclocq on 13-Jun-2012 10:21

Thank you for your answer.

I find it surprising that such a common .NET functionnality is missing from a language that works together with .NET. That limits a lot what the ABL can do.

I read your presentation and found your link to http://msdn.microsoft.com/en-us/library/f7tc90dz. However I fail to find how can I circumvent the ABL limitations about the missing Attribute support.

Do you have a sample that shows what is explained in the presentation?

Thank you for your time

Best regards,

Gabriel

Posted by Admin on 14-Jun-2012 01:11

Do you have a sample that shows what is explained in the presentation?

Hi Gabriel,

we have this implemented in our framework to enhance the developer experience and reduce errors. But I'm afraid it's nothing we can make open-source.

Contact me offline if you want to discuss more about this.

Posted by jquerijero on 09-Jul-2012 15:14

Just a side note;

By the look of your sample code, you are trying to port a class with indexing. I don't think it is supported by Progress ABL.

Posted by Wouter Dupré on 09-Jul-2012 15:16

Hi,

Thank you for your email. Currently I'm enjoying my summer vacation. I will return on July 30. During my absence I will have no access to email or phone. For urgent matters, please call our office, or contact Jiri De Jagere (jdejager@progress.com).

Kind regards,

Wouter

--

Wouter Dupré

Senior Solutions Consultant

Progress Software NV

A. Stocletlaan 202 B | B-2570 Duffel | Belgium

Office +32 (0) 15 30 77 00 | Mobile +32 (0) 478 50 00 49

This thread is closed