[Gambas-user] Replace (Internal) Error Message

T Lee Davidson t.lee.davidson at gmail.com
Wed May 24 05:00:57 CEST 2023


On 5/23/23 08:56, T Lee Davidson wrote:
> When I use "dcFlowername_Validate(Null)" to call your procedure exactly as you have it, ie. with the Message.Warning line 
> commented out, I get no error whatsoever.
> 
> Can you provide a small project that reproduces the error?

I realize that you thought you needed to send your project to me privately due to its size of 4.2MB which would not make it to 
the list. And, that is the first reason I asked for a *small* project that reproduces the error. The second reason is because, 
quite often, when one isolates the issue in as small a project as possible that still produces the error, the cause is found.

However, in this case, a little more context, and accurate information, from you in your original post would have been quite 
helpful to prevent the misconception that we were dealing with an error.

This helpful information would have been: 1) the procedure is handling a DataControl Validation event, and 2) the the warning 
message is being triggered by a STOP EVENT statement in the event handler - however not actually in the procedure you told us, 
but in the dcDate_Validation handler as you do not stop the dcFlower_Validation event.

It is not an error message. It is a warning message, and it is expected behavior. And, BTW, the idea that the message is 
meaningless is a matter of opinion.


And so, to your question:
Is there a way to replace the warning message, that is triggered when a DataControl's value is invalidated, with a meaningful 
warning message of my own?

I don't see any way to do that - short of hacking on Gambas itself. Maybe others have some ideas.


-- 
Lee



More information about the User mailing list