On Mon, Nov 21, 2011 at 12:00 PM, Jordan Schatz wrote:
> On Mon, Nov 21, 2011 at 06:32:18AM -0700, Jay McCarthy wrote:
> > I can imagine implementing something like...
> >
> > (define record-formlet
> > (formlet
> > ;; Define the input format
> > ([name (hash-
On Mon, Nov 21, 2011 at 06:32:18AM -0700, Jay McCarthy wrote:
> I can imagine implementing something like...
>
> (define record-formlet
> (formlet
> ;; Define the input format
> ([name (hash-ref this 'name)]
> [company (hash-ref this 'company)]
>
Your version that breaks mainly breaks because you are mutating the record
and recomputing the formlet, rather than saving the formlet in the
continuation for both the display and the processing.
As far as what you'd like to write, I think that's a good start, but
there's a few problems.
1) A lin
Let me see if I can explain what I'm after better. The app that I am
porting is mostly CRUD (Create Read Update Delete), one twist though is
that we never explicitly use create, if a user wants to create a new
record they actually edit a copy of the most recent record, so a form
always has values (
You need to make a new formlet that knows about the default values.
We could imagine a macro that makes this nicer, but in general it will need
to be something that creates a new one.
Is there some reason you don't want to do that?
I can imagine something like (formlet-display) that took the old
I have a pattern of user interaction that is common in my web app:
I have a db record, I present it to the user in a form, the user edits
the form, submits it, server side logic validates it, and then returns
the same form with the updated record.
I want to port the app to Racket, and I thought
6 matches
Mail list logo