Re: $this->set(compact()) not working
I fixed this in 1.3: http://thechaw.com/cakephp/commits/view/987e469c2fc151bd5d5377517d43a74c3bdf2ba3#numbers On Apr 7, 3:27 pm, brian wrote: > Thanks, both. I'm kicking myself because I did see something about > this a while back. > > Yes, it's complaining about all three. Strange. > > This is one Cake convention I really hate. Variable names should never > be camel-cased, IMHO. Ugh! > > > > On Tue, Apr 7, 2009 at 3:16 PM, John Andersen wrote: > > > Does the view complain about all the variables or only about > > volume_nodes? > > > For $this->set is stated that when using an associative array, as > > compact will make, the names will be inflected, resulting in > > volume_nodes becomes volumeNodes. > > > Enjoy, > > John > > > On Apr 7, 8:50 pm, brian wrote: > >> I noticed this a few days ago but never got around to looking into it > >> further. I've just run into it again and can't find where things are > >> going wrong. > > >> In my action, I have the following: > > >> $this->set(compact('group', 'aro', 'volume_nodes')); > > >> The View complains that all of these are undefined. So, I do this: > > >> $this->set('group', $group); > >> $this->set('aro', $aro); > >> $this->set('volume_nodes', $volume_nodes); > > >> And everything is swell. Being a convenience, I'm not too put out by > >> this, but it seems really strange and possibly a bug. Poking around in > >> the source hasn't turned up anything obvious and I don't see anything > >> on Trac. Does anyone have an idea why this is failing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $this->set(compact()) not working
Thanks! I hadn't seen that article. Here's me complaining (again) before questioning my assumptions. On Tue, Apr 7, 2009 at 3:28 PM, John Andersen wrote: > > Please be aware that Stu's reference show a solution to avoid the > inflection at the end of the article. > Enjoy, > John > > On Apr 7, 10:27 pm, brian wrote: >> Thanks, both. I'm kicking myself because I did see something about >> this a while back. >> >> Yes, it's complaining about all three. Strange. >> >> This is one Cake convention I really hate. Variable names should never >> be camel-cased, IMHO. Ugh! >> >> On Tue, Apr 7, 2009 at 3:16 PM, John Andersen >> wrote: >> >> > Does the view complain about all the variables or only about >> > volume_nodes? >> >> > For $this->set is stated that when using an associative array, as >> > compact will make, the names will be inflected, resulting in >> > volume_nodes becomes volumeNodes. >> >> > Enjoy, >> > John >> >> > On Apr 7, 8:50 pm, brian wrote: >> >> I noticed this a few days ago but never got around to looking into it >> >> further. I've just run into it again and can't find where things are >> >> going wrong. >> >> >> In my action, I have the following: >> >> >> $this->set(compact('group', 'aro', 'volume_nodes')); >> >> >> The View complains that all of these are undefined. So, I do this: >> >> >> $this->set('group', $group); >> >> $this->set('aro', $aro); >> >> $this->set('volume_nodes', $volume_nodes); >> >> >> And everything is swell. Being a convenience, I'm not too put out by >> >> this, but it seems really strange and possibly a bug. Poking around in >> >> the source hasn't turned up anything obvious and I don't see anything >> >> on Trac. Does anyone have an idea why this is failing? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $this->set(compact()) not working
Please be aware that Stu's reference show a solution to avoid the inflection at the end of the article. Enjoy, John On Apr 7, 10:27 pm, brian wrote: > Thanks, both. I'm kicking myself because I did see something about > this a while back. > > Yes, it's complaining about all three. Strange. > > This is one Cake convention I really hate. Variable names should never > be camel-cased, IMHO. Ugh! > > On Tue, Apr 7, 2009 at 3:16 PM, John Andersen wrote: > > > Does the view complain about all the variables or only about > > volume_nodes? > > > For $this->set is stated that when using an associative array, as > > compact will make, the names will be inflected, resulting in > > volume_nodes becomes volumeNodes. > > > Enjoy, > > John > > > On Apr 7, 8:50 pm, brian wrote: > >> I noticed this a few days ago but never got around to looking into it > >> further. I've just run into it again and can't find where things are > >> going wrong. > > >> In my action, I have the following: > > >> $this->set(compact('group', 'aro', 'volume_nodes')); > > >> The View complains that all of these are undefined. So, I do this: > > >> $this->set('group', $group); > >> $this->set('aro', $aro); > >> $this->set('volume_nodes', $volume_nodes); > > >> And everything is swell. Being a convenience, I'm not too put out by > >> this, but it seems really strange and possibly a bug. Poking around in > >> the source hasn't turned up anything obvious and I don't see anything > >> on Trac. Does anyone have an idea why this is failing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $this->set(compact()) not working
Thanks, both. I'm kicking myself because I did see something about this a while back. Yes, it's complaining about all three. Strange. This is one Cake convention I really hate. Variable names should never be camel-cased, IMHO. Ugh! On Tue, Apr 7, 2009 at 3:16 PM, John Andersen wrote: > > Does the view complain about all the variables or only about > volume_nodes? > > For $this->set is stated that when using an associative array, as > compact will make, the names will be inflected, resulting in > volume_nodes becomes volumeNodes. > > Enjoy, > John > > On Apr 7, 8:50 pm, brian wrote: >> I noticed this a few days ago but never got around to looking into it >> further. I've just run into it again and can't find where things are >> going wrong. >> >> In my action, I have the following: >> >> $this->set(compact('group', 'aro', 'volume_nodes')); >> >> The View complains that all of these are undefined. So, I do this: >> >> $this->set('group', $group); >> $this->set('aro', $aro); >> $this->set('volume_nodes', $volume_nodes); >> >> And everything is swell. Being a convenience, I'm not too put out by >> this, but it seems really strange and possibly a bug. Poking around in >> the source hasn't turned up anything obvious and I don't see anything >> on Trac. Does anyone have an idea why this is failing? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $this->set(compact()) not working
It's apparently related to the underscore: http://myeasyscripts.com/loudbaking/category/cakephp/ try renaming volume_nodes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $this->set(compact()) not working
Does the view complain about all the variables or only about volume_nodes? For $this->set is stated that when using an associative array, as compact will make, the names will be inflected, resulting in volume_nodes becomes volumeNodes. Enjoy, John On Apr 7, 8:50 pm, brian wrote: > I noticed this a few days ago but never got around to looking into it > further. I've just run into it again and can't find where things are > going wrong. > > In my action, I have the following: > > $this->set(compact('group', 'aro', 'volume_nodes')); > > The View complains that all of these are undefined. So, I do this: > > $this->set('group', $group); > $this->set('aro', $aro); > $this->set('volume_nodes', $volume_nodes); > > And everything is swell. Being a convenience, I'm not too put out by > this, but it seems really strange and possibly a bug. Poking around in > the source hasn't turned up anything obvious and I don't see anything > on Trac. Does anyone have an idea why this is failing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---