I eagerly downloaded 2007r2 today, and tried compiling one of my projects,
and immediately ran into a problem:

Previous versions of RB allowed me to use a constant as a parameter when
calling any method that is expecting an integer. That fails now.

Some examples:

** MyCoolMethod(Self,kITALL) fail to compile because kITALL is a constant
defined as a number, and MyCoolMethod is defined as MyCoolMethod(ThisWnd as
Window, WhichData as Integer)

** Defining a property AbvStr(kMaxCats) as String fails, saying "Array
bounds must be integers"

** Appending a number constant to an integer array also fails.

All of the afflicted constants are defined in modules and are declared as
globals.

So I guess the question is, what's the "correct" way to have constants that
can be used where the methods are expecting integers? I always assumed that
"number" was "integer" when it came to constants, since the constants type
popup doesn't offer any other numeric options.

Or is there something I should be using instead of constants? I really don't
want to have to use global integer variables that I initialize at runtime...

Thoughts? Suggestions?

- John



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to