The limitation of enum

Complete overkill. Just put a one liner in your system requirements saying display must support more that 256 colours.

But only in VB, because this exists in VB:

[quote]Dim names = [Enum].GetNames(GetType(EggSizeEnum))
For Each name In names
Console.Write(name & " ")
Next[/quote]

But not in Xojo :frowning:

[quote=153093:@Brock Nash]But only in VB, because this exists in VB:
But not in Xojo :([/quote]
I know, big shame

You can

dim s as string = str(myClass.myEnum)

But what you want is not the string “value” but the NAME of the enumerated element
Thats quite different

[quote=153086:@Mike Charlesworth]Hey look markus:

If you have a set of unchanging values that are logically related to each other, you can define them together in an enumeration. This provides meaningful names for the enumeration and its members, which are easier to remember than their values. You can then use the enumeration members in many places in your code.

Public Enum InterfaceColors MistyRose = &HE1E4FF& SlateGray = &H908070& DodgerBlue = &HFF901E& DeepSkyBlue = &HFFBF00& SpringGreen = &H7FFF00& ForestGreen = &H228B22& Goldenrod = &H20A5DA& Firebrick = &H2222B2& End Enum

Straight from Microsofts VB site, but hey what do they know… Overkill.[/quote]

Not much.

If Xojo would support colours in enums then you would be right. As others have pointed out Xojo does not support it. Underneath it are integers. So if you do not have to restrict the input to “allowed values” then it is somewhat pointless.

You have a “colourname” as an enum which underneath holds an integer.

You can’t do MyCol = ThemeColors.green with an enum, but you can do it with a module “ThemeColours” containing colour constants.

With an enum it becomes rather awkward. For what?

Therefore: complete overkill.

[quote=153180:@Markus Winter]Not much.

If Xojo would support colours in enums then you would be right. As others have pointed out Xojo does not support it. Underneath it are integers. So if you do not have to restrict the input to “allowed values” then it is somewhat pointless.

You have a “colourname” as an enum which underneath holds an integer.

You can’t do MyCol = ThemeColors.green with an enum, but you can do it with a module “ThemeColours” containing colour constants.

With an enum it becomes rather awkward. For what?

Therefore: complete overkill.[/quote]
What absolute twoddle. We must finish this conversation because you clearly cannot read anything beyond what you have written yourself. I have clearly stated in all my posts above:

So therefore I am aware this does not exist, is purely theoretical and it would be nice for it to exists. You have then clearly written above [quote=153180:@Markus Winter]If Xojo would support colours in enums then you would be right[/quote], thus you agree with me if Xojo did support what I am saying…

What are you on about. You are clearly contradicting your own argument.

Fun to talk to but I must duck out of this one now…

Oh and Markus, the other reason I don’t want to continue this conversation is that Brad (Stalker, Bunny Boiler, Die Hard, Disjointed) Hutchinson is still following you around like a bad smell and is publicising every bit of what he sees on this forum on his (very freaky) Twitter page.

He seems to have also taken a liking to bad mouthing me and the Xippets site (or lack of it) on his twitter and his lonely forum where only he is a member. I must have crossed him at some point on here for him to take such a paranoid dislike to me for no reason.

Anyway, he seems to have moved on an is running a flourishing forum called blowjob, only Brad is a member at the moment although I think he made up a name the other day and started posting under the new name. I suppose that many people had him on ignore on this forum, he feels at home on his own in blowjob forum or whatever he has called it.

Hi Brad, oh sorry you won’t have read this now you have left and moved on will you?

[h]#XojoForumStalker[/h]

Does he still think of me? How sweet.

If you see him let him know that I appreciate his attention, but I don’t swing this way and am happily married.

But I’m sure he’ll find a special someone one day. Though he always seemed very attached to that big dog of his :wink: