Dependency properties in Oxygene

Well, currently I’m on the latest Oxygene gamma and wanting to be able to do this. I wish Oxygene would bring it’s ease-of-use features to DPs the way it has to so many other things. Otherwise, it’s a giant pain. Granted, no worse than the pain that c# devs already go through every day. But I always want to find the “Better Way”. :smiley:

I think I’m just going to muddle through with the way above so I don’t have to keep asking for the assembly to be recompiled. Too many possible links in the chain that I might have to sit and wait on if you decide to do something timewasting like go to bed. :wink:

Well, I’m beginning to use more and more DPs. Can you build the assembly for the October release?

Hello,
here is the source code. I should add the XML comments, but it will be for a later stage.
Don’t forget to compile it again with each compiler installation. Othrewise, you will have an error message for each aspect use.
If you find a bug or something that could be improved, please tell me.
OrdinaSoft.Aspects.zip (8.6 KB)

Oh, excellent that you posted the source! That will make it even more helpful.

I posted a suggestion for them to make this a standard part of Oxygene:
http://talk.remobjects.com/t/request-add-support-for-wpf-dependencyproperty/3327/2

It appears there is a reference to a file (Properties\AssemblyInfo.pas) not included in the zip. I removed the reference and it compiled.

I then switched to my solution and added a cirrus reference to the DLL. i added OrdinaSoft.Aspects to the uses clause. Then I put this in my class:

[Aspect: DependencyPropertyAspect]
property Charge: Integer;

Upon compile, I get the error:
(E238) Exception while applying aspect “OrdinaSoft.Aspects.DependencyPropertyAspect”: Attribute does not implement IBaseAspect C:\Users\jpierce\Documents\Visual Studio 2012\Projects\DiceGen\DiceGen

I am using the October release of standalone Oxygene (VS Shell).

Any suggestions?

Hello,
each time I had this errori, it was because the aspect library was compiler with a different version of the compiler…
Can you check whether you referenced the good .dll file?

Huh. I rebuilt it again and this time didn’t have any problem. It’s always possible I somehow messed something up the first time but I thought I picked the right one.

Thanks for the help.