i think i'm missing something in my component, .. i can't seem to
access the controller from the component.

here's the component's code:

class PlacesComponent extends Object {
        var $controller = true;

        function startup(&$controller) {
                $this->controller = $controller;
        }

        function Do() {
                $this->controller->redirect('/admin/center/');
        }
}

in the controller I use the following code:
loadComponent('Places');

the error I'm getting in the browser:
Fatal error: Call to a member function redirect() on a non-object in
{filename}

it seems as if it giveme access to $this->controller from the startup
function. I tried it without the startup function, and couldn't find
anything about it in the API.
i'd be happy to know how come it doesn't work, and where i could find
it in the API itself.. .. 


I use cake 1.12.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to