2014r3 bug


on a simple projet, i add the module modOSXLion

the program compile and work on 2014r2.1 but doesn’t want compile on 2014r3


Undefined operator.

you can download simple example here

Your example doesn’t run for me on r2.1 or r3. It seems to be missing some code.

You cannot “Or” an enum directly like that. You’d have to first convert it to an Integer using CType, I suspect.

You also can’t add/subtract/etc them…basically, they’re no longer integers, even though you can give your enum a type of Integer.

I’ve had to convert a LOT of code that did this. :frowning:

Right. Those would probably be better off as constants.

Changing the code to something like this might work, but I don’t find it very readable:

[code] Dim fs As Integer = CType(NSApplicationPresentation.FullScreen, Integer)
Dim aht As Integer = CType(NSApplicationPresentation.AutoHideToolbar, Integer)
Dim ahm As Integer = CType(NSApplicationPresentation.AutoHideMenuBar, Integer)
Dim ahd As Integer = CType(NSApplicationPresentation.AutoHideDock, Integer)

self.SetPresentationOptions = CType(fs Or aht Or ahm Or ahd, NSApplicationPresentation)[/code]

If you want/need integer operations use integer variables and values.

Fancy integer operations is NOT what enums are for…