Mail archive
acf

Re: [Acf] Demo of loading one controller from within another

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Sat, 05 Jul 2008 09:22:33 +0200

On Fri, 2008-07-04 at 13:45 -0400, Nathan Angelacos wrote:
> svn://svn.alpinelinux.org/acf/sandbox/trunk
>
>
> Now contains a demo acf that shows how one controller can load and call
> a second one. You get to it via acf with:

I think the problem was how to execute a function in another *model*,
not another controller.

foo-controller:

bar = require("bar-model")
function stuff()
        self.model.someting()
        bar.otherfunc()
end

i guess the answer is to wrap the neede model funcs in the controller.

> http://<host>/cgi-bin/acf/sandbox/loadingdemo/read
>
> It will load alpine-baselayout/alpineversion, and return alpineversion's
> "read" function.
>
> Its a simple example (4 lines) but should be enough to show how its done.
>
>
>
> _______________________________________________
> acf mailing list
> acf_at_lists.alpinelinux.org
> http://lists.alpinelinux.org/mailman/listinfo/acf
Received on Sat Jul 05 2008 - 09:22:33 GMT