Re: Can CakePHP do this? - Two

2007-01-04 Thread Martin Schapendonk
In that case, my solution won't help you very much. Output is only sent to the browser after the view is generated. You may be able to speed up that process, but it is still being sent to the browser afterwards. Perhaps you can use AJAX for partial rendering, or cache the results (or a combinati

Re: Can CakePHP do this? - Two

2007-01-04 Thread skyblueink
Thanks, Martin. I'll try your suggestion. What I am trying to accomplish was posted here today. http://groups-beta.google.com/group/cake-php/browse_thread/thread/8968aaa372cc1e67 Any comments will be much appreciated. On 1 4 , 9 47 , "Martin Schapendonk" <[EMAIL PROTECTED]> wrote: 2007/1/3,

Re: Can CakePHP do this? - Two

2007-01-04 Thread Martin Schapendonk
2007/1/3, skyblueink <[EMAIL PROTECTED]>: I have no choice but to call $this->set() one thousand times in Controller, and write foreach statement one thousand times in View. Maybe you could make myfunction() a little bit more intelligent? function myfunction($i) { switch($i) { case 1:

Re: Can CakePHP do this? - Two

2007-01-03 Thread skyblueink
Thanks Chris, I'll answer you in other thread. On 1 4 , 6 00 , "Chris Hartjes" <[EMAIL PROTECTED]> wrote: On 1/3/07, skyblueink <[EMAIL PROTECTED]> wrote: > Yes, surely it will give the output I wanted. Thank you for your work, > but what if I have to call myfunction one thousand times? >

Re: Can CakePHP do this? - Two

2007-01-03 Thread Chris Hartjes
On 1/3/07, skyblueink <[EMAIL PROTECTED]> wrote: Yes, surely it will give the output I wanted. Thank you for your work, but what if I have to call myfunction one thousand times? $this->set('fruits', $this->Test->myfunction(1)); $this->set('animals', $this->Test->myfunction(2)); .

Re: Can CakePHP do this? - Two

2007-01-03 Thread skyblueink
Yes, surely it will give the output I wanted. Thank you for your work, but what if I have to call myfunction one thousand times? $this->set('fruits', $this->Test->myfunction(1)); $this->set('animals', $this->Test->myfunction(2)); . $this->set('colors', $this->Test->myfunction(1000))

Re: Can CakePHP do this? - Two

2007-01-03 Thread TJSingleton
In actual, we can't get the desired output since we can't do the sequential outputs, call pass(). ok, so is this what you mean? VIEW Header 1: Fruits are here. "; } ?> Header 2: Animals are here. "; } ?> Header 3: Colors are here. "; } ?> CONTROLLER: set('fruits', $this->Test->myfunctio

Re: Can CakePHP do this? - Two

2007-01-03 Thread skyblueink
but I'm not sure how your doing your sequential outputs, or how you are calling pass. Yeah, that's the problem, and I think it maybe the limitation of CakePHP or in general MVC frameworks. In actual, we can't get the desired output since we can't do the sequential outputs, call pass(). On 1

Re: Can CakePHP do this? - Two

2007-01-03 Thread TJSingleton
This gives the desired output, but I'm not sure how your doing your sequential outputs, or how you are calling pass. VIEW: "; } ?> CONTROLLER: set('results', $this->Test->myfunction($i)); $i += -1; switch($i) { case 0: $heading = 'Header 1: Fruits are here. ';

Re: Can CakePHP do this? - Two

2007-01-02 Thread skyblueink
Hi, Signleton! OK, let's see the original Controller. function pass() { $result = array(); for ($i = 1; $i <= 3; $i++) { $result = am($result, $this->Test->myfunction($i)); } $this->set('result',$result); } (1) The above code will give an output: lemon banana apple lion t

Re: Can CakePHP do this? - Two

2007-01-02 Thread TJSingleton
skyblueink wrote: Without using CakePHP or any other MVC framework, I would have codedlike the following: Can you give me an example of the final output you'd like it to achieve? -- TJ Singleton --~--~-~--~~~---~--~~ You received this message because you a

Re: Can CakePHP do this? - Two

2007-01-02 Thread TJSingleton
skyblueink wrote: I want to show progress indicator to the user of my program for each run of $i for loop of pass(). The pass() function could be modified like the following(see below), but it does not give the expected results since $message and $result are overwritten repeatedly. This time I

Re: Can CakePHP do this? - Two

2007-01-02 Thread skyblueink
Without using CakePHP or any other MVC framework, I would have codedlike the following: function pass() { for ($i = 1; $i <= 3; $i++) { if ($i == 1) echo "Now, fruits are being collected."; if ($i == 2) echo "Now, animals are being collected."; if ($i == 3) echo "Now, co

Can CakePHP do this? - Two

2007-01-02 Thread skyblueink
OK, thanks to the help of kind people here I've got a working simple example program(see below). =The Example Code= -test.php includes next lines Test->myfunction($i)); } $this->set('result',$result); } } ?> -And, pass.thtml includes next lines. "; } ?> Currently, he output is: lemon