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

Allow Dispatch to be subclassed #2144

Conversation

@jasononeil
Copy link
Contributor

@jasononeil jasononeil commented Sep 4, 2013

Basically the macros only allow arguments of known types, either simple
types (String, Int, Float, Bool) or objects - the only allowed objects
were instances of sys.db.Object subclasses or haxe.web.Dispatch instances.

This patch also allows arguments that are a sub class of haxe.web.Dispatch.

It also makes redirect() public so that the Redirect exception can be
caught by a subclass

Note: I didn't see unit tests for Dispatch, but the functionality is covered by unit tests in ufront-mvc, and they are all passing and test it fairly extensively. This was also mentioned on the mailing list recently and Nicolas suggested sending the pull request.

Basically the macros only allow arguments of known types, either simple
types (String, Int, Float, Bool) or objects - the only allowed objects
were instances of sys.db.Object subclasses or haxe.web.Dispatch instances.

This patch also allows arguments that are a sub class of haxe.web.Dispatch.

It also makes redirect() public so that the Redirect exception can be
caught by a subclass
ncannasse added a commit that referenced this issue Sep 4, 2013
@ncannasse ncannasse merged commit 5582590 into HaxeFoundation:development Sep 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants