Explicit - Interface - Implementation?

Hello,

I am wondering, how does Oxygene - Island supports the way of explicit Interface implementation?

I couldnt see it in the document :open_mouth:

Would be greatful when someone could give me a hint :slight_smile:

–Shpend

Yes. same syntax as on .NET; implements IMyInterface.Member; (or implements IMyInterface to proxy the whole interface through a property/field)

First thanks for the answer, but could you provide a concrete Example, because nevermind of how I am writing this, it throws Compiler-error!

when I implement the property in the class, where should it be Positioned?

 property Aroma: TIntensity  read private write;

I tested every Scenario with implements and what you suggest but it always raises error, what am I doing wrong here? :confused:

 property Aroma: TIntensity  read private write; implements Interface.Member;

or

 property Aroma: TIntensity  read private write; implements Interface;
1 Like

And carlo, how am I able to implement then 2 equal Propertys from 2 different Interfaces?

here is what I have:

  property ImpactTime: THour  read ord(Aroma); implements ICoffein.ImpactTime;
  property ImpactTime: THour  read cooling_off_period; implements IHot.ImpactTime;

And I get the error within water: “Previous declaration was here…”

You ned to given them unique “local” names, e.g.:

property ImpactTime1: THour  read ord(Aroma); implements ICoffein.ImpactTime;
property ImpactTime2: THour  read cooling_off_period; implements IHot.ImpactTime;

Oh ok thanks!

1 Like