[Mono-osx] [MonoMac] Core Animation duplicate definitions
kjpou
kjpou at pt.lu
Sat Jan 15 02:44:26 EST 2011
Miguel
While merging my changes for coreanimation I found a couple of duplicate
definitions within coreanimation.cs and CADefs.cs
coreanimation.cs
[Field ("kCATransitionFade")]
NSString TransitionFade { get; }
[Field ("kCATransitionMoveIn")]
NSString TransitionMoveIn { get; }
[Field ("kCATransitionPush")]
NSString TransitionPush { get; }
[Field ("kCATransitionReveal")]
NSString TransitionReveal { get; }
[Field ("kCATransitionFromRight")]
NSString TransitionFromRight { get; }
[Field ("kCATransitionFromLeft")]
NSString TransitionFromLeft { get; }
[Field ("kCATransitionFromTop")]
NSString TransitionFromTop { get; }
[Field ("kCATransitionFromBottom")]
NSString TransitionFromBottom { get; }
CADefs.cs
partial class CATransition {
const string Fade = "fade";
const string MoveIn = "moveIn";
const string Push = "push";
const string Reveal = "reveal";
const string FromRight = "fromRight";
const string FromLeft = "fromLeft";
const string FromTop = "fromTop";
const string FromBottom = "fromBottom";
}
Which is the way that they are to be defined? [Field] or within the
CADefs class with const strings:
If you want them defined in the CADefs.cs class defined as constants
then they should be public so Intellisense has access to them.
I like the [Field] definition in case Apple decides to change them in
the future. Of course you may have reasons for defining them with
constants.
I did not create a patch to make them public but did in my maccore here
with success. Let me know which way and will create one.
Kenneth
More information about the Mono-osx
mailing list