I think I may be seeing something related to this. When I try to compile one of my projects, I get the following error:
"Type mismatch error. Expected Int32, but got Unknown Type." for this line of code: "elseif DSSTState = kDSSTStateInitialDisplay then" where DSSTState is a property declared as Integer, and kDSSTStateInitialDisplay is a constant of type Number. This was working fine in R1, so I'm not sure what I need to do now. Is there some way to cast the value of the constant to the proper type, or will I just need to go through and turn all my constants into typed properties? [EMAIL PROTECTED] wrote: > On Apr 02, 2007, at 15:22 UTC, John McKernon wrote: > > >> I always assumed that "number" was "integer" when it came to >> constants, since the constants type popup doesn't offer any other >> numeric options. >> > > No, the numeric type depends on what value you type. The constant > editor is just a GUI for a line of code like: > > const foo = 42 > > Note that you don't declare constants as "Integer", "Double" etc. The > compiler simply infers the type from the value, just as it would do > with a literal. > > But I don't understand why you're seeing that these constants don't > work as parameters. They certainly do for me in the last beta (which I > guess I can mention since r2 is no longer in beta), but I haven't yet > downloaded the official r2 release to try it there. > > Meanwhile, I'd suggest, make a simple example of trying to pass a > single numeric constant to a method that takes a single integer > parameter, and if this still doesn't work, report it as a bug. > > Best, > - Joe > > > >> 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> >> >> > -- > Joe Strout -- [EMAIL PROTECTED] > Verified Express, LLC "Making the Internet a Better Place" > http://www.verex.com/ > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
