Re: [Gambas-user] Using Character constants in Gambas

2011-03-08 Thread Caveat
I would just create a Module called something like DialogFactory... PUBLIC ErrorDialog AS Integer = 0 PUBLIC WarningDialog AS Integer = 1 PUBLIC InformationDialog AS Integer = 2 PRIVATE DefaultDialogType AS Integer = ErrorDialog PRIVATE AllowedTypes AS Integer[] = [ErrorDialog, WarningDialog,

Re: [Gambas-user] Using Character constants in Gambas

2011-03-08 Thread vikram
Hi Caveat, Thanks, that is a lot simpler :) Best Regards, Vikram Nair -- What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on

Re: [Gambas-user] Using Character constants in Gambas

2011-03-08 Thread vikram
Hi Caveat, Thanks, that is a lot simpler :) Best Regards, Vikram Nair -- What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on

Re: [Gambas-user] Using Character constants in Gambas

2011-03-08 Thread Caveat
You're welcome :-) I was thinking if you want your module to be used by others who may have the bright idea of changing the public attributes, you should probably code using the CONST keyword...it's also clearer that these values should never be changed... PUBLIC CONST ErrorDialog AS Integer =

[Gambas-user] Using Character constants in Gambas

2011-03-07 Thread vikram
Hi, I am working on an application in which I reuse the same dialog for performing different tasks. I have a PUBLIC INTEGER variable(named dialogType) in the dialog's .class file. When creating instances of this dialog I set the DialogInstance.dialogType to the value(0,1,2,...) which indicates