Hi Claudio, thank you for your prompt reply !
srvet_claudio wrote:aDefaultColor --> specifies the color initially selected when the dialog box is created, for default is black.
Thi I know. The big step is to make this propose allied with the case of user make cancel of
GetColor(aDefaultColour) and which normally returns {NIL, NIL, NIL} to be changed for returning aDefaultColour.
There is a logic intention to keep default color as initial and when be called by the suggested option.
I do not see any advantage to get {NIL, NIL, NIL} by returning when is cancelled by user, because this is not value color and the main propose is to get a new color or keeping the current color.
I know that we can make the checking value of returning. But if we add a simple path for GetColor function we will able to use it without in
nested function too, avoiding runtime error when aDefaultColour parameter has been informed.
Here is source code for GetColor function at HMG library:

- Screen3.png (57.83 KiB) Viewed 5149 times
At indicated line by red arrow, I propose to be replaced by:
Code: Select all
If ValType ( aDefaultColor ) == "A"
aRetVal := aDefaultColor
Else
aRetVal := { NIL , NIL , NIL }
Endif
This changing will work with { NIL , NIL , NIL } return when be cancelled by user and not be informed aDefaultColor parameter for who wants to use for checking return. But also will work without runtime error when aDefaultColor is informed and user cancel the color selecting.
IMHO, will be great to be considered specially when we want to make something like this (nested function):
My_SetStatusBarBackColor("Form_1",GetColor(My_StatusBarColor))
This is a wish that I considered important for me. The big question is: how this it will be usefull for others without any retro-incompatibility.
I don't know if you know what I meaning.
Rgds