Please add warning messages when a user generated class or variable name conflicts with an Anvil generated one.
I think I have seen such a warning when I named something name
. If I remember the message ended with ... and this is probably not what you want
. I read the warning message, I changed the name of name
and kept working without wasting any time.
Then I used the suffix Template
for a few forms and I wasted too much time before realizing that there was a naming conflict.
Anvil forms are classes derived from classes with the same name with the Template
suffix:
class Form1(Form1Template):
Adding a RepeatingPanel to a form creates a new ItemTemplate1
form:
class ItemTemplate1(ItemTemplate1Template):
My app happens to manage templates of something, so it came natural to me to create a form called SomethingTemplate
class SomethingTemplate(SomethingTemplateTemplate):
After a short while things stopped working. After a long while I realized that there were naming conflicts. For example I had the following two forms:
class SelectImage(SelectImageTemplate):
class SelectImageTemplate(SelectImageTemplateTemplate):