I think the original post (Youri's) was referring to declaring properties in the Properties Declaration Area which appears when the AddProperty button is clicked in the code editor in 2005 and above. This Area allows for optionally setting a default value for the property in the declaration rather than accepting the standard default value for the data type of the property being declared. An expression cannot be used for the default value in this context and several posters have pointed this out, as they apparently understood Youri's question as I did.

Best,

Jack

On Jan 10, 2007, at 4:32 PM, Arnaud Nicolet wrote:

Le 11 janv. 07 à 00:00 Matin, Joe Huber a écrit:


At 11:17 PM +0100 1/10/07, Youri wrote:

I have created a property in my app as :

pathtomyDB as folderitem and set its default value as :

PreferencesFolder.child("preferences.rsd")

But I get a syntax error when I try to run the project.


Default values must be literals, not functions nor even constants.


So, how does one pass a default color parameter to a function (or constants)?

Something like:

Sub MyFunction(MyBoolean As Boolean=False,MyColor As Color=<what>)

since you can't write:

MyColor As Color=RGB(0,255,255)

MyColor As Color=1477 (the actual value as an integer, translated by variants)

At least, it seems impossible on RB 5.5..._______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to