Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form struct parameters #138

Merged
merged 6 commits into from
Nov 27, 2012
Merged

Conversation

eskimor
Copy link

@eskimor eskimor commented Nov 26, 2012

registerFormInterface has now improved error messages for non applicable form data and struct parameters are now supported.

Currently not working, compiler chokes:
	_args_field_3
	Internal error: e2ir.c 720
- Added support for struct parameters (not yet tested)
- Improved error messages (tested)
- Overall cleanup
- Doc update for applyParametersFromAssociativeArray
It now not only needs to be found, but also needs to be convertible to
the parameter to be considered applicable for the error message.
It is a very basic test, but it works like a charm.
@s-ludwig
Copy link
Member

Great, thanks. The form interface generator looks really useful now. It's a pity that I've not yet gotten around to rewrite some of my projects using it.

Btw. the struct approach just gave me the idea that arrays could be supported in a similar way. For example a parameter int[] x would be mapped to the form parameters x0, x1, x2, ... and a parameter S[] x with struct S { int x, y; } to x0_x, x0_y, x1_x, x1_y, ... - at least I sometimes have forms containing a list of inputs, which can be dynamic in length, where this would be very useful. I'll create a ticket just to not forget this.

s-ludwig added a commit that referenced this pull request Nov 27, 2012
@s-ludwig s-ludwig merged commit 1ab13dc into vibe-d:master Nov 27, 2012
@eskimor
Copy link
Author

eskimor commented Nov 27, 2012

Btw. the struct approach just gave me the idea that arrays could be
supported in a similar way. For example a parameter int[] x would be
mapped to the form parameters x0, x1, x2, ... and a parameter S[] x
with struct S { int x, y; } to x0_x, x0_y, x1_x, x1_y, ... - at least
I sometimes have forms containing a list of inputs, which can be
dynamic in length, where this would be very useful. I'll create a
ticket just to not forget this.

:-) I had the same idea. I will do it, as soon as I got the time or the
need for it, whichever comes first.

@eskimor
Copy link
Author

eskimor commented Nov 27, 2012

On Tue, 2012-11-27 at 01:17 -0800, Sönke Ludwig wrote:

Great, thanks. The form interface generator looks really useful now.
It's a pity that I've not yet gotten around to rewrite some of my
projects using it.

You are very welcome. Do it, it is fun :-) If you find any problems, I
would be glad to fix all of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants