and when i try to make it in my class. I’ve got a problem with operations.
I can make only operation = and !=
and can’t others like & ^ |
How can i make it work in 2020.1 gamma?
in newer vvvv gamma versions you don’t need to import the individual operations of a type, just check the “Forward All Nodes” checkbox… so just adding a forward of that enum type is enough. you will then have all the operations in the node browser.
why the type annotations with that enums doesn’t work is not clear to me… however, you can simply use any operation of that type to get a type anchor for the type inference.
this is not clear to me… did you open the solution explorer (CTRL+SHIFT+J) and dragged the enum type into the definitions of your document?
Hey!
I had a look at this and looks like my enum with [Flags] doesn’t have any issue.
I put that one into:
Here is another guess what could have gone wrong in your case:
That sounds not right. You shouldn’t try to turn an enum into a class.
Try to drag the whole enum type QueueFlags over and place it directly into your striped Definitions Patch. In your case it’s the entry ENUM QueueFlags, NOT it’s child entry Static Operations.
DO NOT create a class and DO NOT only drag the operations of the enum over.
The enum i messed around with:
[Flags]
public enum ItalianNumbers
{
Zero = 0,
Uno = 0b0001, // 1
Due = 0b0010, // 2
Quattro = 0b0100, // 4
Otto = 0b1000, // 8
Quindici = 0xF, // 15
Sedici = 0x10, // 16, 0b_0001_0000
TrentaDue = 32, // 0b_0010_0000
SessantaQuattro = 64, // 0b_0100_0000
CentoVentOtto = 128, // 0b_1000_0000
DueCentoCinquantaSei = 0x100, // 256, 0b__0000_0001__0000_0000 (still 16 more bits available. enum ist encoded as 32 bit int by default)
UnoODue = Uno | Due, // 0b0011 also known as 3
}