App Default Property Constant

I create a String Constant, App.MyTestName = “Test Name 2014”
Then create a String Property called App.FooTestName and using the Inspector I set the Default to App.MyTestName

At runtime, I see ‘App.MyTestName’ instead of the expected ‘Test Name 2014’

I’ve noticed that when I set a Color Property, and use a Color Constant, it works fine, that is all I need to enter into the Default for the Color Property is App.SkyBlue.

Do I need to do something to defrefernce the String Constant like set the Default to #App.MyTestName?
I tried that but it didn’t work, I still got the literal value, not the Constant.

Thanks!

Set the property to #App.MyTestName. The “#” tells the IDE to substitute the value of the constant. Otherwise, you get the literal value that you typed in.

I just tried and the reference simply does not work in 2014R2.1. The property is set to #App.MyTestName, not to the value of the constant.

If I try the same with another property, it works fine. But not with a constant, which is public.

Tried in Xojo 2013R3.3. Same thing. Bug or feature ?

Easy to go around by setting the property in App.Open, though…

It works for me in 2014r2.1. You’re setting this in the inspector when you view a class instance where you’ve added the property to the Inspector Behavior so it shows up, right? You can’t do this directly in the default value of the property.

I was trying to do that with the default value. It is probably what the OP was doing as well. I see now. Thanks.