Hi Alex,
> I've just took a short look at the Request class and as far as I discovered
> you do not need to overwrite the class at all. You can simply use the
> "setParameter" method to attach your additional GET parameter.
>
> If you really want to change the Request class that it attach the parameters
> always you can use a Mixin to include the code at application startup.
>
> --snip--
> qx.Class.include(qx.io.remote.Request, yourNamespace.MRequest);
> --snip--
>
> Your mixin would look like
>
> --snip--
> qx.Mixin.define("yourNamespace.MRequest", {
> construct: function()
> {
> this.setParameter("authenticity_token", "tokenhere");
> }
> });
> --snip--
>
> Since the mixin has its own constructor this constructor gets executed after
> the Request object is created.
>
Thanks for the pointers.
I tried your technique as follows. I've put the mixin lines:
> qx.Mixin.define("myapp.MRequest", {
> construct: function()
> {
> this.setParameter("authenticity_token", "tokenhere");
> }
> });
>
under "source/class/myapp/MRequest.js" and have added the line:
> qx.Class.include(qx.io.remote.Request, myapp.MRequest)
in main() function of Application.js and I get the following error in
the FireBug console:
> Includes of mixins must be mixins. A dynamic mixin of class
> 'qx.io.remote.Request' is undefined/null!
Any idea on how to arrange my own classes, mixins and make sure that
they're loaded/included when the app starts?
cheers,
skar.
--
--
The life so short, the craft so long to learn.
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel