Fixed  "TypeError: constructorObject is undefined".

On Tuesday, April 15, 2014 5:33:53 AM UTC-7, Sandip Chitale wrote:
>
>
>
> On Tuesday, April 15, 2014 2:21:06 AM UTC-7, Jan Honza Odvarko wrote:
>>
>> On Monday, April 14, 2014 7:35:35 PM UTC+2, Sandip Chitale wrote:
>>>
>>> Hi Honza,
>>>
>>> Thanks for trying it out. I am not seeing these errors. What exact 
>>> versions of Firebug and Firefox are you using. I will try to track these 
>>> down if I can. Seem to be coming from firebug itself?
>>>
>>
>> I am testing with Firefox 28 and Firebug 1.12.8
>>
>> But, the problem came actually from Firebug, fixed at:
>>
>> https://github.com/firebug/firebug/commit/34f747662f1a512e18e1e7ea4d52a9a90abddfd3
>>
>> (also fixed in Firebug 2)
>>
>>
> Excellent!
>  
>
>> > In the context menu you will see a *JavaScript Object Diagram* , click 
>> on it. That will load the
>> > object into JSOD panel and select it.
>> Yep, works for me, very nice!
>>
>> Thanks! I think this is going to be very useful to JavaScript beginners. 
> In addition, there are advanced applications with some more  changes e..g. 
> we could add more functionality such as diagram showing path to GC roots 
> etc for detecting memory leaks etc
>  
>
>> - Scrollbars in the JSOD panel doesn't seem to cover the entire diagram 
>> area
>>
>
> Yes, I need to handle the layout properly.
>
> - Should the context menu item be available even in the DOM panel?
>>
>
> It may work in case of Firebug because the objects are JavaScript 
> objects.I will look into it. 
>  
>
>> - Why the debugger needs to be paused?
>>
>
> My original implementation was for Chrome devtools where it was based on 
> RemoteObject instances, which are only available when the debugger is 
> suspended (AFAIK).
>  
>
>>
>> I am seeing other error in our Firebug Tracing Console (FBTrace)
>>
>
> Yes. I will try this so that I can see exceptions. like below.
>
>
>> Console Service ERROR [JavaScript Error: "TypeError: constructorObject is 
>> undefined" {file: "chrome://firejsod/content/JSODPanel.js" line: 454}] 
>> [JavaScript Error: "TypeError: constructorObject is undefined" {file: 
>> "chrome://firejsod/content/JSODPanel.js" line: 454}]
>>
>> You can install FBTrace (it's Firefox/Firebug extension and it's part of 
>> Firebug source repo) to see it.
>> Read more here:
>> https://getfirebug.com/wiki/index.php/FBTrace
>>
>>
>> Got it. Thanks.
>
> Sandip
>  
>
>> Honza
>>
>>  
>>
>>>
>>> Aslo the JSOD Panel is not automatically loaded. When the debugger is 
>>> suspended, go to the watches panel and right click on the value of a scope 
>>> variable. In the context menu you will see a *JavaScript Object Diagram* , 
>>> click on it. That will load the object into JSOD panel and select it.
>>>
>>> Hope this helps.
>>> Sandip
>>>
>>> On Monday, April 14, 2014 2:45:30 AM UTC-7, Jan Honza Odvarko wrote:
>>>>
>>>> I am seeing a lot of:
>>>> Console Service ERROR [JavaScript Error: "TypeError: 
>>>> node.className.search is not a function" {file: 
>>>> "chrome://firebug/content/lib/css.js" line: 356}] [JavaScript Error: 
>>>> "TypeError: node.className.search is not a function" {file: 
>>>> "chrome://firebug/content/lib/css.js" line: 356}]
>>>>
>>>> When selecting the JSOD tab and hovering mouse cursor over it.
>>>> (tested with Firebug 1.12.8)
>>>>
>>>> (the JSOD tab is always empty, even if the debugger is suspended)
>>>>
>>>> Honza
>>>>
>>>> On Sunday, April 13, 2014 7:10:33 PM UTC+2, Sandip Chitale wrote:
>>>>>
>>>>> FireJSOD.xpi<https://github.com/sandipchitale/FireJSOD/raw/master/FireJSOD.xpi>available.
>>>>>
>>>>>
>>>>> On Saturday, April 12, 2014 3:44:24 PM UTC-7, Sandip Chitale wrote:
>>>>>>
>>>>>> I someone wants to try this alpha version here is the git repository:
>>>>>>
>>>>>> https://github.com/sandipchitale/FireJSOD/
>>>>>>
>>>>>> On Wednesday, April 9, 2014 5:53:14 PM UTC-7, Sandip Chitale wrote:
>>>>>>>
>>>>>>> Getting there: 
>>>>>>> http://sandipchitale.blogspot.com/2014/04/firejsod-javascript-object-diagram.html
>>>>>>>
>>>>>>> On Tuesday, April 8, 2014 9:58:20 AM UTC-7, Sandip Chitale wrote:
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>> Yup...working on finishing it. Will post here when done.
>>>>>>>>
>>>>>>>> On Tuesday, April 8, 2014 6:36:04 AM UTC-7, Jan Honza Odvarko wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tuesday, April 8, 2014 3:17:27 PM UTC+2, Sandip Chitale wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Jan,
>>>>>>>>>>
>>>>>>>>>> Thanks for the response. After a little bit of debugging I 
>>>>>>>>>> figured out that the 'object' argument is a JavaScript object 
>>>>>>>>>> (possibly a 
>>>>>>>>>> wrapper - due to a different JavaScript context)
>>>>>>>>>>
>>>>>>>>> True
>>>>>>>>>  
>>>>>>>>>
>>>>>>>>>> and that for JSOD purposes I can use it as such. So I am on my 
>>>>>>>>>> way to finish the implementation. I have also added JSOD Panel as a 
>>>>>>>>>> top 
>>>>>>>>>> level panel and and am able to switch to it when the context menu is 
>>>>>>>>>> clicked. Now it is simply a matter of populating the diagram.
>>>>>>>>>>
>>>>>>>>> Awesome, let us know when we can check out the extension
>>>>>>>>>
>>>>>>>>> Btw. here is a tutorial for developing Firebug extensions
>>>>>>>>> (just in case you haven't seen that already)
>>>>>>>>> http://www.softwareishard.com/blog/extending-firebug/
>>>>>>>>>
>>>>>>>>> Honza
>>>>>>>>>
>>>>>>>>>  
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> And yes I will look into building the extension for FB 2.0.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Sandip 
>>>>>>>>>>
>>>>>>>>>> On Tuesday, April 8, 2014 1:08:56 AM UTC-7, Jan Honza Odvarko 
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Tuesday, April 8, 2014 8:06:58 AM UTC+2, Sandip Chitale wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> I am trying to integrate my JavaScript Object Diagram (JSOD) 
>>>>>>>>>>>> with Firebug Watches panel. I have done a similar integration with 
>>>>>>>>>>>> Chrome 
>>>>>>>>>>>> devtools. For details see: 
>>>>>>>>>>>>
>>>>>>>>>>> Sounds great!
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> http://sandipchitale.blogspot.com/2014/03/javascript-object-diagram-integration.html
>>>>>>>>>>>>
>>>>>>>>>>>> I have started my firebug extension and got to the point of 
>>>>>>>>>>>> showing a context menu on values in Watches panel. See:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> <https://lh4.googleusercontent.com/-3Gk2D5Zr6dI/U0OOgLGMdeI/AAAAAAAAE7I/yE_x2cXg9rc/s1600/firebugjsod.png>
>>>>>>>>>>>>
>>>>>>>>>>> You should build your extension for Firebug 2
>>>>>>>>>>> https://blog.getfirebug.com/2014/04/04/firebug-2-0-alpha-2/
>>>>>>>>>>>
>>>>>>>>>>> The final 2.0 release will happen in about 2 months (when 
>>>>>>>>>>> Firefox 30 is out)
>>>>>>>>>>>
>>>>>>>>>>> The way how to extend the Watch panel context menu is the same.
>>>>>>>>>>>
>>>>>>>>>>> In any case, this Firebug extension example should help
>>>>>>>>>>>
>>>>>>>>>>> https://github.com/firebug/extension-examples/tree/master/ContextMenu
>>>>>>>>>>> (if not, let me know and we can create a new example)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> <https://lh4.googleusercontent.com/-3Gk2D5Zr6dI/U0OOgLGMdeI/AAAAAAAAE7I/yE_x2cXg9rc/s1600/firebugjsod.png>
>>>>>>>>>>>>
>>>>>>>>>>>> In case of Chrome devtools I basically get hold of the 
>>>>>>>>>>>> RemoteObject<https://chromium.googlesource.com/chromium/blink/+/master/Source/devtools/front_end/RemoteObject.js>.
>>>>>>>>>>>>  
>>>>>>>>>>>> I draw the JSOD based on that. It is my understanding the 
>>>>>>>>>>>> equivalent of 
>>>>>>>>>>>> that in Firebug is 
>>>>>>>>>>>> ObjectReference<https://getfirebug.com/developer/api/firebug1.7/symbols/ObjectReference.html>.
>>>>>>>>>>>>  
>>>>>>>>>>>> It should be very 
>>>>>>>>>>>>
>>>>>>>>>>> This is version 1.7 and quite obsolete
>>>>>>>>>>>  
>>>>>>>>>>>
>>>>>>>>>>>> easy to port the Chrome integration code once I get hold of the 
>>>>>>>>>>>> ObjectReference because it is roughly similar to RemoteObject.
>>>>>>>>>>>>
>>>>>>>>>>>> Sooo... my question is, how do I get hold of the 
>>>>>>>>>>>> ObjectReference in my context menu click callback?
>>>>>>>>>>>>
>>>>>>>>>>> Take a look at the ContextMenu example, there is the following 
>>>>>>>>>>> handler:
>>>>>>>>>>>
>>>>>>>>>>> onContextMenu: function(items, object, target, context, panel, 
>>>>>>>>>>> popup)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> The second argument is the clicked object.
>>>>>>>>>>>
>>>>>>>>>>> Firebug is not fully remotable at this moment, so the object is 
>>>>>>>>>>> direct reference.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Honza
>>>>>>>>>>>
>>>>>>>>>>>  
>>>>>>>>>>>
>>>>>>>>>>>> Any tips are appreciated. Once done I will contribute the 
>>>>>>>>>>>> extension to Firebug community.
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>>
>>>>>>>>>>>> Sandip
>>>>>>>>>>>>
>>>>>>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/9c09202a-6f28-4128-8696-784a79c6e8f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to