What I’m trying to do:
I am trying to define a class to exchange between the client and server of a single Anvil Application.
I’ve created a very simple application to try and make a simple teaching exercise.
I was prompted to try this in a previous post where I was getting errors:
To solve those errors, I am trying the recommended:
Move Transport
somewhere else, likely an isolated client module that doesn’t need the anvil.js.window
object.
After trying that a lot with my candidate app I decided to use a simplified application first.
I note from this post:
This answer:
"Answered my own question - you create it as a client module then the server side can import it. "
I checked this Anvil Docs Page:
And the text:
" First, the class definition needs to be accessible to both client and server code, so it should go in an Anvil Module (not a Server Module). Here’s an example:"
By Anvil Module, I am thinking of this as a ‘Client Module’ rather than a ‘Server Module’
Do you need to be on a paid subscription to do this?
If not can you nudge me along to getting the simple application [clone link below] working?
What I’ve tried and what’s not working:
I have created a module called Transport which defines a class Cargo with single attribute ‘stuff’ for exchange between client and server code to try and get this to work:
I have tried both adding the module to the client, and under the form definition for the client but I keep getting error:
Clone link:
Not done this before, I hope this is correct:
share a copy of your app
My apologies in advance if I have missed something very obvious. I fear that my 30 years of writing strongly typed thick client OO based windows applications interacting with RDBMS hosting fully normalised data models is hampering a speedy uptake of the Anvil/Python architecture. i.e. I have a lot of baggage