PDA

View Full Version : How to show an object?



gnadirap
8 Apr 2010, 4:13 AM
Hi all

i'm wondering if there is something like "print_r" in PHP, where i can see an object.

Is there something like this 'Ext.MessageBox.showObject('Object entities',object);'
?

Or is there any other possibility to view all the Elements in an object, without knowing, what's in it?

Greetings

Gnadirap

hendricd
8 Apr 2010, 4:40 AM
With Firebug (on Firefox) installed, you would simply:


console.dir(yourObj)

or, you can iterate:


Ext.iterate(yourObj, console.info);

gnadirap
8 Apr 2010, 5:09 AM
thanks.. that simple??? cool. and i nearly broke my head about that :D:D

Greetings

Gnadirap

gnadirap
9 Apr 2010, 3:13 AM
just a nearby question. how do i create a console?? *dummyquestion* *sorry*

steffenk
9 Apr 2010, 3:41 AM
http://translate.google.it/translate?js=y&prev=_t&hl=de&ie=UTF-8&layout=1&eotf=1&u=http%3A%2F%2Fwww.m-software.de%2Fmyblog%2Ffirebug-console-api&sl=de&tl=en

or in german the original
http://www.m-software.de/myblog/firebug-console-api

gnadirap
9 Apr 2010, 3:51 AM
If i write in the source




var store = new Ext.data.JsonStore({
url: this.ownerModule.app.connection,
baseParams: {
moduleId: this.ownerModule.id,
method: 'viewUserProfilePic'
},
reader:reader,
autoLoad: true
});

console.info(store)


The whole program is not working by this message:

Also if i use Ext.iterate(store,console.info);


Console is not defined

VinylFox
9 Apr 2010, 5:22 AM
Click the little bug icon in the lower right hand corner of your browser window then reload the page.

gnadirap
13 Apr 2010, 10:12 PM
this thread can be closed . thx for the help