Dynamic Text Constant

Before I raise a Feedback request - can someone double check this one for me please. Think found bug with new framework.

Xojo 2015 r2.2

  • New desktop app
  • Create constant in Window1
  • Give it a Default Value
  • Change the type to Text
  • Make it dynamic
  • create values for couple of languages.

Do you get a compilation error?

Type mismatch error: Expected text, but got string

Thanks - that’s what I get as well


OK, going to add myself

I have been using dynamic text constants in the new framework for 6 months without this issue, including in 2015 2.2. Just in case it helps you to move past this issue, have you tried putting your dynamic constants in a module instead of a window?

Yeah - that’s how I came across it unfortunately.

I have a module for all my language dynamic constants, changed them from string to text and got loads of compilation errors.

That’s annoying. Mine were always text so perhaps that’s why I don’t have any issues.

Even a brand new project, with brand new module with a brand new text dynamic constant gives me the error.

Constants appear fine, it’s enabling the “Dynamic” tick box that gives the problem!

Then the only other immediately obvious difference is that I am building an iOS app, not a desktop app.

works fine in iOS

Interesting. So either not many people are localising their desktop apps using dynamic constants (seems unlikely) or not many have switched their desktop apps to the new framework data types (seems more likely).