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

Implemented array support: issue 14 #140

Merged
merged 3 commits into from Nov 28, 2012

Conversation

Projects
None yet
2 participants
@eskimor

eskimor commented Nov 27, 2012

Well there was neither the time nor the need for it, I did it anyway.

Traversal is now fully recursive. So structures containing structures containing arrays containing arrays containing structures ... are supported now.

The array stuff has not been completely tested yet, but it looks good and at least it the old examples still behave in the same way, so it is at least a good replacement for the old implementation.

In addition the loadFormData() method was provided, which can be used to fill a struct with form data if you don't require all fields to be present in the form.

Docs need to be updated. (Coming soon)

Btw. when adding "-unittest" to dflags in package.json, I get linker errors. Any idea what's the matter?

eskimor added some commits Nov 26, 2012

Implemented more flexible form struct filler.
To be used for flexible form data, when fields might or might not be
provided and you actually don't care.
applyParametersFromAssociativeArray now supports arrays too.
In addition it is fully recursive, so arbitrary nested structures/arrays
will be handled correctly.

Implementation has already been tested with the old examples, so it is
at least not worse than the old one. Arrays have not been tested
thoroughly yet.
@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Nov 28, 2012

Member

:D That itching in the fingers can sometimes be an ass!

I'll check the unit test issue... and I guess now I have to convert something to use this ;)

Member

s-ludwig commented Nov 28, 2012

:D That itching in the fingers can sometimes be an ass!

I'll check the unit test issue... and I guess now I have to convert something to use this ;)

s-ludwig added a commit that referenced this pull request Nov 28, 2012

Merge pull request #140 from eskimor/form_struct_filler
Implemented array support: issue 14

@s-ludwig s-ludwig merged commit cbedfa8 into vibe-d:master Nov 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment