On 18 June, 14:34, euromark <[email protected]> wrote:
> "but it makes handling $this->data clumsy"
> how come?
> any examples on that matter?
>

Index after example:
Array
(
    [Node] => Array
        (
            [parent_id] => Array
                (
                    [1] => 0
                    [2] => 0
...
                )
        )
    [NodeDescriptor] => Array
        (
            [title] => Array
                (
                    [1] => zsdcv
                    [2] => vczxcv
...
                )

Index before example:
Array
(
    [1] => Array
        (
            [Node] => Array
                (
                    [parent_id] => 0
                )
            [NodeDescriptor] => Array
                (
                    [title] =>
                )
        )
    [2] => Array
        (
            [Node] => Array
                (
                    [parent_id] => 0
                )
            [NodeDescriptor] => Array
                (
                    [title] =>
                )
        )

With the second version it's easy to do
foreach($this->data as $thing)
{
    $this->doStuffWith($thing)
}


> "Nor does it explain why the original fails"
> i can only guess that this is not an intended way of binding form
> inputs - what cake is concerned
> i would make sense. you always connect form inputs to "models",
> integer values are no models.
> its Model.field or Model.field.{ID} or in rare cases Model.{ID}.field
> any other case cannot be expected to work right of the hook anyway

quick examination of helper.php seems to indicate that leading indices
_are_ catered for, but I can't at first glance see the problem, nor do
I have time to. I've rebased my array at 1. Not happy about it but it
works and I've moved on.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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