Hi thomas,
thanks for answering, because I'm definitely confused about what I am answering.
Actually I have:
    function delete($id)
    {
        if ($this->Slideshow->del($id))
        {
            $data = "">             $this->set('data', $data);
            $this->render('delete', 'ajax');//, 'ajax'
        }

    }

if comment //var $uses = array ('Slideshow'); and set debug to 3 I'll got:
Fatal error: ConnectionManager::getDataSource - Non-existent data source in c:\dokumente und einstellungen\moi\eigene dateien\www\cake\vitrine0002\cake\libs\model\connection_manager.php on line 123

With debug on 0, there is simply no reply. (but delete has been done)

Solving a practical problem without to understand why is a bit useless I think.
So I tried to find a theory to explain that the class SlideshowsController needs a var $uses = array ('Slideshow');
But I think there must be better theories around :-)
Regarding you test, maybe it means that  the $this->Model->del($id) is having some effects. What if you add it to your code ?
If I remove it from mine, the table is updated with no error.

So I can change my statement:

$this->Model->del($id); is killing $this->Model->findAll() if used before in the same method !!!

Does this make sense ?

olivvv





[EMAIL PROTECTED] wrote:
hi there,

ok I have to say first I'm no guru :)

but

Olivier you say

  
The default constructor just allow the index() method to use findAll().
    

and if i understand correctly setting up a test method like this :

function test() {

		$data = ""
		$this->set('data',$data);

	}

and a test view like this :

 pr($data);


would result in an error, but it does not

I don't see why the findall method of the model would only be accessble
in ceratin function

Or am i not understanding what you're assuming ?

I also tried test with an ajax call from my index view and my div get
updated fine with the array i get from the findAll model function

I know this is no solution for now but I thought what u wrote about
findAll being only accessible by index was a little confusing.

my 2 cents

thomas




  


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to