Skip to content

Commit

Permalink
Ext.ClassManager コメント処理
Browse files Browse the repository at this point in the history
  • Loading branch information
sunvisor committed Apr 13, 2012
1 parent 034122e commit f9cfa3f
Show file tree
Hide file tree
Showing 85 changed files with 290 additions and 218 deletions.
Binary file not shown.
20 changes: 20 additions & 0 deletions docs/api.conf/locale/en/Ext.Class/config/alias/desc.md
@@ -0,0 +1,20 @@
List of short aliases for class names. Most useful for defining xtypes for widgets:

Ext.define('MyApp.CoolPanel', {
extend: 'Ext.panel.Panel',
alias: ['widget.coolpanel'],
title: 'Yeah!'
});

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

// Using the shorthand for defining widgets by xtype
Ext.widget('panel', {
items: [
{xtype: 'coolpanel', html: 'Foo'},
{xtype: 'coolpanel', html: 'Bar'}
]
});

Besides "widget" for xtype there are alias namespaces like "feature" for ftype and "plugin" for ptype.
@@ -0,0 +1,14 @@
Defines alternate names for this class. For example:

Ext.define('Developer', {
alternateClassName: ['Coder', 'Hacker'],
code: function(msg) {
alert('Typing... ' + msg);
}
});

var joe = Ext.create('Developer');
joe.code('stackoverflow');

var rms = Ext.create('Hacker');
rms.code('hack hack');
10 changes: 10 additions & 0 deletions docs/api.conf/locale/en/Ext.Class/config/singleton/desc.md
@@ -0,0 +1,10 @@
When set to true, the class will be instantiated as singleton. For example:

Ext.define('Logger', {
singleton: true,
log: function(msg) {
console.log(msg);
}
});

Logger.log('Hello');
Empty file.
@@ -0,0 +1,5 @@
Defines a class.

@deprecated 4.1.0 Use
<a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass" id="ext-gen1325">Ext.define</a>
instead, as that also supports creating overrides.
@@ -0,0 +1 @@
The new Ext.ns, supports namespace rewriting
Empty file.
Empty file.
Empty file.
@@ -0,0 +1 @@
Retrieve a class by its name.
Empty file.
@@ -0,0 +1 @@
class
@@ -0,0 +1 @@
Get the aliases of a class by the class name
Empty file.
@@ -0,0 +1 @@
aliases
@@ -0,0 +1 @@
Get a reference to the class by its alias.
Empty file.
@@ -0,0 +1 @@
class
@@ -0,0 +1,7 @@
Get the class of the provided object; returns null if it's not an instance
of any class created with Ext.define. This is usually invoked by the shorthand
<a href="#!/api/Ext-method-getClass" rel="Ext-method-getClass" class="docClass" id="ext-gen1292">Ext.getClass</a>

var component = new Ext.Component();

