PDA

View Full Version : API Documentation Content Bugs



Pages : [1] 2 3

nick_p
27 May 2011, 9:59 AM
To report any typos, inconsistencies, missing or incorrect documentation, please post them as comments directly to the documentation.

Only if it doesn't seem to fit to the comments format, but is still about documentation, post it here.

If you are having issues with the Docs application as opposed to the content, report your bugs to JSDuck thread (http://www.sencha.com/forum/showthread.php?151739-JSDuck-the-tool-for-documenting-your-Ext-JS-apps) or directly to github bug tracker (https://github.com/senchalabs/jsduck/issues).

SommerEngineering
29 May 2011, 5:07 AM
In Ext.form.RadioGroup the example at the beginning is wrong:


var myRadioGroup = new Ext.form.RadioGroup({
id: 'myGroup',
xtype: 'radiogroup',
fieldLabel: 'Single Column',
// Arrange radio buttons into three columns, distributed vertically
columns: 3,
vertical: true,
items: [
{boxLabel: 'Item 1', name: 'rb', inputValue: '1'},
{boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
{boxLabel: 'Item 3', name: 'rb', inputValue: '3'}
{boxLabel: 'Item 4', name: 'rb', inputValue: '4'}
{boxLabel: 'Item 5', name: 'rb', inputValue: '5'}
{boxLabel: 'Item 6', name: 'rb', inputValue: '6'}
]
});

There are missing commas:

var myRadioGroup = new Ext.form.RadioGroup({
id: 'myGroup',
xtype: 'radiogroup',
fieldLabel: 'Single Column',
// Arrange radio buttons into three columns, distributed vertically
columns: 3,
vertical: true,
items: [
{boxLabel: 'Item 1', name: 'rb', inputValue: '1'},
{boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
{boxLabel: 'Item 3', name: 'rb', inputValue: '3'},
{boxLabel: 'Item 4', name: 'rb', inputValue: '4'},
{boxLabel: 'Item 5', name: 'rb', inputValue: '5'},
{boxLabel: 'Item 6', name: 'rb', inputValue: '6'}
]
});

But also with commas, this example do not work at all for me.

In Ext.panel.Panel in the description of the function animate there is a "the the" in the text.

LesJ
29 May 2011, 6:52 AM
I wanted to point out that there's no listview widget in Ext 4.

The inline code example is also not correct.

http://docs.sencha.com/ext-js/4-0/#/api/Ext.ComponentQuery


// retrieve all gridpanels and listviews
var gridsAndLists = Ext.ComponentQuery.query('gridpanel, listview');

rstuart
30 May 2011, 1:47 AM
In Ext.layout.container.Card, getPrev() says it returns Ext.Component. When there is no previous item, it returns a Boolean. I (as I assume most) would assume it returns undefined when there is no previous item. Instead, it returns false.

gevik
30 May 2011, 2:00 AM
The Ext.chart.series.Bar's class documentation is missing the @class and @extends tags in the comment!

Allan Stark
30 May 2011, 3:38 AM
Grid sample from API Docs (4.0.0 or 4.0.1) not working, in FF 4.0.1 (FireBug) see:

The headers config is not supported. Please specify columns instead.
msg: "The headers config is not supported. Please specify columns instead."
sourceClass: "Ext.panel.Table"
sourceMethod: "initComponent"

Sample page (all path are right and accessible):


<html>
<head>
<title>GRID Demo</title>
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css">
<script type="text/javascript" src="ext/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.onReady(function() {

Ext.regModel('Teams', {
fields: ['name', 'sport']
});

var teamStore = new Ext.data.Store({
model: 'Teams',
sorters: ['sport','name'],
groupField: 'sport',
data: [
{ name: 'Aaron', sport: 'Table Tennis' },
{ name: 'Aaron', sport: 'Football' },
{ name: 'Abe', sport: 'Basketball' },
{ name: 'Tommy', sport: 'Football' },
{ name: 'Tommy', sport: 'Basketball' },
{ name: 'Jamie', sport: 'Table Tennis' },
{ name: 'Brian', sport: 'Basketball' },
{ name: 'Brian', sport: 'Table Tennis' }
]
});

var grid = new Ext.grid.Panel({
renderTo: Ext.getBody(),
store: teamStore,
width: 400,
height: 300,
title: 'Sports Teams',
features: [{
ftype: 'grouping'
}],
headers: [{
text: 'Name',
flex: 1,
dataIndex: 'name'
},{
text: 'Sport',
dataIndex: 'sport'
}]
});

});
</script>
</head>
<body></body>
</html>

renku
30 May 2011, 6:02 AM
The Ext.chart.series.Bar's class documentation is missing the @class and @extends tags in the comment!

But the documentation is still correct, isn't it :)

That's because we're now using JSDuck (https://github.com/nene/jsduck) to generate the docs, which doesn't require having @class and @extends if these can be implied from source.

gevik
30 May 2011, 1:46 PM
But the documentation is still correct, isn't it :)

That's because we're now using JSDuck (https://github.com/nene/jsduck) to generate the docs, which doesn't require having @class and @extends if these can be implied from source.

That is correct :) But it is inconsistent. If we are using @ tags to document the code-base then we should do it correctly for the sake of quality and minimize the risk of having to implement edge cases in JSDuck.

renku
31 May 2011, 12:59 AM
Sure, the formatting of doc-comments is currently inconsistent in several areas, but we're transitioning towards more light-weight markup for the comments - using Markdown for formatting and not repeating in comments what JSDuck can easily extract from the code.

gevik
31 May 2011, 2:15 AM
Sure, the formatting of doc-comments is currently inconsistent in several areas, but we're transitioning towards more light-weight markup for the comments - using Markdown for formatting and not repeating in comments what JSDuck can easily extract from the code.

To be honest I doubt using a Markdown-only solution would work. Since JS is an untyped language, no JS parser is able to determine the actual member type (int,bool,string etc) unless there is another mechanism ( @ tags then) to describe a class member.

All I'm trying to say is: since there has been a major overhaul of the code-base, why not decide on a uniform syntax for describing class members... Reviewing the code comments to make them consistent does not cost that much, right?

It is unfortunate that Sencha doesn't accept patches from the community anymore, Otherwise I could have send you corrections along the way. Because of Ext4Yii I am examining the code-base file-by-file.

my2cents.... anyway....

bodyboarder20
31 May 2011, 2:43 PM
Very minor typo: Ext.tab.Panel

"You can remove the background of the TabBar by setting the plain property to false."

should read

"You can remove the background of the TabBar by setting the plain property to true."

kleins
1 Jun 2011, 2:16 AM
The documentation for Ext.util.TextMetrics.getSize says: "only available on the instance returned from createInstance". In Ext 4, there is no createInstance, anymore nor is TextMetrics a singleton.

Btw, I find it quite hard to keep an overview of the bugs reported in this thread. I have to read the whole thread to see whether a bug has been reported before, and how do you know whether a bug has been fixed or not? Is there no better way/tool to organise bug reporting?

c089
1 Jun 2011, 2:28 AM
Ext.dd.DragZone refers to events like this one:

endDrag( Event e ) : void Fired when we are done dragging the object

But they are not listed as events but as methods. So it's not clear wheter one should override them or use them as events and attach event handlers.

wiznia
1 Jun 2011, 6:34 AM
I can't find anywhere on the documentation the config option "uses", I see in the examples that is an array of classes to use that are passed to the Ext.Loader but is not documented...
By the way, I liked the 3.x documentation page more, why have the tabpanel if you are only using one tab??

LesJ
1 Jun 2011, 8:22 AM
I see that static methods are now marked as such... nice job :)

I'd like to point out that the Ext.draw.Surface.create() method is static, but it's not marked as static. Perhaps this points to a systemic issue.

I see that inheritableStatics are handled correctly, but some methods can be *both* static and instance. This is not handled (minor point).

For example, Ext.draw.Color.fromHSL(), fromString() and toHex() are both static and instance.

2 Jun 2011, 2:38 AM
Hi, I stared a thread here (http://www.sencha.com/forum/showthread.php?135459-Missing-Docs...&p=608994) about missing documentation in the latest online docs.


For some reason the latest docs have remove a whole bunch of classes like the Ext.grid.RowEditor

This makes overriding these classes or trying to understand the Ext inner workings a complete nightmare. Please put them back or at least add an option to toggle hidden / private classes on and off.


mberrie recommended I post the issue here and suggested it may be to do with the @ignore in the 4.0.1 sources.

Thanks

bodyboarder20
2 Jun 2011, 9:26 AM
I am unsure if this is a problem with the way the documentation is written, or if it is a problem w/ the parser used to extract the documentation....

But for Ext.view.Table (and all things extending it), "focusRow()" shows up as "An()" in the documentation...

I suspect it is due to the use of "@cfg" vice "@param" for the method documentation.... But I havent looked into the details on exactly how the current parser expects the format to look.

3 Jun 2011, 3:53 AM
root config property missing from Ext.data.TreeStore as per the sample code on Ext.tree.panel


var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
text:"",
user:"",
status:"",
children: [
{ text:"detention", leaf: true },
{ text:"homework", expanded: true,
children: [
{ text:"book report", leaf: true },
{ text:"alegrbra", leaf: true}
]
},
{ text: "buy lottery tickets", leaf:true }
]
}
});

renku
3 Jun 2011, 6:37 AM
Thanks to everybody for reporting. All documentation issues noted so far in this thread should be fixed by now and visible in the 4.0.2 release.

Few things to note:


Ext.dd.DragZone refers to events like this one [--] But they are not listed as events but as methods.

Indeed, the methods in DragZone are actually methods, but the wording of docs made it sound like they were events.


some methods can be *both* static and instance. This is not handled.

This does point to a systemic issue, the current doc-system assumes static and instance methods can't be with the same name. For now we'll try to handle this manually, as there are only few of such cases, but this whole thing deserves a deeper look.


For some reason the latest docs have remove a whole bunch of classes like the Ext.grid.RowEditor. This makes overriding these classes or trying to understand the Ext inner workings a complete nightmare.

Yeah. Good you brought that issue up. We'll see what we can do about it. Maybe we just have to make all private classes visible again.

4 Jun 2011, 8:26 AM
The docs for Ext.window.MessageBox.show state that the constants for buttons are of the form Ext.window.MessageBox.WHATEVER, when really those are undefined. It should be Ext.MessageBox.WHATEVER

c089
5 Jun 2011, 10:15 PM
Ext.grid.plugin.CellEditing has this example for the edit event:

grid.on('edit', onEdit, this);

function onEdit(e) {
// execute an XHR to send/commit data to the server, in callback do (if successful):
e.record.commit();
};
The handler uses only one argument, but the first argument is not the editEvent, but the editor itself, which is why this will fail.

Nickname
6 Jun 2011, 2:59 AM
"store" config option in missing in Ext.panel.Table and because of inheritance in Ext.grid.Panel.

neonova
6 Jun 2011, 12:46 PM
The static methods listed for StoreManager (http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.StoreManager) do not actually exist:


addStatics (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Base-method-addStatics)
borrow (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Base-method-borrow)
capture (http://docs.sencha.com/ext-js/4-0/#/api/Ext.util.Observable-method-capture)
create (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Base-method-create)
createAlias (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Base-method-createAlias)
implement (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Base-method-implement)
observe (http://docs.sencha.com/ext-js/4-0/#/api/Ext.util.Observable-method-observe)
override (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Base-method-override)
releaseCapture (http://docs.sencha.com/ext-js/4-0/#/api/Ext.util.Observable-method-releaseCapture)


They're fine everywhere except on StoreManager, as far as I can tell. This is due to StoreManager being an object, instead of a class.

renku
6 Jun 2011, 11:04 PM
Thanks for noting neonova, we really need to tackle the static methods thing. I already did some re-arrangements in the docs parser code, so hopefully we can end this mess soon.

jobjo
7 Jun 2011, 5:27 AM
I keep running into situations where config options are not listed in the API browser since they are not annotated in the source code. As an example Ext.chart.Chart specifies 'series' and a 'store' configuration but these are not annotated in the source code and displayed as config options in the API browser. This makes it very hard to find out which configurations that may actually be passed.

Hemlock
7 Jun 2011, 6:21 AM
The endOpacity option for Element.fadeIn looks to have been replaced by opacity. Either the docs are wrong or the implementation is wrong.

zombeerose
7 Jun 2011, 10:50 AM
I apologize if these were already mentioned...

* Ext.grid.Panel - missing selType config.

* Ext.data.TreeStore - missing model config.

* Ext.ElementLoader - missing callback config.

NOSLOW
7 Jun 2011, 11:05 AM
Ext.window.MessageBox: Missing help for property "fn".

ligaard
8 Jun 2011, 12:15 AM
Unfinished sentence at http://docs.sencha.com/ext-js/4-0/source/Picker.html#Ext-form-field-Picker-method-alignPicker. It reads: "Aligns the picker to the" and then just stop there...

8 Jun 2011, 7:59 AM
The list for Ext.panel.Tool's handler config isn't correct in the arguments that are passed. The third argument is an Ext.panel.Header, not an Ext.panel.Panel. This is different from ExtJS 3 where it was the Ext.Panel that contained the tool.

batweasel
9 Jun 2011, 5:24 AM
The Application Archtecture guide (http://docs.sencha.com/ext-js/4-0/#/guide/application_architecture) Controller example is missing quotation marks



'useredit button[action=save]': {
click: this.updateUser
}


should be



'useredit button[action="save"]': {
click: this.updateUser
}

9 Jun 2011, 6:40 AM
In Ext-4.0.2 RC3

multiSelect and stripeRows properties missing from Ext.grid.Panel

Nickname
9 Jun 2011, 7:37 AM
The Application Archtecture guide (http://docs.sencha.com/ext-js/4-0/#/guide/application_architecture) Controller example is missing quotation marks


Works for me without quotes. See also examples from the releases

SebTardif
9 Jun 2011, 11:57 AM
http://docs.sencha.com/ext-js/4-0/#/guide/application_architecture mention for file structure directory [ext-4.0] but http://docs.sencha.com/ext-js/4-0/#/guide/getting_started said [extjs]. In practice, the dot break in .NET MVC so the latest should be used.

zombeerose
9 Jun 2011, 1:54 PM
Would be nice if Ext.grid.feature.RowWrap class was included in the API. :)

fguest
9 Jun 2011, 11:53 PM
[4.0.2] On the main page links to examples of version 4.0.1

ligaard
10 Jun 2011, 3:36 AM
The current documentation - ExtJS 4.0.2 - just states obvious, but not useful, things about plugins. What I would request is that the documentation does the following:

- What is a plugin in ExtJS. The word plugin is used throughout programming and beyond, so it needs to be stated what a plugin is in the ExtJS context.
- What the difference between a plugin and a mixin. When should I choose to implement a plugin and when would I rather choose to implement a mixin.
- Example code presented in a tutorial like style, i.e. showing how to implement a plugin with comments, explanations and considerations.
- It should also be stated that a plugin makes some assumptions about where it is used (I often meet the misconception that a plugin can be used in any class, which is not the case).

Ref.: http://docs.sencha.com/ext-js/4-0/#/api/Ext.AbstractPlugin

ligaard
10 Jun 2011, 3:41 AM
Mixins are new to ExtJS 4. A tutorial on when and why you should consider to implement a mixin is needed. The tutorial should provide information on the differences between a normal class (one that you would 'requires:' or 'uses:') and 'mixins:'.

bodyboarder20
10 Jun 2011, 10:32 AM
The documentation for filtering a store provides examples based on passing in filter configs... but lacks the demonstration of passing in a pre-instantiated filter...

The reason I think this is important is because when you pass in a filter config - AbstractStore::decodeFilters() applies the root:'data' property to the config for you... When one of the filters you're applying to the store is already instantiated, this isn't done for you - so it goes without saying - the filter wont work as expected!

Example:

BAD FILTER >:)



store.filter(Ext.create('Ext.util.Filter',{
property: 'fname',
value: 'Jared'
}));



GOOD FILTER :)



store.filter(Ext.create('Ext.util.Filter',{
property: 'fname',
value: 'Jared',
root: 'data'
}));


I don't think its something that necessary requires a large gravity of attention, but if you could add to the examples (within the store documentation) an example of adding an instantiated filter - I think it may help folks that run into the problem like I did :)

jonathanmv
10 Jun 2011, 11:50 PM
In the 4.0.2 release notes, Documentation Updates says •[EXTJSIV-2352] - constrainTo not documented on Ext.window.Window, but this is still not documented in the Ext JS 4.0.2 API Documentation page

wsi
13 Jun 2011, 7:53 AM
In 4.0.2, Ext.data.Model.fields property states

fields : Array
An array of the fields defined on this model

It should be

fields : Ext.util.MixedCollection
A mixed collection of the fields defined on this model

zombeerose
13 Jun 2011, 1:15 PM
Ext.tree.Panel:
* Missing getRootNode and setRootNode methods.

Ext.util.Sortable:
* First property is missing the @property <name> tag. "The property in each item that contains the data to sort."

zombeerose
13 Jun 2011, 1:35 PM
Ext.data.Operation
* Missing the callback config.

zombeerose
13 Jun 2011, 2:13 PM
Ext.tab.Panel
* Missing activeTab config.

ligaard
13 Jun 2011, 11:09 PM
It would be helpful if the documentation for Ext.PluginManager (http://docs.sencha.com/ext-js/4-0/#/api/Ext.PluginManager) contained an example of the ways to instantiate a plugin. I had to guess and try to find out.

The example could be a (fictitious) auto-complete plugin, with a ptype set as 'plugin.auto-complete'. There are three ways I have found you can instantiate a plugin is. If more that one plugin, then wrap in an array. In the following example I instantiate using Ext.create:

Example 1: Using Ext. create

Ext.create('Ext.view.plugin.AutoComplete', {
storeId: 'MyStore',
displayField: 'name'
})
Example 2: Instantiating using ptype (similar to xtype) to use lazy loading

{
ptype: 'auto-complete',
storeId: 'MyStore',
displayField: 'name'
}
Example 3: No config object needed, just pass plugin's ptype as string

'auto-complete'
I hope the above can serve as inspiration for expanding the Ext.PluginManager (http://docs.sencha.com/ext-js/4-0/#/api/Ext.PluginManager) documentation with usable examples.

Also: Using a line or two to describe ptype's would be helpful. As the text stands now, ptype is mentioned once, and the rest of the documentation in Ext.PluginManager (http://docs.sencha.com/ext-js/4-0/#/api/Ext.PluginManager)'s documentation talks about xtype.

dwarf
13 Jun 2011, 11:34 PM
Some errors in 4.0.2 API in no special order:

Ext.ElementLoader:
Wrong doc for event load
/**
* @event exception
* Fires after a successful load.
* @param {Ext.ElementLoader} this
* @param {Object} response The response from the server
* @param {Object} options The options passed to the request
*/
'load'

Ext.form.FieldAncestor:
Wrong name for event fieldvaliditychange
/**
* @event fielderrorchange
* Fires when the validity state of any one of the {@link Ext.form.field.Field} instances within this
* container changes.
* @param {Ext.form.FieldAncestor} this
* @param {Ext.form.Labelable} The Field instance whose validity changed
* @param {String} isValid The field's new validity state
*/
'fieldvaliditychange',

Ext.Shadow:
property offset must be Number and not String

Ext.menu.Menu:
Error in name/type in method showBy
* @param {Mixed component} The {@link Ext.Component} or {@link Ext.core.Element} to show the menu by.

Ext.grid.feature.AbstractSummary:
Error in type in method toggleSummaryRow
* @param {Boolan} visible True to show the summary row

Ext.Component:
Doc error in optional tag for method show and hide
* @param {String/Element} animateTarget Optional, and <b>only valid for {@link #floating} Components such as

Ext.util.HashMap:
Missing mixins in the doc
Ext.define('Ext.util.HashMap', {
mixins: {
observable: 'Ext.util.Observable'
},

14 Jun 2011, 5:16 AM
The add function of Ext.menu.Menu shows an example of adding items to a toolbar, not a menu

LesJ
14 Jun 2011, 5:25 AM
Ext.draw.CompositeSprite - return value for MOST methods is incorrectly documented!

setAttributes() - returns the composite sprite, not void

add() - returns the added sprite, not void

remove() - should return the removed sprite, see this:
http://www.sencha.com/forum/showthread.php?134194-4.0.1-Ext.draw.CompositeSprite.remove%28%29-return-the-removed-sprite

getBBox() - returns bbox, not void

show() - returns the composite sprite, not void

hide() - returns the composite sprite, not void

LesJ
14 Jun 2011, 5:29 AM
The doc for Ext.draw.Sprite should include the draggable configuration option.

Adding this option will make the sprite draggable once this bug is fixed.

http://www.sencha.com/forum/showthread.php?131427-FIXED-EXTJSIV-1769-4-Ext.draw-can-t-create-draggable-sprite

halcwb
15 Jun 2011, 7:01 AM
Clicking the link in the description of Application:
For more information about writing Ext JS 4 applications, please see the application architecture guide.

Gives:


Not Found

The requested URL /ext-js/guide/application_architecture was not found on this server.

Apache/2.2.14 (Ubuntu) Server at docs.sencha.com Port 80

15 Jun 2011, 8:27 AM
Ext.view.AbstractView
*emptyText: Has the note that deferEmptyText needs to be set to true if the data is locally loaded for emptyText to be shown. This isn't the case.

44gatti
15 Jun 2011, 10:50 AM
API DOCS for Component, xtype for ProgressBar is 'progressbar' not 'progress' ;)
http://docs.sencha.com/ext-js/4-0/#/api/Ext.Component

the duration of frame effect is in millisecs, not in seconds
http://docs.sencha.com/ext-js/4-0/#/api/Ext.Element-method-frame (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Element-method-frame)

Justin Noel
15 Jun 2011, 12:01 PM
Please see : http://www.sencha.com/forum/showthread.php?132123-Incorrect-Guide-MVC-Application-Architecture

Justin Noel
16 Jun 2011, 7:43 AM
No JSON example of http://dev.sencha.com/deploy/ext-4.0.0/examples/form/xml-form.html

The XML example says:



For a similar example using JSON rather than XML, see the JSON Form example


Unfortunately, there is no such demo.

Since this is the ONLY form on the entire demo site that ACTUALLY submits a form, it sure would be nice to have a working JSON example.

renku
21 Jun 2011, 12:07 PM
Sorry for so little feedback in this thread. Thanks to everybody for reporting, it's been a great help in making the docs better.

The bugs mentioned so far have mostly been fixed, remaining issues have been noted.

Things are getting better, but a lot of holes in the docs still remain, so keep these posts coming :)

22 Jun 2011, 2:13 AM
On Ext.form.field.ComboBox the following are private and shouldn't be.... they are really useful methods.


/**
* Find the record by searching for a specific field/value combination
* Returns an Ext.data.Record or false
* @private
*/
findRecord: function(field, value) {
var ds = this.store,
idx = ds.findExact(field, value);
return idx !== -1 ? ds.getAt(idx) : false;
},
findRecordByValue: function(value) {
return this.findRecord(this.valueField, value);
},
findRecordByDisplay: function(value) {
return this.findRecord(this.displayField, value);
},


I've also added an extra very useful method


Ext.override(Ext.form.field.ComboBox, {
getSelectedRecord: function() {
return this.findRecordByValue(this.getValue());
}
});

bodyboarder20
22 Jun 2011, 10:47 AM
Please include documentation re: the ability to use "named" arguments for Ext.Direct via the use of the "params" attribute for the method description in the API.

This can be done by fully documenting Ext.direct.RemoteMethod and exposing its documentation....

Also, paramsAsHash might also provide insight that it is necessary to specific your params explicitly in your API if you want the params to be sent as a hash properly.

For example, if you specify paramsAsHash as true, but DONT specify the params in your API, then what will get send to the server is a single element array containing the hash of values..... rather than just the hash.....

halcwb
24 Jun 2011, 7:31 AM
As I understand every object in Javascript has a constructor property, that refers to the constructor function of that object. So if I just create the most simple object like:



var temp = {};
var temp2 = temp.constructor({name: 'temp2'});
console.log(temp2);


So now I have a second object temp2 with a property name = 'temp2'. This is because the constructor function returns an new instance of temp, applying the config object. However, this code will not work:



var temp = {};
temp.constructor = function () { alert('I am not a constructor anymore')};
var temp2 = temp.constructor({name: 'temp2'});
console.log(temp2);


Should not any override of constructor return the object? I refer to the documentation of Ext.Base:



Ext.define('My.own.A', {
constructor: function(test) {
alert(test);
}
});

Ext.define('My.own.B', {
extend: 'My.own.A',

constructor: function(test) {
alert(test);

this.callParent([test + 1]);
}
});

Ext.define('My.own.C', {
extend: 'My.own.B',

constructor: function() {
alert("Going to call parent's overriden constructor...");

this.callParent(arguments);
}
});

var a = new My.own.A(1); // alerts '1'
var b = new My.own.B(1); // alerts '1', then alerts '2'
var c = new My.own.C(2); // alerts "Going to call parent's overriden constructor..."
// alerts '2', then alerts '3'

halcwb
24 Jun 2011, 1:12 PM
This example directly copy pasted from the api doc of the class system does not work:



Ext.define('My.own.Window', {
/** @readonly */
isWindow: true,

config: {
title: 'Title Here',

bottomBar: {
enabled: true,
height: 50,
resizable: false
}
},

constructor: function(config) {
this.initConfig(config);

return this;
},

applyTitle: function(title) {
if (!Ext.isString(title) || title.length === 0) {
alert('Error: Title must be a valid non-empty string');
}
else {
return title;
}
},

applyBottomBar: function(bottomBar) {
if (bottomBar && bottomBar.enabled) {
if (!this.bottomBar) {
return Ext.create('My.own.WindowBottomBar', bottomBar);
}
else {


this.bottomBar.setConfig(bottomBar);
}
}
}
});

var myWindow = Ext.create('My.own.Window', {
title: 'Hello World',
bottomBar: {
height: 60
}
});


I get a TypeError: c is not a constructor error.

halcwb
26 Jun 2011, 2:58 AM
I cannot find the api documentation for Ext.form.FormPanel. Yet, if I check Ext in for example firebug, Ext.form.FormPanel does still exist.

Ha, found it Ext.form.FormPanel is an alias for Ext.form.Panel

BillHubbard
27 Jun 2011, 8:40 AM
Please add a widget development guide.

BillHubbard
27 Jun 2011, 5:13 PM
Misspelling under Ext.Class docs: instanciating should be instantiating. There may be other places where this appears (Gauge.js in ExtJS 4.0.1, for example).

renku
28 Jun 2011, 12:58 AM
However, this code will not work:



var temp = {};
temp.constructor = function () { alert('I am not a constructor anymore')};
var temp2 = temp.constructor({name: 'temp2'});
console.log(temp2);


Should not any override of constructor return the object?

Well, you aren't invoking temp.constructor as a constructor. Because you aren't using the new keyword, you're just invoking it as a normal function.

As for the builtin constructor of Object, it doesn't really create a new object - it simply returns the object you passed in. I guess the native implementation is simply this:


temp.constructor = function(o) { return o; }

zombeerose
29 Jun 2011, 9:12 AM
Ext.JSON.encodeDate ... example should be changed to something like ...


Ext.JSON.encodeDate = function(d) {
return Ext.Date.format(d,'"Y-m-d"');
};

LesJ
29 Jun 2011, 10:02 AM
new should not be used to make an instance of a class

Go here:

http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.Panel-method-constructor

You will see:

new Ext.grid.Panel( Ext.core.Element/String/Object config ) : Object

I just wanted to point out that Ext.create should be used to create a new instance.

This minor mistake is repeated throughout the entire doc.

renku
29 Jun 2011, 10:48 AM
Well, the "new" is there just to make it clear that it's the documentation for a constructor.

It's really up to the developer if he chooses to use new or Ext.create. Neither is mandated nor prohibited by ExtJS. I could argue even against this: you shouldn't rely on Ext.create, instead Ext.require the classes before you start instantiating them. But really there's nothing wrong with either ways. But new is the standard way in JavaScript.

LesJ
29 Jun 2011, 11:33 AM
Well, the "new" is there just to make it clear that it's the documentation for a constructor.


I see your point, but am also afraid that people will use "new" to create instances where Ext.create is recommended, see this reply from Jacky:

response #6

"It's best practice from Ext JS 4 onwards to use it over the 'new' keyword..."

http://www.sencha.com/forum/showthread.php?127671-Ext.create-vs-the-keyword-new&

renku
29 Jun 2011, 2:04 PM
I think a better fix for this is to correct all the code examples that use new instead of Ext.create - there are still a lot of these hanging around.

ligaard
1 Jul 2011, 2:09 AM
Steps to reproduce:
1) Go to: http://docs.sencha.com/ext-js/4-0/#/api/Ext.container.Container-cfg-layout
2) Now notice the wrong line break after the following lines:
a) Quote: "The sizing and positioning of child items is the responsibility of"
b) Quote: "layout may be specified as either as an Object or"

Also, the line "Additional layout specific configuration properties. For complete[snip]" looks to either have a superflous line break before it, or maybe it is indented to a wrong level (maybe even both).

rexmpetersen
1 Jul 2011, 3:32 AM
The portion of the example below for Ext.view.View looks to me to be incorrect.

The escaping should be removed and 'Ext.DataView' should be 'Ext.view.View'

var imageTpl = new Ext.XTemplate(
'&lt;tpl for="."&gt;',
'&lt;div style="thumb-wrap"&gt;',
'&lt;img src="{src}" /&gt;',
'&lt;br/&gt;&lt;span&gt;{caption}&lt;/span&gt;',
'&lt;/div&gt;',
'&lt;/tpl&gt;'
);

Ext.create('Ext.DataView', {
store: Ext.data.StoreManager.lookup('imagesStore'),
tpl: imageTpl,
itemSelector: 'div.thumb-wrap',
emptyText: 'No images available',
renderTo: Ext.getBody()
});

ligaard
1 Jul 2011, 3:33 AM
Steps to reproduce:
1) Go to: http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.Panel
2) Scroll down to the heading 'Sorting and filtering'
3) There is no example of how to filter.

Suggestion for improvement: Add example for how to use filters.

clearbasis
1 Jul 2011, 2:20 PM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.tab.Bar

See attachment for reference.

Jaitsu
3 Jul 2011, 11:03 AM
API Documentation doesn't load at all for me on Safari 5.0.5 (Mac OSX 10.6.8)..

I get the following errors in my console...


QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota. (ext-all.js:15)
TypeError: Result of expression 'a' [undefined] is not an object

Greendrake
3 Jul 2011, 4:35 PM
TreeStore load event arguments are different to those of AbstractStore, but the docs display them as inherited >:).

Uberdude
4 Jul 2011, 8:16 AM
The docs for Ext.util.Format.htmlEncode, Ext.util.Format.htmlDecode, Ext.String.htmlEncode and Ext.String.htmlDecode all say


Convert certain characters (&, <, >, and ') ...If you check the source it is not single quote (') that is changed, but double quote (") (to &quot; ). The code is correct, it would be bad to change single quote to &apos; as that's an xml not html escape and IE correctly follows standards (!) and doesn't convert it.

Also, the docs on Ext.util.Format incorrectly say the return type is void, instead of the encoded/decoded string, presumably confusion arising from the functions there merely aliasing those on Ext.String.

korax
5 Jul 2011, 7:59 AM
Return type for the Ext.form.field.Radio method getValue() (http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.field.Radio-method-getSubmitValue) is documented as Boolean, when it in fact returns the value of the config item inputValue (http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.field.Radio-cfg-inputValue), which is a string (defaulting to the string "on").

edspencer
5 Jul 2011, 10:16 PM
API Documentation doesn't load at all for me on Safari 5.0.5 (Mac OSX 10.6.8)..

I get the following errors in my console...

@James thanks, I've alerted our docs team to check this out. From what I can recall Safari has a rather buggy localStorage implementation - you should be able to get around this particular issue for now by loading the docs page and running localStorage.clear() on the console and then refreshing.

ligaard
6 Jul 2011, 4:05 AM
Several methods state that they accept and/or returns an object of type Ext.data.Record. I can not find any documentation for Ext.data.Record.

I looked for docs for Ext.data.Record to find out methods it might have and what the properties are and how they are supposed to be accessed and utilised.

I hope there will be some documentation of this fundamental class, which is used throughout stores.

renku
6 Jul 2011, 4:14 AM
@ligaard: this needs to be cleared up... Record has been renamed to Model in ExtJS 4.

ligaard
6 Jul 2011, 4:24 AM
I am talking about objects which have an 'internalId' property like "ext-record-1": Is that an instance of Ext.data.Model..?

If so, then the following doc comments should probably be updated:

ext/src$ grep -rs 'Ext.data.Record' *
data/NodeStore.js:27: * @cfg {Ext.data.Record} node The Record you want to bind this Store to. Note that
data/Model.js:239: alternateClassName: 'Ext.data.Record',
data/NodeInterface.js:30: * @param {Ext.data.Record} record The Record you want to decorate the prototype of.
data/NodeInterface.js:640: * @return {Ext.data.Record} The record you just inserted
form/field/ComboBox.js:889: * Returns an Ext.data.Record or false
form/Basic.js:601: * @param {Ext.data.Record} record The record to edit
grid/column/Action.js:113: * <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data.</p></li>
grid/column/Action.js:134: * <li><b>r</b> : Ext.data.Record<p class="sub-desc">The Record providing the data.</p></li>
selection/Model.js:436: * @param Ext.data.Record record
tree/View.js:448: * @param {Ext.data.Record} recordInstance
view/Table.js:129: // * @param {Ext.data.Record} record

ligaard
6 Jul 2011, 4:30 AM
Steps to reproduce:
1) Go to: http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.column.Action-cfg-getClass
2) See that the parameters are shown as html; they should have rendered a list instead.

renku
6 Jul 2011, 5:23 AM
I am talking about objects which have an 'internalId' property like "ext-record-1": Is that an instance of Ext.data.Model..?

Exactly.

ligaard
6 Jul 2011, 6:13 AM
Then maybe the get() method of Ext.data.Model does not work properly..? Inside a 'itemmouseenter' handler, I call record.get('text'), which I can verify is there as record.data.text. But I get the error "Uncaught ReferenceError: text is not defined".

So why can the get() method not find the text property?

keithhackworth
6 Jul 2011, 7:04 AM
I can't find the treeviewdragdrop plugin documentation anywhere on the 4.0.3 documentation tree. I found it using an old link here: http://docs.sencha.com/ext-js/4-0/#/api/Ext.tree.plugin.TreeViewDragDrop

Same for gridviewdragdrop. Was this intentionally done?

Thanks,
Keith

ext-spring-mvc
6 Jul 2011, 11:06 AM
http://docs.sencha.com/ext-js/4-0/#/...art.series.Pie (http://docs.sencha.com/ext-js/4-0/#/api/Ext.chart.series.Pie)

label config is missing

dogomatic
6 Jul 2011, 11:49 AM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.app.Controller

template method Controller.onLaunch is missing.

neonova
6 Jul 2011, 1:36 PM
The description of parameters passed to the Ext.grid.column.Column renderer (http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.column.Column-cfg-renderer) callback appears to be incorrect. Instead of:
(value, metaData, record, colIndex, store, view)

it seems to be:
(value, metaData, record, rowIndex, colIndex, store)

renku
6 Jul 2011, 11:41 PM
Then maybe the get() method of Ext.data.Model does not work properly..? Inside a 'itemmouseenter' handler, I call record.get('text'), which I can verify is there as record.data.text. But I get the error "Uncaught ReferenceError: text is not defined".

It looks like you are trying to access an undeclared variable named text. That's what ReferenceError (https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/ReferenceError) means. This indicates the problem is more likely in your code. (If you look at the source of get() method (http://docs.sencha.com/ext-js/4-0/source/Model.html#Ext-data-Model-method-get), you'll see it simply accesses the data property like you assumed, and there's not much that can go wrong with this single line.)

neshaug
7 Jul 2011, 12:51 AM
The example in http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.Association is using the autoLoad config option for a belongsTo association. The option exists but can't be found in the docs http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.BelongsToAssociation

ligaard
7 Jul 2011, 5:17 AM
In the documentation for http://docs.sencha.com/ext-js/4-0/#/api/Ext.Element-method-appendChild it states that it takes a parameter of type String/HTMLElement/Array/Element/CompositeElement. Have the documentation describe what 'String' means, Element means etc. Preferably with a few examples.

And also an example of how to create a new element. If have tried the following, which just gives me an empty object:

var userElm = new Ext.Element('<div>Method: ' + user.name + '.</div>');

It would think userElm could now be used with e.g. appendChild(), appendTo() etc., but no such luck.

PS: Does anybody know how to get the latest CDN version of ExtJS? I have found http://extjs.cachefly.net/extjs/4.0.1/ext-all-debug-w-comments.js, but would like a newer version.

ligaard
7 Jul 2011, 5:24 AM
In the documentation for http://docs.sencha.com/ext-js/4-0/#/api/Ext.Element-method-insertHtml, the first parameter just states that it can be one of four values, 'beforeBegin', 'afterBegin', 'beforeEnd' and 'afterEnd'. Please state what this means, so we do not have to try them willy-nilly. The documentation could be either inline or having each value be a link.

ligaard
7 Jul 2011, 6:16 AM
In the documentation for Ext.env.Browser, http://docs.sencha.com/ext-js/4-0/#/api/Ext.env.Browser, it is stated at the top, that there is a global Ext.browser instance. But I get undefined.

Likewise with Ext.env.OS, http://docs.sencha.com/ext-js/4-0/#/api/Ext.env.OS, which states that I should use Ext.os. Here I also get undefined.

The documentation should be updated to explain when the two Ext.browser / Ext.os are available.

Ozone
7 Jul 2011, 6:45 AM
var myStore = new Ext.data.Store({...

should probably have been:


var myStore = Ext.create('Ext.data.Store', {...})

It is used more than once in the examples.

keithhackworth
7 Jul 2011, 12:46 PM
usage: create (http://docs.sencha.com/ext-js/4-0/#/api/-method-create)( Object data, String name, Number id ) : void

actual usage: create (http://docs.sencha.com/ext-js/4-0/#/api/-method-create)( String name, Object data, Number id ) : void

The example directly below it shows how it should be used:



Ext.create('User', {
first: 'Ed',
last: 'Spencer'
});
'User' is the model name (string), and first/last is the data passed.

wufpack_jack
7 Jul 2011, 1:47 PM
The ComboBox 'select' event is showing the documentation for Picker which is not quite the same.

I presume it's because the comment in ComboBox starts with a /* vs. a /**. See below:

/*
* @event select
* Fires when at least one list item is selected.
* @param {Ext.form.field.ComboBox} combo This combo box
* @param {Array} records The selected records
*/
'select'

ligaard
7 Jul 2011, 11:36 PM
There is no documentation for Ext.env.FeatureDetector, http://docs.sencha.com/ext-js/4-0/#/api/Ext.env.FeatureDetector. Please provide at least a paragraph that explains what it is supposed to do.

flanders
8 Jul 2011, 1:42 AM
The documentation for the roweditor (http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.plugin.RowEditing) says it will give two arguments to eventhandlers. This is not true, it only gives the second argument that is described.

jhummel
9 Jul 2011, 12:34 PM
I think the example under the "Creating new Ext JS UIs" section of the theming guide is wrong. Currently the first line of the example is:


@include Ext JS-panel-ui(

I believe it should be:


@include extjs-panel-ui(

hexawing
10 Jul 2011, 7:36 PM
in "Ext.grid.plugin.RowEditing (http://docs.sencha.com/ext-js/4-0/source/RowEditing.html#Ext-grid-plugin-RowEditing)"->events->beforeedit

this can work:


beforeedit: function(editor, e, options){
if(editor.rowIdx == 2) editor.cancel = true;
},
and this cannot work:


beforeedit: function(editor, e, options){
if(e.rowIdx == 2) e.cancel = true;
},
but in the API, it says:



e : ObjectAn edit event with the following properties:

grid - The grid this editor is on
view - The grid view
store - The grid store
record - The record being edited
row - The grid table row
column - The grid Column (http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.column.Column) defining the column that initiated the edit
rowIdx - The row index that is being edited
colIdx - The column index that initiated the edit
cancel - Set this to true to cancel the edit or return false from your handler.

SebTardif
11 Jul 2011, 6:07 AM
Duplicate code line at:
http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.Types

Extract:
{ name: 'latitude', mapping: 'lat', type: types.FLOAT },
{ name: 'latitude', mapping: 'lat', type: types.FLOAT },

edspencer
11 Jul 2011, 10:13 AM
Duplicate code line at:
http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.Types

Extract:
{ name: 'latitude', mapping: 'lat', type: types.FLOAT },
{ name: 'latitude', mapping: 'lat', type: types.FLOAT },

Thanks, fixed

hexawing
12 Jul 2011, 2:48 AM
in "Ext.grid.plugin.RowEditing"->methods->startEdit

in API, the 2 parameters are both "Model", but it seems like they should be Numberic, shown as below:



validateedit: function(editor, e, options){
editor.startEdit(1,1);//this can work
editor.startEdit(1,"mobile");//this cannot work
}

Farish
12 Jul 2011, 10:53 PM
The "write" event for Ext.data.Store isn't documented. It exists and I have used it:


store.on('write', function() {
store.load();
});

sirtmp
13 Jul 2011, 1:30 AM
1) Submit button is always disabled (even after loading form)
2) JSON form example dosn't point to JSON Example. It refers to XML Example

Please refer to
http://dev.sencha.com/deploy/ext-4.0.2a/examples/form/xml-form.html

ligaard
13 Jul 2011, 2:23 AM
Steps to reproduce:
1) Go to http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.Basic-cfg-baseParams
2) Notice the link to Ext.Object.toQueryString. Click the link.
3) You are now taken to a deprecated method, which tells you the new correct URL to go to, http://docs.sencha.com/ext-js/4-0/#/api/Ext.Object-method-toQueryString

Fix: Update the link to go directly to the correct page, instead of taking the detour via the deprecated method.

SamuraiJack1
13 Jul 2011, 3:33 AM
Probably already reported, anyway - the `write` event of the AbstractStore is not documented

edspencer
13 Jul 2011, 10:59 AM
The "write" event for Ext.data.Store isn't documented. It exists and I have used it:


store.on('write', function() {
store.load();
});

Thanks, this is now fixed locally

Farish
15 Jul 2011, 12:08 AM
Ext.form.field.File element's config readOnly says:



readOnly : Booleantrue to mark the field as readOnly in HTML (defaults to false).
However, I have discovered that the default is true. The file field doesn't allow writing into it unless readOnly is set to false explicitly.

s.busch
15 Jul 2011, 5:05 AM
There are two files with the same name but different case:

docs/source/JSON.html
docs/source/Json.html

Therefore one gets lost on my Mac OSX, which has a case-insensitive filesystem by default.

They are different files:

> md5sum docs/source/Json.html docs/source/JSON.html
c08488591ddf7a6a647170405b617089 docs/source/Json.html
61f26034047770fbea55e4c1653d5c71 docs/source/JSON.html

(Side note: I did some research since I'm used to Linux and rather prefer case-sensitive filesystems, but many Apps on Mac seem to have problems which such a non-default setting).

renku
15 Jul 2011, 6:13 AM
Heh, I had always thought that OSX filesystem was case-sensitive. Anyway, thanks for reporting, it's has been already fixed internally to please Windows users :)

Nickname
15 Jul 2011, 9:30 AM
User spurcell discovered that Ext.DomHelper isnt available as the Docs say. [Thread] (http://www.sencha.com/forum/showthread.php?140614-Ext.DomHelper-is-undefined&p=626406)

Checked the sources and found the problem:

Ext.DomHelper does not exists in 4.0.2a, but Ext.core.DomHelper does

From the src/core/src/dom/DomHelper.js file:


Ext.ns('Ext.core');
Ext.core.DomHelper = function(){
var tempTableEl = null,


The Online Docs source :
// http://docs.sencha.com/ext-js/4-0/source/DomHelper.html#Ext-DomHelper


Ext.ns('Ext.core');
Ext.core.DomHelper = Ext.DomHelper = function(){
var tempTableEl = null,



Checked all build files in the 4.0.2a GPL release
No results for Ext.DomHelper, but for Ext.core.DomHelper



ext-4.0.2a# fgrep Ext.DomHelper ext-all*
ext-4.0.2a# fgrep Ext.core.DomHelper ext-all*
ext-all-debug.js:Ext.core.DomHelper = function(){
ext-all-debug.js: newNode = Ext.core.DomHelper.insertHtml(pos, el, Ext.core.DomHelper.createHtml(o));
ext-all-debug.js: Ext.core.DomHelper.applyStyles(el, o.style);
[...]


Seems the Online Docs are not for 4.0.2a as they should or generated not from the downloadable GPL version?
Please explain how this difference between downloadable version and Docs could appear.

ykey
15 Jul 2011, 6:49 PM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.util.Observable

Example uses old style parent call, could be confusing.



Employee.superclass.constructor.call(this, config)

renku
17 Jul 2011, 6:40 AM
Seems the Online Docs are not for 4.0.2a as they should or generated not from the downloadable GPL version?Please explain how this difference between downloadable version and Docs could appear.

Indeed. The Online Docs are created from 4.0.4 release, available for support subscribers.

A lot of documentation fixes have gone in since the 4.0.2a release, so to provide these to everybody as soon as possible we decided to make such a trade-off.

Mostly all the code changes should in these point-releases should barely effect the docs, but this fix (making Ext.core.DomHelper simply an alias of Ext.DomHelper) turned out to have a larger effect (the Ext.DomHelper is missing in 4.0.2a).

Sorry for the inconvenience.

Nickname
17 Jul 2011, 6:51 AM
Thanks for the feedback.
Maybe it would be better to explain this in the Docs? Title and Docs IndexPage says "4.0.2a API Documentation".

18 Jul 2011, 10:29 AM
The load listener for Ext.data.TreeStore doesn't override Ext.data.AbstractStore, but it does pass in different parameters. According to AbstractStore, here are the parameters it should be passing:

( Ext.data.Store this, [Ext.data.Model] records, Boolean successful, Object options )

If you look at line 53444, it is actually passing

( Ext.data.Store this, Ext.data.Model rootNode, [Ext.data.Model] records, Boolean successful)

renku
18 Jul 2011, 10:34 AM
Thanks for reporting. It's been fixed now internally.

Also, all the other issues in this thread have been fixed or otherwise noted.

Thanks to everybody for taking the time to report.

m4dc4p
18 Jul 2011, 11:04 AM
The onValidDrop function, defined in Ext.dd.DragSource, has the tag "onInvalidDrop" associated with it. This makes the function not show up in the API docs.

Looking at http://docs.sencha.com/ext-js/4-0/source/DragSource.html, you can see how onValidDrop has the wrong tags associated with it:



/**
* An empty function by default, but provided so that you can perform a custom action
* after a valid drop has occurred by providing an implementation.
...
* @method afterInvalidDrop
*/
this.afterValidDrop(target, e, id);

SebTardif
20 Jul 2011, 10:34 AM
This is not true ->

This method is not affected by the {@link #closeAction} setting which
* only affects the action triggered when clicking the {@link #closable 'close' tool in the header}


/**
* <p>Closes the Panel. By default, this method, removes it from the DOM, {@link Ext.Component#destroy destroy}s
* the Panel object and all its descendant Components. The {@link #beforeclose beforeclose}
* event is fired before the close happens and will cancel the close action if it returns false.<p>
* <p><b>Note:</b> This method is not affected by the {@link #closeAction} setting which
* only affects the action triggered when clicking the {@link #closable 'close' tool in the header}.
* To hide the Panel without destroying it, call {@link #hide}.</p>
*/
close: function() {
if (this.fireEvent('beforeclose', this) !== false) {
this.doClose();
}
},

// private
doClose: function() {
this.fireEvent('close', this);
this[this.closeAction]();
},

cnelissen
20 Jul 2011, 3:38 PM
In Ext.view.View (extended from Ext.view.AbstractView), for the config property deferEmptyText, it does not specify which is the default.

It currently reads:

deferEmptyText : Boolean
True to defer emptyText being applied until the store's first load

It should read something like:

deferEmptyText : Boolean
True to defer emptyText being applied until the store's first load. Defaults to true.

edspencer
20 Jul 2011, 3:40 PM
In Ext.view.View (extended from Ext.view.AbstractView), for the config property deferEmptyText, it does not specify which is the default.

It currently reads:

deferEmptyText : Boolean
True to defer emptyText being applied until the store's first load

It should read something like:

deferEmptyText : Boolean
True to defer emptyText being applied until the store's first load. Defaults to true.

Done, thanks

ligaard
21 Jul 2011, 12:26 AM
In http://docs.sencha.com/ext-js/4-0/#/api/Ext.Loader-cfg-disableCaching a dot i missing before 'Defaults to true'

tiger.seo
21 Jul 2011, 8:54 AM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.view.View



var imageTpl = new Ext.XTemplate(
'<tpl for=".">',
'<div style="thumb-wrap">',
'<img src="{src}" />',
'<br/><span>{caption}</span>',
'</div>',
'</tpl>'
);


'<div style="thumb-wrap">',
should be:
'<div class="thumb-wrap">',

burnnat
21 Jul 2011, 9:45 AM
Under the "renderer" config option of Ext.grid.column.Column, the following function arguments are listed:


The following parameters are passed to the renderer function:


value : Mixed - The data value for the current cell
metaData : Object - A collection of metadata about the current cell; can be used or modified by the renderer. Recognized properties are: tdCls, tdAttr, and style.
record : Ext.data.Model (http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.Model) - The record for the current row
colIndex : Number - The index of the current column
store : Ext.data.Store (http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.Store) - The data store
view : Ext.view.View (http://docs.sencha.com/ext-js/4-0/#/api/Ext.view.View) - The current view

However, there is a missing argument: a "rowIndex" argument should be included between "record" and "colIndex". (See Ext.grid.header.Container.prepareData() for the place where the renderer function is called.)

chinabuffet
21 Jul 2011, 10:00 AM
The usage of Ext.form.Labelable is different than it is documented, see the following thread: http://www.sencha.com/forum/showthread.php?140886-Usage-of-Ext.form.Labelable

pbb72
24 Jul 2011, 6:50 AM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.app.Application has two links to the

pbb72
24 Jul 2011, 7:02 AM
Not sure if this counts as a API Documentation Content bug, but it's definitely a documentation bug.

The Ext JS download page (http://www.sencha.com/products/extjs/download/ext-js-4.0.2a/) points to the

nohuhu
25 Jul 2011, 8:03 AM
There is no mention of Component layouts neither in online Docs nor in downloadable copy, but there is a whole Ext.layout.component.* namespace with lots of classes in extjs/src. Obviously all this stuff shouldn't go undocumented.

nhoward
25 Jul 2011, 9:00 AM
It seems that when you click the link for fieldSubTpl in any of the classes inheriting from Ext.form.field.Base, it will link to Ext.form.field.Base's own definition of fieldSubTpl instead of the class' definition.

tiger.seo
25 Jul 2011, 12:33 PM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.EventManager-method-addListener

options : Object(optional) An object containing handler configuration properties. This may contain any of the following properties:
There is no mention about freezeEvent boolean option

burnnat
25 Jul 2011, 1:52 PM
There is no mention of Component layouts neither in online Docs nor in downloadable copy, but there is a whole Ext.layout.component.* namespace with lots of classes in extjs/src. Obviously all this stuff shouldn't go undocumented.

Those classes are all marked as @private, so it makes sense to leave them out of the documentation app, since (being private) they're not technically part of the API.

ligaard
27 Jul 2011, 11:32 PM
Steps to reproduce:
1) Go to http://docs.sencha.com/ext-js/4-0/#/api/Ext.layout.container.Column
2) Note that the first screenshot with the heading "Column Layout - Percentage Only" does not have the lightgrey background behind it, despite the other screenshot in the example usage does.

My suggestion for a fix, would be to have two lightgrey boxes. Each box should contain both its screenshot illustration and the example code.

ligaard
28 Jul 2011, 3:26 AM
The documentation for treeview[1] does not explain what it is to be used for. It would be great if the documentation for treeview was expanded with a short motivational text explaining when to use and not to use treeview; preferably also with a note contrasting treeview to treepanel[2]. A screenshot and a short usage example of treeview would also be much appreciated.

What I am hoping for is something what is already in the docs for treepanel[2].

[1] http://docs.sencha.com/ext-js/4-0/#/api/Ext.tree.View
[2] http://docs.sencha.com/ext-js/4-0/#/api/Ext.tree.Panel

ligaard
28 Jul 2011, 5:08 AM
In the documentation for Ext.panel.table's viewConfig option[1], it is stated that Ext.tree.Panel sets it's viewType to 'treeview'. In the code for Ext.tree.Panel one can see that it 'requires' Ext.tree.view. So a minimal documentation of Ext.tree.View, would state that it is used by Ext.tree.Panel. If Ext.tree.View has other uses, then describing those would be a great help.

[1] http://docs.sencha.com/ext-js/4-0/#/api/Ext.panel.Table-cfg-viewType

mberrie
28 Jul 2011, 6:13 AM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.container.Viewport

The docs are not clearly mentioning that Viewport *always* renders to the document body. The example (probably copy/paste from Container docs) configure the Viewport with 'renderTo: Ext.getBody()' which is absolute nonsense.

Suggested changes (in red):



A specialized container representing the viewable application area (the browser viewport).
The Viewport always renders itself to the document body (any 'renderTo' config property will be ignored), and automatically sizes itself to the size of the browser viewport and manages window resizing. There may only be one Viewport created in a page.



Also, override the docs for the renderTo config that are inherited from Container.



Viewport does not support the renderTo config property. A Viewport always renders itself to the document body.


Maybe a hint to using a Container instead if the application should load into a specific DOM element could help beginners.

A reference to the MVC docs and autoCreateViewport wouldn't be a bad idea either.

ligaard
29 Jul 2011, 5:13 AM
When I search the manual, there is no mention of Ext.data.NodeStore. Nodestore is used by Ext.view.Tree. The NodeStore.js file has rudimentary doc comments in it, but somehow it does not get included in the manual.

NB: This issue might be an issue in jsduck, and in that case this issue should be moved to the thread about the documentation system.

burnnat
29 Jul 2011, 6:00 AM
When I search the manual, there is no mention of Ext.data.NodeStore. Nodestore is used by Ext.view.Tree. The NodeStore.js file has rudimentary doc comments in it, but somehow it does not get included in the manual.
In NodeStore.js, I see this:

/**
* @class Ext.data.NodeStore
* @extends Ext.data.AbstractStore
* Node Store
* @ignore
*/Note the @ignore tag - it would seem the class is being excluded intentionally, not through a bug.

Hemlock
29 Jul 2011, 11:31 AM
AbstractManager.all is not a Ext.util.MixedCollection it's a Ext.util.HashMap.

ligaard
31 Jul 2011, 11:56 PM
I needed to have a context menu show where the cursor is on right clicking. I looked the docs for Ext.menu.Menu and found only show() and showBy() (http://docs.sencha.com/ext-js/4-0/#/api/Ext.menu.Menu-method-show).

In another forum thread (http://www.sencha.com/forum/showthread.php?133773-Gridpanel-Contextmenu-right-click-menu&p=603180&viewfull=1#post603180) I see a mention of a showAt() method, which is exactly what I need.

So to save others in the same situation it would be great to get documentation for the showAt() method.

The showAt() method available on Ext.menu.Menu, is defined in (and inhereted from) Ext.Component (http://docs.sencha.com/ext-js/4-0/source/Component.html)

Since adding a contextmenu, and placing it by a cursor, a good example to accompany showAt() would be a code fragment illustrating how to do that, using an eventlistener and the getXY() method on the event. Something like the following could be the example:


listeners: {
itemcontextmenu: function (view, record, item, index, event, options) {
Ext.create('Ext.menu.Menu', {
width: 100,
height: 100,
margin: '0 0 10 0',
floating: true, // usually you want this set to True (default)
items: [{
text: 'regular item 1'
},{
text: 'regular item 2'
},{
text: 'regular item 3'
}]
}).showAt(event.getXY());
}

renku
1 Aug 2011, 1:34 AM
Thank you all for nice and clear bug reports.

All the above issues should be fixed by now.

ligaard
1 Aug 2011, 3:26 AM
1) Goto http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.column.Column

2a) 'container' should be 'contain' in the sentence 'If the columns configuration is specified, this column will become a column group and can container other columns inside'.

2b) In the code example 'deparments' should be 'departments'. Also the screenshot should be updated, since its 'department' column header is also missing the 't'.

Wilkins
1 Aug 2011, 10:21 AM
Replication:

Go to http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.reader.Xml
Notice that Record is not marked required.


According to the code in debug a record is required:



/**
* @private
* We're just preparing the data for the superclass by pulling out the record nodes we want
* @param {Element} root The XML root node
* @return {Array} The records
*/
extractData: function(root) {
var recordName = this.record;

//<debug>
if (!recordName) {
Ext.Error.raise('Record is a required parameter');
}
//</debug>

if (recordName != root.nodeName) {
root = Ext.DomQuery.select(recordName, root);
} else {
root = [root];
}
return this.callParent([root]);
},

tiger.seo
1 Aug 2011, 11:03 AM
Thank you all for nice and clear bug reports.

All the above issues should be fixed by now.
Hi, renku.
None of bugs reported by me are fixed:
http://www.sencha.com/forum/showthread.php?135037-API-Documentation-Content-Bugs&p=628472&viewfull=1#post628472
http://www.sencha.com/forum/showthread.php?135037-API-Documentation-Content-Bugs&p=629640&viewfull=1#post629640

nick_p
1 Aug 2011, 12:55 PM
The bugs are fixed internally and will be reflected on the live documentation site when we do a new build. We're planning a 'build date' for the live docs so you can see when they were last updated.

Jasel_ExtJS
2 Aug 2011, 7:26 AM
ExtJS 4.0.2a API documentation: Ext.Component

The xtype "spacer" does not exist. Using this xtype results in a namespace error. "tbspacer" exists lower in the list under "Toolbar components." The class listed for both "spacer" and "tbspacer" reflect Ext.toolbar.Spacer and both links rightly take you to the Ext.toolbar.Spacer documentation which specifies an xtype of "tbspacer."

mberrie
3 Aug 2011, 10:48 PM
The docs for Store#loadData

should be more explicit about its behavior, I found several users stumble over this in the forums.
The class docs for Store actually do that pretty well, maybe copy/paste with minor modifications?

Docs for loadData (not so good)


/**
* Loads an array of data straight into the Store
* @param {Array} data Array of data to load. Any non-model instances will be cast into model instances first
* @param {Boolean} append True to add the records to the existing records in the store, false to remove the old ones first
*/


From the class docs (good)


Loading inline data using the method above is great if the data is in the correct format already (e.g. it doesn't need to be processed by a reader). If your inline data requires processing to decode the data structure, use a MemoryProxy instead (see the MemoryProxy docs for an example).
Additional data can also be loaded locally using add.


Discussions on the forum related to this (from the last month!):
http://www.sencha.com/forum/showthread.php?141102-Column-Mapping-not-recognized-in-4.0.2a&highlight=loadData
http://www.sencha.com/forum/showthread.php?138346-calling-loadData-seems-to-change-structure-of-store&highlight=loadData
http://www.sencha.com/forum/showthread.php?142240-mapping-issues-with-Ext.data.Model-and-nested-JSON-Data-for-ExtJS-4-Grid-Store&highlight=loadData
http://www.sencha.com/forum/showthread.php?142661-4.x-mapping-feature-not-used-when-writing-(different-from-Ext-3)&p=636365&viewfull=1#post636365 (http://www.sencha.com/forum/showthread.php?142778-Radar-labels-work-inconsistently&p=633769#post633769)

dusek
4 Aug 2011, 1:07 AM
Ext.app.Controller: http://docs.sencha.com/ext-js/4-0/#/api/Ext.app.Controller

Searching for the following properties/configs using the "Find class members..." returns no results: stores, models, views.

ValterBorges
4 Aug 2011, 8:07 AM
The write event in Ext.data.Store is not documented..

both write and datachanged get called if successfull return from proxywrite.

Please clarify the documentation for datachanged should state that it fires upon a successful return from the proxy, and otherwise to look at proxy exception. Currently it is written so that it can be interpreted that if the store is updated even if it's not synched it will fire.

Qtx
5 Aug 2011, 1:42 AM
4.0.2
Wrong parameter description of the event TreeStore.load

Documentation says:

load( Ext.data.Store this, Array records, Boolean successful, Object options )
Fires whenever the store reads data from a remote data source.

Parameters
this : Ext.data.Store
records : Array
An array of records
successful : Boolean
True if the operation was successful.
options : Object
The options object passed to Ext.util.Observable.addListener.

I noticed that the parameter successful contains an array and looked into code of the TreeStore. The following parameters are passed to the event handler

TreeStore.js, line 510, method onProxyLoad

me.fireEvent('load', me, operation.node, records, successful);

That means that the event parameters should be:

load( Ext.data.Store this, Model node, Array records, Boolean successful)

dpaquin
5 Aug 2011, 9:49 AM
For the Ext.form.field.File entry, it should mention that the server response content type must be text/html and not application/json (as described here http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.Basic-method-hasUpload). I used the example from the Ext.form.field.File entry but couldn't get the response working properly (someone on the forum pointed out the Ext.form.Basic page with the explanation as to why).

ligaard
8 Aug 2011, 12:43 AM
It would be great to have a mention on how to enable the tree view drag drop plugin described at http://docs.sencha.com/ext-js/4-0/#/api/Ext.tree.plugin.TreeViewDragDrop

Something like this: "To add the tree view drag drop plugin to a tree panel, add the following to the configuration of the tree view panel:

viewConfig: { plugins: { ptype: 'treeviewdragdrop' }
}

Note that you have to add the plugin to the 'viewConfig' ('view' config), and not directly as a plugin on the tree view panel; doing that, would apply the treeviewdragdrop plugin to the panel, not the panels view."

This can certainly be improved upon, since I only found out that this works, but not whether it is the best/endorsed way of doing it. Please do improve :-)

Qtx
8 Aug 2011, 12:47 AM
Since there is no more explicit object TreeNode, but only node interface, I did not found the description how to customize the tree nodes over the data sent from server. In the example, I saw the properties

iconCls
icon
expanded

PS
The icon seems not to work, only iconCls works.

ligaard
8 Aug 2011, 3:28 AM
I was trying to change the icons on a tree view and the doc did not help. I delved into the forum, and found this på http://www.sencha.com/forum/showthread.php?139845-4.0.2-Setting-the-icon-in-a-tree-node&p=626064&viewfull=1#post626064

I tried it out, and it seems to work, so I would suggest mentioning it in the docs. Maybe in the NodeInterface docs, http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.NodeInterface, and tree view; I am not sure exactly where it would be most appropriate.

Qtx
8 Aug 2011, 3:44 AM
Interesting link. I faced the problem with icon too. There is written that icon is just and option and must be declared explicitly in the model. But, it applies for the iconCls also, however it works with iconCls if you just put it into the response form the server. They should to do the same with icon, so that it works like iconCls works. I looked into the code of the Ext.tree.Column, method initComponent, it seems to be a bug.

sskow200
8 Aug 2011, 10:56 AM
The api refers to a 'saveBuffer' configuration in Ext.state.Stateful. However, when you look at the actual code you can see that the config is actually being referred to as 'saveDelay'.

ligaard
9 Aug 2011, 2:06 AM
I have a treepanel, with a treecolumn. I would like to subscribe to the expand and beforeexpand events of the tree. I cannot see how to subscribe to those events, so please provide a working example in the docs for NodeInterface (http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.NodeInterface) and TreePanel (http://docs.sencha.com/ext-js/4-0/#/api/Ext.tree.Panel); I mention treepanel also, because that's where I tried looking for it, when I couldn't finde documentation for tree column (where is that?).

Qtx
9 Aug 2011, 2:12 AM
Under the link to the TreePanel doc there are events

beforeitemexpand

beforeitemcollapse


Ext.create('Ext.tree.Panel', {
...
listeners: {
beforeitemcollapse: function(node)
{
},

beforeitemexpand: function(node)
{
}
}
});

ligaard
9 Aug 2011, 2:27 AM
I am using icon and it works. Check that the path is correct with e.g. Firebug. I am doing as shown below; I the comment line is shown that you can also convert the icon before putting it in the store (see the 'Types and conversion' heading in the doc for Ext.data.Field (http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.Field):

{
name: 'icon',
type: 'string',
// convert: function (value, record) { return '/myApp/icons/movies.png' },
defaultValue: '/myApp/icons/folder.png',
persist: false
}

PS: If you continue having problems using 'icon', then try asking in the general help forum, so we can keep this thread for the documentation itself.

ligaard
9 Aug 2011, 2:37 AM
I cannot find the documentation for Ext.tree.Column. I was looking for how to listen to the expand and beforeexpand events of NodeInterface, and expected that I could read how in the documentation for tree column.

When adding documentation for tree column, please mention it and link to it from the 'Convenience Subclasses' in Ext.grid.column.Column (http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.column.Column).

Bonus: I noticed in the 'Sub Classes' menu in Ext.grid.column.Column, that it links to a RowNumberer subclass, which is not mentioned in the 'Convenience Subclasses'. It ought to be mentioned there too. Furthermore, the example given in the documentation for RowNumberer (http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.RowNumberer) is not using xtype, which the other column subclasses use in their examples; maybe that should be aligned..?

bioinfo
9 Aug 2011, 6:15 AM
http://docs.sencha.com/ext-js/4-0/#/api/Ext.view.View



var imageTpl = new Ext.XTemplate(
'<tpl for=".">',
'<div style="thumb-wrap">',
'<img src="{src}" />',
'<br/><span>{caption}</span>',
'</div>',
'</tpl>'
);


'<div style="thumb-wrap">',
should be:
'<div class="thumb-wrap">',

Fix it please.
If you try to add a listener to the view like itemclick, will not work because of the itemSelector of the view does not match with the css class of the template.

Berzzzebub
9 Aug 2011, 7:33 AM
On ComboBox examples page in "Custom Item Templates" example there is such code:

// ComboBox with a custom item template
var customTplCombo = Ext.create('Ext.form.field.ComboBox', {
fieldLabel: 'Select a single state',
renderTo: 'customTplCombo',
displayField: 'name',
width: 500,
labelWidth: 130,
store: store,
queryMode: 'local',
getInnerTpl: function() {
return '<div data-qtip="{name}. {slogan}">{name} ({abbr})</div>';
}

});
But should be:

// ComboBox with a custom item template
var customTplCombo = Ext.create('Ext.form.field.ComboBox', {
fieldLabel: 'Select a single state',
renderTo: 'customTplCombo',
displayField: 'name',
width: 320,
labelWidth: 130,
store: store,
queryMode: 'local',
listConfig: {
getInnerTpl: function() {
return '<div data-qtip="{name}. {slogan}">{name} ({abbr})</div>';
}
}
});

ValterBorges
10 Aug 2011, 11:04 AM
The following is incorrect. Firebug shows the record object is part of the editor object and not the event.
some of the others don't exists also or exist elsewhere.


beforeedit( Ext.grid.plugin.Editing editor, Object e, Object options )





Fires before cell editing is triggered. Return false from event handler to stop the editing.

Parameters
•editor : Ext.grid.plugin.Editing


•e : Object

An edit event with the following properties:
•grid - The grid
•record - The record being edited
•field - The field name being edited
•value - The value for the field being edited.
•row - The grid table row
•column - The grid Column defining the column that is being edited.
•rowIdx - The row index that is being edited
•colIdx - The column index that is being edited
•cancel - Set this to true to cancel the edit or return false from your handler.

ValterBorges
11 Aug 2011, 8:42 AM
The above is also inconsistent with the other listeners, sometimes the objects are attached to the editor, in the others on the event.

At this point either the doc is wrong or the code is wrong.

mberrie
11 Aug 2011, 9:47 PM
/**
* @cfg {String} root <b>Required</b>. The name of the property
* which contains the Array of row objects. Defaults to <tt>undefined</tt>.
* An exception will be thrown if the root property is undefined. The data
* packet value for this property should be an empty array to clear the data
* or show no data.
*/
root: '',

This is confusing. As I understand it, the config property is not required because it defaults to an empty string anyway. Will it fail if you assign 'undefined'?

Does 'Defaults to undefined' refer to the empty string here (because in JS empty string and undefined are falsy values).

And is this sentence talking about the config property, or the root node in the data packet?

'An exception will be thrown if the root property is undefined. '

renku
12 Aug 2011, 6:15 AM
On ComboBox examples page in "Custom Item Templates" example there is such code ...

Sorry, but could you provide a link to the page you are referring. I'm unable to locate which example you mean.

Berzzzebub
12 Aug 2011, 6:23 AM
Sorry, but could you provide a link to the page you are referring. I'm unable to locate which example you mean.Custom Item Templates example code at http://dev.sencha.com/deploy/ext-4.0.2a/examples/form/combos.html

renku
12 Aug 2011, 6:51 AM
Thanks.

This issue and all other bugs reported in this thread so far have now been fixed internally.

skirtle
15 Aug 2011, 10:14 AM
The config option defaults for Container. This line appears in the docs for both ExtJS 3 and ExtJS 4:


If an added item is a config object, and not an instantiated Component, then the default properties are unconditionally applied. If the added item is an instantiated Component, then the default properties are applied conditionally so as not to override existing properties in the item.

It is then followed by a usage example which shows the conditionality being applied the other way round.

In ExtJS 3 it is the example that is correct and the paragraph I quoted above that is incorrect.

In ExtJS 4 it's hard to tell what is correct as the actual behaviour differs from both the description and the example. The internal code for applying defaults looks a bit like this:


applyDefaults : function(config) {
...

if (...) {
...
Ext.applyIf(config, defaults);
} else if (!config.isComponent) {
Ext.applyIf(config, defaults);
} else {
Ext.applyIf(config, defaults);
}

...
},

The defaults are applied conditionally in all cases. Whether it is the docs or the code that is wrong isn't clear. If the code is functionally correct it should, at least, have someone simplify it down because repeating itself 3 times like that is a little farcical.

skirtle
15 Aug 2011, 10:29 AM
Ext.util.Point and Ext.util.Region.

The docs for the constructor of Ext.util.Point are copied from Ext.util.Region. However, a point only takes 2 arguments, not 4.

The following methods are all missing method parameter names, resulting in them taking the first word from the description (usually 'The'):


copyFrom
equals
isWithin
roundedEquals
translate
translateBy


There are also some methods with void return types that actually return something. Perhaps some of these were left undocumented intentionally but I've listed them all anyway:


adjust
constrainTo
contains
fromEvent
union

renku
15 Aug 2011, 4:57 PM
Thanks skirtle. Fixed internally.

ligaard
17 Aug 2011, 12:07 AM
It would be nice if the order of event firing was documented each widget/component. That is, for a given event: Which event fired immediately before and which event fires immediately after.

There is the overall event life cycle, e.g. 'beforerender' happens before 'render' and 'keydown' is followed by 'keypress' which is followed by 'keyup'. But widgets introduce their own events: Documenting where those events fit into the event ordering would be helpful.

As an example, consider combobox. Say I wish to stop the auto-complete drop-down from showing if there are no matches. Which event should I use? Probably not 'beforequery', but maybe 'expand'..? If this was documented per widget, I wouldn't have to try, guess and/or read the source code.

An added benefit of being explicit about the order of events, is that they won't haphazardly be reordered (conciously changing the order of events in a later release is ok if logged in release notes).

wiznia
18 Aug 2011, 7:55 AM
In the Ext.data.BelongsToAssociations, there's an example that says:


associations: { type: 'belongsTo', model: 'Category' }


The associations must be an array if you supply an object it doesn't work neither throws an error.
I think the hasManyAssociation has the same typo.

LesJ
18 Aug 2011, 8:10 AM
The ComboBox.setValue() doc lists only one param (value).

This method accepts two params. The 2nd param (doSelect) is not documented.



setValue: function(value, doSelect)

http://docs.sencha.com/ext-js/4-0/source/ComboBox.html#Ext-form-field-ComboBox-method-setValue

edspencer
18 Aug 2011, 8:12 AM
In the Ext.data.BelongsToAssociations, there's an example that says:


associations: { type: 'belongsTo', model: 'Category' }


The associations must be an array if you supply an object it doesn't work neither throws an error.
I think the hasManyAssociation has the same typo.

Hmm are you sure? That should be a valid supported syntax

mberrie
18 Aug 2011, 8:42 AM
Hmm are you sure? That should be a valid supported syntax
Ed,

I helped out wiznia on another thread.

I am pretty sure this is not working, at least in 4.0.2a. See this test case:



Ext.define('Category', {
extend: 'Ext.data.Model',
fields: [
{ name: 'id', type: 'int' },
{ name: 'name', type: 'string' }
] });

Ext.define('Product', {
extend: 'Ext.data.Model',
fields: [
{ name: 'id', type: 'int' },
{ name: 'category_id', type: 'int' },
{ name: 'name', type: 'string' }
],
associations: { type: 'belongsTo', model: 'Category' } // FAIL!
// associations: [{ type: 'belongsTo', model: 'Category' }] // OK
// belongsTo: {type: 'belongsTo', model: 'Category'} // OK
// belongsTo: 'Category' // OK

});


Ext.onReady(function() {
console.log(Product.prototype.getCategory); //undefined
});



Was there a change after 4.0.2a?


4.0.2a - BelongsToAssociation



// we can use the belongsTo shortcut on the model to create a belongsTo association
belongsTo: {type: 'belongsTo', model: 'Category'}



Online Docs



// we can use the belongsTo shortcut on the model to create a belongsTo association
associations: { type: 'belongsTo', model: 'Category' }

19 Aug 2011, 8:06 AM
At TreePanel selectionchange event, the selectionchange event says:

selectionchange( Ext.view.View this, Array selections, Object options )
When it should say

selectionchange( Ext.selection.TreeModel thisTreePanelSelectionModel, Array selections, Object options)

And by the way... there's no Ext.selection.TreeModel documentation, I got that by doing Ext.getClassName(selectionchangeFirstParam)

burnnat
19 Aug 2011, 8:50 AM
The documentation for Ext.merge (http://docs.sencha.com/ext-js/4-0/#/api/Ext-method-merge) is missing an alias declaration, something like "@alias Ext.Object#merge". As it is, the documentation lists no parameters and a return type of void, which is obviously wrong.

crysfel
19 Aug 2011, 9:45 AM
At Ext.Class.setDefaultPreprocessorPosition event, the code example is:



Ext.Class.registerPreprocessor('debug', function(cls, data, fn) {
// Your code here

if (fn) {
fn.call(this, cls, data);
}
}).insertDefaultPreprocessor('debug', 'last');


When it should be:


Ext.Class.registerPreprocessor('debug', function(cls, data, fn) {
// Your code here

if (fn) {
fn.call(this, cls, data);
}
}).setDefaultPreprocessorPosition('debug', 'last');


There's a type O.o

fishbone
19 Aug 2011, 10:03 AM
The xtype overview as seen here: http://docs.sencha.com/ext-js/4-0/#/api/Ext.Component says that PagingToolbar's xtype is 'paging', but the correct xtype is 'pagingtoolbar'

burnnat
22 Aug 2011, 6:44 AM
In the documentation for Ext.Object.getKey() (http://docs.sencha.com/ext-js/4-0/#/api/Ext.Object-method-getKey), the following example is given:


var person = {
name: 'Jacky',
loves: 'food'
};
alert(Ext.Object.getKey(sencha, 'loves')); // alerts 'food'

This is just plain wrong. Here's what the example should look like:


var person = {
name: 'Jacky',
loves: 'food'
};
alert(Ext.Object.getKey(person, 'food')); // alerts 'loves'

Or better yet, just rewrite it entirely to something more consistent:


var food = {
vegetable: 'carrot',
grain: 'wheat',
fruit: 'apple'
};
alert(Ext.Object.getKey(food, 'apple')); // alerts 'fruit'

wiznia
22 Aug 2011, 7:55 AM
edspencer, I'm pretty sure. version 4.0.2a

Vasiliy Faronov
23 Aug 2011, 8:20 AM
The new Sencha Docs list 76 events for `Ext.panel.Table`, whereas the docs that ship with the 4.0.2a package only list 69. In particular, the new docs mention the `viewready` event, which apparently doesn’t exist (at least rgrep doesn’t find any mention of `viewready` in the 4.0.2a package).

EDIT: Ah, it’s probably from 4.0.3—4.0.5. I wasn’t aware of them. The docs app should have a feature for selecting the latest publicly available version.

BillHubbard
23 Aug 2011, 10:34 AM
The description for Ext.panel.Panel's childEls config property makes no sense to me. This needs some clarification.

BillHubbard
23 Aug 2011, 10:38 AM
Documentation for Ext.widget is misleading as it only shows a name parameter, but actually supports the same functionality as Ext.create.

ValterBorges
24 Aug 2011, 9:26 AM
Would it make sense to call the Object options to syncRecords.

I know that calling it records may confuse people thinking it's a model/record, but now it's confusing with options, options.

beforesync( Object options, Object eOpts )

options : Object
Hash of all records to be synchronized, broken down into create, update and destroy
eOpts : Object
The options object passed to Ext.util.Observable.addListener.

chinabuffet
24 Aug 2011, 5:19 PM
Why is Ext.window.Window marked as private now?

edspencer
24 Aug 2011, 5:38 PM
Why is Ext.window.Window marked as private now?

It's a mistake - we corrected it earlier today so it'll be fixed in the next docs release

Arshak
25 Aug 2011, 1:20 AM
In API documentation when pressing Preview button the following error occur:
For FF - TypeError: a.parentNode is null
For Chrome: TypeError: Cannot call method 'insertBefore' of null
For IE: I don't have any chance to preview the result of code

renku
25 Aug 2011, 10:59 AM
@Arshak: please be more specific. Which OS? Which version of a browser? I'm unable to reproduce it with FF 6 and Chrome 13 on OSX 10.6.

For IE the live examples are currently disabled - until we get the performance to a reasonable level. Sorry about that.

LesJ
25 Aug 2011, 11:23 AM
This is a doc problem:

[4.0.2] [3.4] Ext.Element.move() - no return value

http://www.sencha.com/forum/showthread.php?142310-4.0.2-3.4-Ext.Element.move%28%29-no-return-value

rednix
25 Aug 2011, 11:44 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.app.Application

In the text
The Application will load each of the specified Controllers using the pathing conventions laid out in the application architecture guide - in this case expecting the controllers to reside in app/controller/Posts.js and app/controller/Comments.js. the link to the application architecture guide is wrong (pointing to http://docs.sencha.com/ext-js/guide/application_architecture) and leads to an error page. Further down the second link is correct: http://docs.sencha.com/ext-js/4-0/#/guide/application_architecture

Arshak
25 Aug 2011, 10:29 PM
@renku
OS: Windows 7

Browser: Firefox 6 and Chrome 13.0.782.215 m

It seems to appear only for MessageBox class

Lod
26 Aug 2011, 11:23 PM
Tested on Windows XP with Chrome 10, Windows 8, Firefox 4
Tested on Ubuntu with Chrome 13, Firefox 3.6

I found two problems with the scatter and line plots in the Extjs 4.0 API doc:

1. The values of the different series (data1 etc.) on the different metrics do not align on the metrics ticks in the chart.
2. The values displayed are not correct. On the chart the max value is 4 where in the series it is 14.

rijkvanwel
29 Aug 2011, 5:52 AM
There's a bug in the first example for JsonStore (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.JsonStore):



autoDestroy: true,
storeId: 'myStore'
proxy: {
is missing a comma;


autoDestroy: true,
storeId: 'myStore',
proxy: {

cadror
29 Aug 2011, 10:24 AM
Ext.form.field.ComboBox's API documentation does not document the queryCaching configuration option, which allows the developer to force the combobox to always query the server for auto-completion results instead of using locally cached ones.

It wasn't obvious how to enable this behavior, and I had to read the source code to figure it out in the end. So please document this option in the API documentation. Thank you!

eliotik
31 Aug 2011, 12:51 AM
when you open info about any form component and in filter type "getvalue" or "setvalue" you will always get as additional info about "getName"
27771

31 Aug 2011, 9:11 AM
hasMany and belongsTo require the fully qualified classname to be specified.
They do not work (they silently do nothing) if a bare/leaf classname is used.
For example:
belongsTo: 'model.User' // works ok

belongsTo: 'User' // silently does not work

This is confusing, because models are registered with a controller using the leaf name only,
and the controller automatically qualifies the name, e.g.
Ext.define('controller.Foo', {
extend: 'Ext.app.Controller',
models: [
'User',
'Post'
]

Every example showing usage of belongsTo and hasMany uses an unqualified name.
This is at best misleading, given the fact that best practices dictate that models should be placed within the 'model' subdirectory/package

Please update the documentation to clarify this important detail.

zombeerose
31 Aug 2011, 11:43 AM
The code sample in the Ext.chart.series.Column page contains a double definition of the axes config.

LesJ
31 Aug 2011, 11:58 AM
I don't see that these newly added (in 4.0.6) methods are documented, but it's nice to have them =P~

hexawing
31 Aug 2011, 10:30 PM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.FieldContainer-cfg-layout


Specify as an Object

Example usage:
layout: { type: 'vbox', align: 'left' }






Specify as a String

Example usage:
layout: { type: 'vbox', padding: '5', align: 'left' }



I cannot tell the different between them...

edspencer
31 Aug 2011, 10:33 PM
@hexawing you're right, the second should just look like this:



layout: 'vbox'

Ant1105
1 Sep 2011, 7:28 AM
In the docs, it states the events "cardswitch" and "beforecardswitch". In the code inside the setActiveTab method, the events are actually "tabchange" and "beforetabchange".



setActiveTab: function(card) {
var me = this,
previous;

card = me.getComponent(card);
if (card) {
previous = me.getActiveTab();

if (previous && previous !== card && me.fireEvent('beforetabchange', me, card, previous) === false) {
return false;
}

me.tabBar.setActiveTab(card.tab);
me.activeTab = card;
if (me.rendered) {
me.layout.setActiveItem(card);
}

if (previous && previous !== card) {
me.fireEvent('tabchange', me, card, previous);
}
}
},

burnnat
2 Sep 2011, 6:50 AM
The documentation for Ext.toolbar.Toolbar (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.toolbar.Toolbar) contains the following table of special toolbar components:



Shortcut
xtype
Class


'->'

'tbspacer'
Ext.toolbar.Fill


'-'
'tbseparator'
Ext.toolbar.Separator


' '
'tbspacer'
Ext.toolbar.Spacer


As you can see, the xtype 'tbspacer' is duplicated, which is incorrect - the xtype for Ext.toolbar.Fill should be 'tbfill'.

yakovsh
2 Sep 2011, 9:26 AM
In Ext.chart.axis.NumericAxis, there is a scale option that allows values of 'linear' or 'logarithmic'. However, it has never been implemented in code as discussed here:

http://www.sencha.com/forum/showthread.php?137113-scale-quot-logarithmic-quot-isn-t-implemented&highlight=scale

It needs to be either removed or implemented

flatbugz
2 Sep 2011, 11:20 AM
The following is incorrect. Firebug shows the record object is part of the editor object and not the event.
some of the others don't exists also or exist elsewhere.

beforeedit( Ext.grid.plugin.Editing editor, Object e, Object options )

Fires before cell editing is triggered. Return false from event handler to stop the editing.

Parameters
•editor : Ext.grid.plugin.Editing

•e : Object

An edit event with the following properties:
•grid - The grid
•record - The record being edited
•field - The field name being edited
•value - The value for the field being edited.
•row - The grid table row
•column - The grid Column defining the column that is being edited.
•rowIdx - The row index that is being edited
•colIdx - The column index that is being edited
•cancel - Set this to true to cancel the edit or return false from your handler.

The same applies as for the edit event. The documentation is almost identical to the above, but the application behaves as described above: the record, and other properties are attached to the first function argument, and the second function argument is actually an empty object.

Here is some edit/listener code I wrote, and the results thereof, to demonstrate what's what in the arguments based to the edit listener. My guess is the empty, second object, really represents the options, since the arguments length is only 2.


config = Ext.apply({
id: 'my_tasks_grid',
store: myTasksStore,
loadMask: false,
columns: columns,
listeners: {
edit: function() {
var editor_attrs = [];
for (var attr in arguments[0]) {
editor_attrs.push(attr);
}

console.log("Arguments Length: " + arguments.length);
console.log(Ext.encode({'editor_attrs': editor_attrs, 'context': arguments[1]}));
}
},
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
],
//etcetera



Arguments Length: 2

{"editor_attrs":["grid","record","field","value","row","column","rowIdx","colIdx","view","store"],"context":{"edit":null}}

I'm going to write code based on the fact that the attributes I need, particularly record, are actually attached to the first function argument. Hopefully the ExtJS documentation will get updated, instead of the underlying code being changed to conform to existing docs (cuz then my code will break ;)

wildfire
2 Sep 2011, 11:52 PM
In http://docs.sencha.com/ext-js/4-0/#!/example/toolbar/vertical-toolbars.html the link to vertical-toolbars.js (http://docs.sencha.com/ext-js/4-0/extjs/examples/toolbar/vertical0toolbars.js) returns:

Not Found
The requested URL /ext-js/4-0/extjs/examples/toolbar/vertical0toolbars.js was not found on this server.

Should go to http://docs.sencha.com/ext-js/4-0/extjs/examples/toolbar/vertical-toolbars.js

Cheers

Nick

dancha
4 Sep 2011, 4:53 AM
Just passing along helpful tip for the next newbie who wants to use loadData on a store.

I think maybe an example would help the next guy not trip up on what I tripped on. Not clear that you must load untagged data for it to work properly. Once I figured that out through a bit of pain, it works famously, especially for updating charts from within a function in your app rather than loading from a remote call to a server.



// data store for balance.
var aStore = Ext.create('Ext.data.Store', {
storeId:'balance',
fields:[
{name:'year',type:'int'},
{name:'balance',type:'float'}
],
data:{'items':[]}, //nothing in the store initially
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});

//create some untagged data
var someData = [];
somData.push[2011,5000];
someData.push[2012,5500];
aStore.loadData(someData);

renku
5 Sep 2011, 12:39 PM
Thanks for everybody for reporting. The issues noted so far are now again fixed internally, and should be available in the next release.

@flatbugz: The event parameters for editing plugins are a bit of a mess indeed. This has been all fixed up, making all the events behave consistently. But to avoid breaking changes in 4.0.x releases, the fix has been delayed until 4.1 release.

@dancha: Your code sample contains some obvious bugs, but I understand what you mean. Use loadData like this instead:



aStore.loadData([
{year: 2011, balance: 5000},
{year: 2012, balance: 5500}
]);

carl23934
6 Sep 2011, 6:49 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.chart.series.Line

This page shows markerCfg rather than markerConfig.

Edit: Also, the code configuration has an axis configuration that is opposite of what it should be. IE, the 'left' axis should be 'bottom' and vice versa. The 4.0.2a docs show a screenshot that is opposite of what the code would create.

Here is a screenshot:
27887

renku
6 Sep 2011, 7:41 AM
Thanks for noting carl23934. It's now fixed internally.

campersau1
7 Sep 2011, 9:44 AM
The example code is wrong in http://docs.sencha.com/ext-js/4-0/#!/api/Ext.menu.DatePicker

Wrong:


var dateMenu = Ext.create('Ext.menu.DatePicker', {
handler: function(dp, date){
Ext.Msg.alert('Date Selected', 'You choose {0}.', Ext.Date.format(date, 'M j, Y'));
}
});


Ext.create('Ext.menu.Menu', {
width: 100,
height: 90,
floating: false, // usually you want this set to True (default)
renderTo: Ext.getBody(), // usually rendered by it's containing component
items: [{
text: 'choose a date',
menu: dateMenu
},{
iconCls: 'add16',
text: 'icon item'
},{
text: 'regular item'
}]
});



Correct:


var dateMenu = Ext.create('Ext.menu.DatePicker', {
handler: function(dp, date){
Ext.Msg.alert('Date Selected', 'You choose ' + Ext.Date.format(date, 'M j, Y'));
}
});


Ext.create('Ext.menu.Menu', {
width: 100,
height: 90,
floating: false, // usually you want this set to True (default)
renderTo: Ext.getBody(), // usually rendered by it's containing component
items: [{
text: 'choose a date',
menu: dateMenu
},{
iconCls: 'add16',
text: 'icon item'
},{
text: 'regular item'
}]
});

SebTardif
7 Sep 2011, 10:09 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.layout.container.Card is wrong

It says: the only way to move from one Component to the next is by calling setActiveItem, passing the id or index of the next panel to display.

Correction: you can also pass an instance of a panel (which is more readable), see http://docs.sencha.com/ext-js/4-0/#!/api/Ext.layout.container.Card-method-getActiveItem

renku
8 Sep 2011, 4:26 AM
Thanks campersau1 and SebTardif. These issues are now fixed internally.

skirtle
8 Sep 2011, 5:16 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.AbstractComponent-cfg-xtype

The documentation for xtype is very misleading. It describes how it used to work in ExtJS 2 but it does not work this way in ExtJS 3 or 4. Many people (including some ExtJS developers I've spoken to) still believe that xtypes give them lazy rendering or lazy instantiation as described here. It doesn't.

In the example given there are 2 panels. In the first example the button is created just before the panel. In the second example it will be created by the panel's constructor. Though the timing is subtly different there isn't any real difference in the end result. It certainly does not do what is described in the docs.

I really like xtypes. It seems a shame that the real benefits aren't documented and this historical use case is still the one most people give for using them.

nick_p
8 Sep 2011, 3:45 PM
Hi skirtle,

We're updating the xtype docs which should be live in the not too distant future. Thanks for pointing out the inaccuracies

Nick

tonyx
8 Sep 2011, 7:57 PM
In the documentation, we are told

handler (http://localhost:8880/extjsdoc/docs/index.html#/api/-cfg-handler) : Function
A function called when the icon is clicked. The handler is passed the following parameters:

view : TableViewThe owning TableView.
rowIndex : NumberThe row index clicked on.
colIndex : NumberThe column index clicked on.
item : ObjectThe clicked item (or this Column if multiple items (http://localhost:8880/extjsdoc/docs/index.html#/api/Ext.grid.column.Action-property-items) were not configured).
e : EventThe click event.




However, I recently discovered that this isn't true. These are the console outputs for each of the argument to the handler function, in order.


Ext.grid.View <Soc.model.Survey> [6] { id="gridview-1032"}
<td id="ext-gen1294" class=" x-grid-cell x-grid-cell-actioncolumn-1029 x-action-col-cell x-grid-cell-last">
0
3
[Trial] Ext.EventObjectImpl {}
Object { scope=Soc.view.survey.Grid, uievent=function()}
Object {}


Clearly, the second argument is not rowIndex. I think it is actually the cell in which the icons are rendered.

slemmon
12 Sep 2011, 12:47 PM
Should parentMenu still be a config for menu/items? I don't see it any longer in the documentation, but I do see it used in the source.

hexawing
12 Sep 2011, 7:02 PM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.window.MessageBox

When viewing the examples in this page, toggle to "Preview" mode, then toggle to "Code" mode, then try to toggle to "Preview" mode again, it alerts "TypeError: a.parentNode is null" and cannot continue...

renku
14 Sep 2011, 6:35 AM
Actioncolumn handler documentation bug?
[--]
Clearly, the second argument is not rowIndex.

I tested with ext-4.0.2a and ext-4.0.6 and everything seems to work just fine for me. For example look at the live example of ActionColumn: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.column.Action

This wouldn't work if the second argument were not a rowIndex.


Should parentMenu still be a config for menu/items? I don't see it any longer in the documentation, but I do see it used in the source.

Not really a config option, but a property. Should be documented in next docs update.


http://docs.sencha.com/ext-js/4-0/#!/api/Ext.window.MessageBox

When viewing the examples in this page, toggle to "Preview" mode, then toggle to "Code" mode, then try to toggle to "Preview" mode again, it alerts "TypeError: a.parentNode is null" and cannot continue...

Yeah, something goes wrong there. For some reason using the singleton Ext.Msg breaks things, while instantiating Ext.window.MessageBox manually works just fine. Will take a closer look at this.

rex.staples
15 Sep 2011, 9:53 AM
Small typo in the Further Reading section of the Getting Started guide:

http://docs.sencha.com/ext-js/4-0/#!/guide/getting_started

4. Further Reading

Layouts and Containsers

Containers has an extra -s-.

campersau1
16 Sep 2011, 8:58 AM
The xtype is missing in Ext.form.FieldSet http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.FieldSet

renku
17 Sep 2011, 1:49 AM
@campersau1: Maybe it got fixed with the latest update, as I see the xtype clearly being present there.

campersau1
17 Sep 2011, 2:17 AM
Yep, it is fixed!
Maybe I should refresh the documentation more often! Great work!

gianmarco
20 Sep 2011, 10:18 PM
Ext.app.Controller#application is not documented, even if it is considered part of the public/protected api in the following tutorial:

http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-2

W (http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-2)hy not adding a getApplication method to the controller?

zombeerose
21 Sep 2011, 9:35 AM
The description of events in Ext.grid.plugin.Editing/CellEditing/RowEditing differs from the implementation.

Events: beforeedit and edit

Params based on docs:
@param {Ext.grid.plugin.Editing} editor
@param {Object} e

Code discrepancies (across all 3 files):


me.fireEvent('beforeedit', context)
...
me.fireEvent('edit', me.context);


I would vote for the implementation to be as it is doc'd, which passes the Ext.grid.plugin.Editing reference as the 1st param to listeners.

Also, the canceledit event lists the param as a grid, but it should be the context object. I would also like to see the addition of the plugin ref passed as the 1st param for this event.

renku
22 Sep 2011, 3:14 AM
@zombeerose: The documentation is for ExtJS 4.0.6 where this has been fixed, but you are probably using 4.0.2a (where both the code and docs were wrong).

zombeerose
22 Sep 2011, 9:13 AM
@renku
Umm ... maybe it is fixed in your dev code, but I am looking at the code for 4.0.6 and my own docs that were built with jsduck.

skirtle
22 Sep 2011, 3:32 PM
Checkbox getSubmitValue().

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.Checkbox-method-getSubmitValue


Returns

Boolean/Object


True if checked; otherwise either the uncheckedValue or null.

When it is checked it returns the configured inputValue, which is a string, not the boolean true. uncheckedValue is also a string, so the return type should be a string.

skirtle
22 Sep 2011, 3:47 PM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.chart.series.Pie

The config option angleField is marked as required for a Pie series. However it isn't present in the example given. Instead it uses one of the two aliases, field and xField, which don't appear to be documented. It is not obvious that angleField and field are the same thing.

skirtle
22 Sep 2011, 4:09 PM
Ext.Class, alias:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Class-cfg-alias

Firstly, there's a small error in the example, it should Ext.create, not Ext.widget:


// Using Ext.create
Ext.widget('widget.coolpanel');

Secondly, I think it would be really helpful to mention some of the other types of alias that are available. I've heard a number of people comment that they don't understand why they have to prefix their aliases with widget. Mentioning some of the other available prefixes would help to clarify, such as how plugin can be used with ptype.

skirtle
22 Sep 2011, 4:34 PM
Store, 'Loading Nested Data':

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Store

The example in the 'Loading Nested Data' section is a bit odd. I think (guessing wildly) that it's trying to show how stores don't need any special config to handle nested data. However, the end result is a vanilla store config that doesn't really show anything.

skirtle
22 Sep 2011, 5:02 PM
Memory proxy, data config:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.proxy.Memory-cfg-data

Currently this claims to be an array of records. I believe it actually needs to be an object suitable for the configured reader.

skirtle
22 Sep 2011, 5:12 PM
EventObject:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.EventObject

I don't see any documentation for the properties ctrlKey, altKey and shiftKey. If they are intentionally undocumented then it isn't clear what alternative means there is for accessing modifier key details.

skirtle
22 Sep 2011, 5:25 PM
Ext.data.Operation:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Operation-cfg-group

I may be mistaken but as far as I can tell the setting is groupers, not group. Store and Server proxy both seem to use the name groupers when accessing it.

skirtle
22 Sep 2011, 5:35 PM
Ext.chart.Legend:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.chart.Legend


In order to render the legend item of the proper series the series configuration object must have showInSeries set to true.

Shouldn't that be showInLegend?

skirtle
22 Sep 2011, 5:42 PM
Ext.panel.Table:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Table

The config option disableSelection isn't documented yet it does appear in the Infinite Scrolling example here:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.Panel

skirtle
22 Sep 2011, 6:00 PM
The charting series examples all try to use the same data set but Area is the only one that actually uses all the data. Having all that extra data in the other examples is really confusing. The way I read those examples (and I doubt I'm alone) is to look at the demo preview first and then look at the data. I shouldn't need to read the body of the code to understand how the numbers correspond to the chart, it's back-to-front.

skirtle
22 Sep 2011, 6:02 PM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Element-method-getFrameWidth

There's a missing *, makes it all go horribly wrong.

skirtle
22 Sep 2011, 7:43 PM
Not sure if this is a documentation bug or a mistake elsewhere.

The three methods found in Element.dd (initDD, initDDProxy and initDDTarget) are documented but don't actually exist:

http://docs.sencha.com/ext-js/4-0/source/Element.dd.html

As far as I can tell that file is omitted from the jsb3 but is still included in the docs. If it was intentionally removed then the docs should reflect that.

renku
22 Sep 2011, 11:43 PM
@zombeerose: Oh, sorry, my mistake. It's been fixed in extjs-4.1 branch, just from my point of view it happened so long time ago I thought it must be already in some released version. But it is an API-breaking change, so it's delayed until 4.1.

zombeerose
23 Sep 2011, 7:34 AM
@renku: Thanks for the followup. Looking forward to the 4.1 release. Will it be released before senchacon?

renku
23 Sep 2011, 7:57 AM
Don't really know by myself.

zombeerose
23 Sep 2011, 9:14 AM
Ext.form.field.TextArea - missing docs for the rows config
...


/**
* @cfg {Number} cols
* An initial value for the 'cols' attribute on the textarea element. This is only used if the component has no
* configured {@link #width} and is not given a width by its container's layout.
*/
rows: 4,


Ext 4.0.6

gianmarco
23 Sep 2011, 11:50 PM
http://docs.sencha.com/ext-js/4-0/#!/guide/getting_started document says that by including

extjs/ext-debug.js

you will have browser console messages displayed, like this:

[Ext.Loader] Synchronously loading ...

But you have to reference

extjs/ext-dev.js

in order to actually have these messages.

Please consider this a critical fix in the documentation because this is likely the first doc a new user will read and follow.

renku
26 Sep 2011, 6:52 AM
Thank you all, especially @skirtle, for all these bug reports. Most should be fixed now internally.

@gianmarco We're looking into this ext-debug v/s ext-dev issue.

skirtle
27 Sep 2011, 11:11 PM
The handler config option for Ext.menu.Item is missing. Might be nice to include it in the example at the top of that page too: a menu without a click handler isn't much use.

skirtle
27 Sep 2011, 11:13 PM
Ext.Date.now() returns a number, not a Date:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Date-method-now

skirtle
27 Sep 2011, 11:16 PM
http://docs.sencha.com/ext-js/4-0/source/Action3.html#Ext-grid-column-Action-cfg-tooltip

The docs for the disabled config option of Action column are missing a *, so it doesn't turn up in the docs.

skirtle
27 Sep 2011, 11:24 PM
Bit of a strange one. The change event for an HtmlEditor is supposed to be hidden but it isn't:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.HtmlEditor-event-change
http://docs.sencha.com/ext-js/4-0/source/HtmlEditor.html#Ext-form-field-HtmlEditor-event-change

Sébastien.Volle
28 Sep 2011, 12:50 AM
The page for Ext.state.Stateful misses a lot of documentation content present in the source code.

skirtle
28 Sep 2011, 1:39 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.proxy.Rest


See Rest proxy's implementation for an example of how to achieve this.

The link in that line doesn't work.