Setting an Attribute value generate a compile error

Create a brand new project. Add a new class to the project and run it in the debugger. Everything’s fine.
Add an Attribute named “Test” to Class1. Run the debugger, It’s still OK.
No, set a value to the attribute, let’s say “Yes”. Run the project…
At this point, I’m getting a compile error:

Class1.Name    This Item does not exist Class1

Now, if I clear the “test” attribute’s value field, it compile fine.
I’m seeing this on Windows and OS X. Not tested in Linux yet.

Can anyone confirm this?

Is “TEST” a public value? private? protected?

An attribute name like “emcnhfgdr” with a “gbbdvdj” value leads to the same result.

I can confirm this on OS X.

Dave - an attribute, not a property.

Also interesting - in the errors list, the highlighted portion of the issue (“This item does not exist Class1”) is the same length as the value. If you put “yes” as the value, only the first 3 letters of Class1 are highlighted. Put “yesno” and the first 5 are.

Well, after trying a set of values, I come to understand something: the double quotes are mandatory in the value field and I wasn’t using them in the first place, even if I used them in my original post.
It looks like they are mandatory for string values. You can omit them when you’re using numbers or boolean values ( True & False ) without them.
I guess there is two things that needs fixing:
1/ The documentation ( the Userguide-Framework Section 9 & the AttributeInfo page in the wiki ) needs to be more explicit on what the Value field is expecting as a valid value.
2/ An explicit error message when the compiler found an invalid value for an attribute, instead of a more-than-generic error message.

Xojo team: Should I file 1 or 2 reports here?

[quote=29142:@Eric de La Rochette]Well, after trying a set of values, I come to understand something: the double quotes are mandatory in the value field and I wasn’t using them in the first place, even if I used them in my original post.
It looks like they are mandatory for string values. You can omit them when you’re using numbers or boolean values ( True & False ) without them.
I guess there is two things that needs fixing:
1/ The documentation ( the Userguide-Framework Section 9 & the AttributeInfo page in the wiki ) needs to be more explicit on what the Value field is expecting as a valid value.
2/ An explicit error message when the compiler found an invalid value for an attribute, instead of a more-than-generic error message.

Xojo team: Should I file 1 or 2 reports here?[/quote]

One - the attributes editor should be automatically adding quotes on values already

Which IDE version ?

every one since they made an appearance

I can’t see this in Xojo.

Norman,
I tested the steps described in my first post with Real Studio 2012 r2.1 and I’m having the same issue.
And even there I didn’t see any double quotes automatically inserted by the IDE.
Can you explain how this is supposed to work ?
TIA

I think Norman means, “The bug is that the editor should have provided the quotes automatically, but it didn’t. Please file a report on that specific issue.”

That’s what I tried to say :stuck_out_tongue:

As some of us here, I’m not a native english speaker, which explains why I didn’t understand it that way in the first place. I’ll try harder next time. :slight_smile:
Having say that, I didn’t find a mention of this behavior anywhere. How am I supposed to file a bug report about an undocumented behavior that doesn’t happen as it should?

Just file it with the “compile error” you initially noted :stuck_out_tongue:

Done: <https://xojo.com/issue/29105>
HTH.

Still, there is something that needs to be clarified:

It may look like a dumb question given the previous posts, and I apologize in advance if it does, but does this mean the IDE is supposed to automagically correct a wrong entry in the attribute editor?