Templates for Repeating Panels and troubleshooting errors

I’m following along with the Data Grid grouping tutorial (Paginated Grouping).

When I add the second repeating panel and then try to add anything to it, I consistently get an error "No such form ‘RowTemplate2’ in the designer, and “NameError: name ‘RowTemplate2Template’ is not defined” in the logs.

The cloneable link is here: Anvil | Login

Can someone point out what I’ve done wrong? It’s a bit frustratingly “magic”, as the RowTemplate2Template super class doesn’t seem to be created (although I believe it’s supposed to be). In order to compare, I cloned the completed project from the tutorial (Anvil | Login) which does work, but a quick grep through that source shows that RowTemplate2Template doesn’t exist in that code either, which leads me to believe that some behind-the-scenes trickery is going on to create this class. Why that trickery isn’t working in my own project isn’t quite clear.

Anyway, I’d appreciate someone with a clearer head than I chiming in.

Thanks!

1 Like

Behind the scenes, the Anvil Client runtime is reading the visual layout file (.yaml), and generating the base Template class. Such generated Template classes are not saved anywhere. They’re created on-the-fly, only as needed for compiling the derived class.

1 Like

I see…ok, thanks for the explanation. Any guess as to why this wouldn’t work in my project?

I tried to look at your project, but the first clonable link above does not reference any RowTemplate2 (or trigger any errors when run).

I’ve somehow screwed that up haven’t I…and for the life of me I can’t find the broken one. Thanks for trying and I’ll update here when I do.

1 Like