Input with required ID

Developer
Aug 30, 2010 at 5:04 AM
Edited Aug 30, 2010 at 1:14 PM

Hi everyone,

Great job on Wing Beats, it looks very nice and integrates perfectly with F# !

I noticed that TextBox and most (all?) input shortcuts require an ID, which is copied to the 'name' attribute. What's the reason behind that?

I see a couple of issues with this...

  1. This ID requirement is not evident from the signature, which leads to runtime exceptions (I forked the code and wrapped this exception to make it a little more explicit)
  2. IMHO it violates the principle of least surprise: in my forms I hardly ever define an ID (mostly only if I have to reference it from javascript or a label) but the name is pretty much required (otherwise the value doesn't get sent)

Cheers,
Mauricio 

Coordinator
Sep 6, 2010 at 6:04 PM

Hi mausch!

Thanks for your input. We will soon change Wing Beats a lot. We have a lot of new ideas and the syntax will change a bit, and the shortcuts will also change (if they'll remain at all). 

About you concerns:

  1. This problem will not remain with the new syntax, but thanks for spotting the bug. I'll merge you fork with the source as soon as I've figured out how to do it =)
  2. You might have a point. I often associate the input elements with a label and therefore I need an ID, and to me it makes sense to add an ID and generate a name from it. But since you don't feel comfortable with the solution maybe it should change.

But then again, since a lot will change, let's leave these questions for a while.