2014/06/16 at 2:37 pm #5242014/06/16 at 2:44 pm #526
oh yes, I tried git checkout ‘ch-view’ and it did only reset whatever I accomplished so far and left me with blank screen with ‘Invalid callback provided; not callable’ error.
I saw a comment about “not using” the codes from git for your book somewhere but somehow I tempted to test what if the comment was wrong. I was wrong.2014/06/16 at 3:09 pm #527
Sorry but I have to say this: It is a mistake in the book.
addDebugOverlay is actually located in the Module class in Module.php, there is nothing to do with a class called “Debug” as stated in the book in the latest version I purchased yesterday.
Don’t get me wrong, I am able to follow your book very well, I am learning a lot which I was not even able to start with others’. And thank you very much. But this one basically costed my 2 hours.
I hope this info helps others and correcting it in your book.2014/06/17 at 10:07 am #532
Can you tell me the page number and the sentence(s) that states this? We will fix it in the next Kindle version and add it to the queue for the paper version.
Thanks in advance for your valuable feedback.
Slavey2014/06/18 at 9:48 am #533
In page 67, you start code section with:
“And the callback will add an overlay to the existing layout, without the need to know the original
Then your listing for the class module code states the class is named as Debug – also doesn’t mention which file, which was my original question if you read carefully.
In the actual code addDebugOverlay method is in the Module class.
Hope this helps.2014/06/22 at 8:21 pm #535
> Then your listing for the class module code states the class is named as Debug
There is a sentence saying:
“In the Debug Module.php we will attach a listener to the dispatch event:”.
Is it ok if I just add the path to the file?
“In the Module.php file (module/Debug/Module.php) from the Debug module we will attach a listener to the dispatch event:”. I am open for suggestions.2014/06/22 at 8:43 pm #536
You just need to correct the class name in the actual class file code listing just in the next page of that sentence which explains where to attach the listener.
Ok, it currently looks like following:
public function addDebugOverlay(MvcEvent $event)
“class Debug;” is suppose to be “Class Module;”. According to your sample project files and according to myself after 5 days ZF2 experience.
I can find it out now easier, but a new ZF2 reader, just like myself 5 days ago, might spend some time to auto-correct that wrong class name in the listing. Or may be I am not that good. But I thought that you might want to hear about this.
Hope it helps.2014/06/22 at 8:46 pm #537
> You just need to correct the class name in the actual class file
Thanks a lot Smozgur! This last post explains it all. In the coming weeks I will send you a revised epub version.2014/06/22 at 8:51 pm #538
Glad to hear it helps!
Again, nice work. I paused for a while to make some exercises with what I learned so far but I’ll keep continue following your chapters. Do you want me to let you know if I find anything else?
Have a great day!2014/06/22 at 8:57 pm #539
> Do you want me to let you know if I find anything else?
Yes, please. Don’t hesitate to let me know if you find something. You can write directly to my email (given in the initial pages of the book).Thanks to helpful readers and reviewers like you we can make together the book better and more useful. And using modern methods we can publish the changes relatively fast without the need to wait a year or two to see the revised version. Isn’t that great 🙂 ?2014/06/22 at 9:04 pm #540
It certainly is!
You must be logged in to reply to this topic.