Dynamically Creating 'Enums' #6
Unanswered
aarondglover
asked this question in
Q&A
Replies: 1 comment
-
|
Hi @aarondglover, I suggest you try it, and let me know if you faced any problems. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This library looks awesome and I'm hooked on Bitwise for permissions etc. The issue of exceeding 64 is annoying to overcome so I am interested in applying this to my project. Thumbs up to the author 👍
I should not be lazy and just prototype it... But.... I am lazy so I figured I'd ask and maybe it will help someone else too
My question is whether an Infinite Enum could be dynamically generated at run time?
Imagine creating an app which has the ability to add dynamic roles. Could an infiniteEnum/flag be created... Generate and store that unique I'd against the role.
Then when I assign that dynamic role to a user, get the uniqueId, convert it back - then assign that enum to a user's set of permissions using bitwise... Then generate and persist a new UniqueId.
Beta Was this translation helpful? Give feedback.
All reactions