Ext.ClassManager.getClass(component); // returns Ext.Component
Empty file.
@@ -0,0 +1 @@
class
Empty file.
Empty file.
@@ -0,0 +1,4 @@
Get the name of the class by its reference or its instance;
usually invoked by the shorthand {@link Ext#getClassName Ext.getClassName}

Ext.ClassManager.getName(Ext.Action); // returns "Ext.Action"
Empty file.
@@ -0,0 +1 @@
className
@@ -0,0 +1 @@
Get the name of a class by its alias.
Empty file.
@@ -0,0 +1 @@
className
@@ -0,0 +1 @@
Get the name of a class by its alternate name.
Empty file.
@@ -0,0 +1 @@
className
@@ -0,0 +1,11 @@
Converts a string expression to an array of matching class names. An expression can either refers to class aliases
or class names. Expressions support wildcards:

// returns ['Ext.window.Window']
var window = Ext.ClassManager.getNamesByExpression('widget.window');

// returns ['widget.panel', 'widget.window', ...]
var allWidgets = Ext.ClassManager.getNamesByExpression('widget.*');

// returns ['Ext.data.Store', 'Ext.data.ArrayProxy', ...]
var allData = Ext.ClassManager.getNamesByExpression('Ext.data.*');
Empty file.
@@ -0,0 +1 @@
classNames
@@ -0,0 +1,10 @@
Instantiate a class by its alias; usually invoked by the convenient shorthand
<a href="#!/api/Ext-method-createByAlias" rel="Ext-method-createByAlias" class="docClass" id="ext-gen1353">Ext.createByAlias</a>
If
<a href="#!/api/Ext.Loader" rel="Ext.Loader" class="docClass" id="ext-gen1357">Ext.Loader</a>
is
<a href="#!/api/Ext.Loader-method-setConfig" rel="Ext.Loader-method-setConfig" class="docClass" id="ext-gen1351">enabled</a>
and the class has not been defined yet, it will
attempt to load the class via synchronous loading.

var window = Ext.ClassManager.instantiateByAlias('widget.window', { width: 600, height: 800, ... });
Empty file.
@@ -0,0 +1 @@
Additional arguments after the alias will be passed to the class constructor.
@@ -0,0 +1 @@
instance
@@ -0,0 +1 @@
Checks if a class has already been created.
Empty file.
@@ -0,0 +1 @@
exist
@@ -0,0 +1 @@
Register a post-processor function.
Empty file.
Empty file.
@@ -0,0 +1 @@
Sets a name reference to a class.
Empty file.
Empty file.
@@ -0,0 +1 @@
this
@@ -0,0 +1 @@
Register the alias for a class.
@@ -0,0 +1 @@
Alias to use when referring to this class
@@ -0,0 +1 @@
a reference to a class or a className
@@ -0,0 +1,2 @@
Insert this post-processor at a specific position in the stack, optionally relative to
any existing post-processor
@@ -0,0 +1,3 @@
The post-processor name. Note that it needs to be registered with
<a href="#!/api/Ext.ClassManager-method-registerPostprocessor" rel="Ext.ClassManager-method-registerPostprocessor" class="docClass">registerPostprocessor</a>
before this
@@ -0,0 +1,2 @@
The insertion position. Four possible values are:
'first', 'last', or: 'before', 'after' (relative to the name provided in the third argument)
Empty file.
@@ -0,0 +1 @@
this
@@ -0,0 +1 @@
Set the default post processors array stack which are applied to every class.
@@ -0,0 +1 @@
The name of a registered post processor or an array of registered names.
@@ -0,0 +1 @@
this
@@ -0,0 +1,6 @@
Creates a namespace and assign the `value` to the created object

Ext.ClassManager.setNamespace('MyCompany.pkg.Example', someObject);

alert(MyCompany.pkg.Example === someObject); // alerts true

Empty file.
Empty file.
@@ -0,0 +1,2 @@
All classes which were defined through the ClassManager. Keys are the
name of the classes and the values are references to the classes.
39 changes: 39 additions & 0 deletions docs/api.conf/locale/en/Ext/method/create/desc.md
@@ -0,0 +1,39 @@
Instantiate a class by either full name, alias or alternate name.

If
<a href="#!/api/Ext.Loader" rel="Ext.Loader" class="docClass" id="ext-gen1442">Ext.Loader</a>
is
<a href="#!/api/Ext.Loader-method-setConfig" rel="Ext.Loader-method-setConfig" class="docClass" id="ext-gen1340">enabled</a>
and the class has
not been defined yet, it will attempt to load the class via synchronous loading.

For example, all these three lines return the same result:

// alias
var window = Ext.create('widget.window', {
width: 600,
height: 800,
...
});

// alternate name
var window = Ext.create('Ext.Window', {
width: 600,
height: 800,
...
});

// full class name
var window = Ext.create('Ext.window.Window', {
width: 600,
height: 800,
...
});

// single object with xclass property:
var window = Ext.create({
xclass: 'Ext.window.Window', // any valid value for 'name' (above)
width: 600,
height: 800,
...
});
2 changes: 2 additions & 0 deletions docs/api.conf/locale/en/Ext/method/create/param/args.md
@@ -0,0 +1,2 @@
Additional arguments after the name will be passed to
the class' constructor.
2 changes: 2 additions & 0 deletions docs/api.conf/locale/en/Ext/method/create/param/name.md
@@ -0,0 +1,2 @@
The class name or alias. Can be specified as `xclass`
property if only one object parameter is specified.
1 change: 1 addition & 0 deletions docs/api.conf/locale/en/Ext/method/create/return.md
@@ -0,0 +1 @@
instance
2 changes: 2 additions & 0 deletions docs/api.conf/locale/en/Ext/method/createByAlias/desc.md
@@ -0,0 +1,2 @@
Convenient shorthand, see
<a href="#!/api/Ext.ClassManager-method-instantiateByAlias" rel="Ext.ClassManager-method-instantiateByAlias" class="docClass" id="ext-gen1357">Ext.ClassManager.instantiateByAlias</a>
5 changes: 5 additions & 0 deletions docs/api.conf/locale/en/Ext/method/define/param/className.md
@@ -0,0 +1,5 @@
The class name to create in string dot-namespaced format, for example:
'My.very.awesome.Class', 'FeedViewer.plugin.CoolPager'
It is highly recommended to follow this simple convention:
- The root and the class name are 'CamelCased'
- Everything else is lower-cased
2 changes: 2 additions & 0 deletions docs/api.conf/locale/en/Ext/method/define/param/createdFn.md
@@ -0,0 +1,2 @@
Optional callback to execute after the class is created, the execution scope of which
(`this`) will be the newly created class itself.
10 changes: 10 additions & 0 deletions docs/api.conf/locale/en/Ext/method/define/param/data.md
@@ -0,0 +1,10 @@
The key - value pairs of properties to apply to this class. Property names can be of any valid
strings, except those in the reserved listed below:
- `mixins`
- `statics`
- `config`
- `alias`
- `self`
- `singleton`
- `alternateClassName`
- `override`
Empty file.
2 changes: 2 additions & 0 deletions docs/api.conf/locale/en/Ext/method/getClass/desc.md
@@ -0,0 +1,2 @@
Convenient shorthand, see
<a href="#!/api/Ext.ClassManager-method-getClass" rel="Ext.ClassManager-method-getClass" class="docClass" id="ext-gen1384">Ext.ClassManager.getClass</a>
1 change: 1 addition & 0 deletions docs/api.conf/locale/en/Ext/method/getClassName/desc.md
@@ -0,0 +1 @@
Returns the displayName property or className or object. When all else fails, returns "Anonymous".
Empty file.
Empty file.
3 changes: 2 additions & 1 deletion docs/api.conf/locale/en/Ext/method/merge/desc.md
@@ -1 +1,2 @@
A convenient alias method for {@link Ext.Object#merge}.
A convenient alias method for
<a href="#!/api/Ext.Object-method-merge" rel="Ext.Object-method-merge" class="docClass" id="ext-gen1465">Ext.Object.merge</a>
12 changes: 12 additions & 0 deletions docs/api.conf/locale/en/Ext/method/namespace/desc.md
@@ -0,0 +1,12 @@
Creates namespaces to be used for scoping variables and classes so that they are not global.
Specifying the last node of a namespace implicitly creates all other nodes. Usage:

Ext.namespace('Company', 'Company.data');

// equivalent and preferable to the above syntax
Ext.ns('Company.data');

Company.Widget = function() { ... };

Company.data.CustomStore = function(config) { ... };

Empty file.
2 changes: 2 additions & 0 deletions docs/api.conf/locale/en/Ext/method/namespace/return.md
@@ -0,0 +1,2 @@
The namespace object.
(If multiple arguments are passed, this will be the last namespace created)
2 changes: 2 additions & 0 deletions docs/api.conf/locale/en/Ext/method/ns/desc.md
@@ -0,0 +1,2 @@
Convenient alias for
<a href="#!/api/Ext-method-namespace" rel="Ext-method-namespace" class="docClass" id="ext-gen1424">Ext.namespace</a>
5 changes: 3 additions & 2 deletions docs/api.conf/locale/en/Ext/method/valueFrom/desc.md
@@ -1,2 +1,3 @@
Returns the given value itself if it's not empty, as described in {@link Ext#isEmpty}; returns the default
value (second argument) otherwise.
Returns the given value itself if it's not empty, as described in
<a href="#!/api/Ext-method-isEmpty" rel="Ext-method-isEmpty" class="docClass" id="ext-gen1503">isEmpty</a>;
returns the default value (second argument) otherwise.

0 comments on commit f9cfa3f

Please sign in to comment.