Adding Properties…

I am adding some Color Properties in a Module.

Beside the screen shot below:


This comes after I typed Color and pressed Tab to set a Default value.

The Type value is reset to Integer by default each time I add a Color Property.

Maybe, it is time to change that and use the same Type when the developer add a bunch of Properties.

Also subject to debate is… if I close the module tab (or go back to my code to continue coding) is to reset the default value for Type to Integer or to keep the last used Type.
I would vote for “Back to Integer”. But your opinion can be different: "Keep the last used default value”.

What is your opinion ?

An alternate way would be to allow the importation of a list of Properties Definition from a Text file (using a Contextual Menu.Item with a Click in an Object - Window, Module, Class… - name in the Navigator.

BTW: I found an “Import” MenuItem there, but this does not works my way:

Here’s my testing text file contents:

You could create a Code Assistant that would convert a word like colorred into a const line like you have written in your include or colorblock to insert the whole content like your include file.

Edit: meh, properties not code, back to sleep for me

I get that (more often with age, I’m near 70) too.

I was luck for that part, because my default colours were easy to convert, except for yellow I choosed a different one using TextEdit (Apple) and its Color Picker (1): it gaves me the hex value for the colour I choosed.
(1) This one works fine. I cannot say the same for Xojo ColorPicker … :sob: