PDA

View Full Version : get all config properties of object.



dkjśrgaard
12 Jun 2013, 5:23 AM
Hi.

Is there any way to get all the config properties represented under configs in the docs ?

something like this:


var window = Ext.create('Ext.window.Window', {
title: 'title',
items: {
xtype: 'button',
text: 'Click Me',
enableToggle: true
}
});

var configs = getAllConfigs(window);


Thanks.
-Danny

friend
12 Jun 2013, 7:33 AM
var initialConfig = window.initialConfig;


Note that 'window' is a reserved word in the browser, so you might want to rename your Window...

dkjśrgaard
12 Jun 2013, 11:09 PM
Hi friend.

Thanks for your replay, I didnt make myself clear. What I meant was all the available configs, not the onces the object was created with.

Regarding the use of window, this was just quickly written and i didnt run it, but thanks for the head up :).

skirtle
13 Jun 2013, 2:54 AM
You can't get to them in JS code.

Perhaps it would help if you could explain why you need them?

You can extract them by running a tool like JSDuck over the source code.

dkjśrgaard
13 Jun 2013, 4:07 AM
You can't get to them in JS code.

Perhaps it would help if you could explain why you need them?

You can extract them by running a tool like JSDuck over the source code.

Thanks for your reply. I'll look in to jsduck.

Im trying to make a simple editor that can add a new element realtime. So I could add a new button and add the available configs realtime, get it synced back to the backend and then make the last 2% of the extjs in a real editor.

90% of the work in 75% of our extjs apps are the store, which we have automated now, and the simple ui like a button which read "go go baby" with a simple handler. I know of the real editors but this would be overkill and expose too much to the end user. If this exsists somewhere i would love to look in to that too.

skirtle
13 Jun 2013, 5:21 AM
JSDuck is what Sencha uses to generate the documentation but it has all sorts of options to extract the information in other formats.

I can't tell from your description where the line is between your requirements and your chosen implementation. Perhaps Sencha Architect could give you what you want?

dkjśrgaard
13 Jun 2013, 5:34 AM
JSDuck is what Sencha uses to generate the documentation but it has all sorts of options to extract the information in other formats.

I can't tell from your description where the line is between your requirements and your chosen implementation. Perhaps Sencha Architect could give you what you want?

I could like it to be webbased and right in the app itself. Sencha Architect is a bit overkill and not webbased. But the source that is used by JSDuck is located in docs/source so I'll just parse that and have the backed send back the information that i need.

Thanks alot your idea solved my question.