`
eimhee
  • 浏览: 2151309 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

How to use Ext.each? - Ext JS

阅读更多
I'm trying to use Ext.each.

It throughs an error: this.el.dom has no properties

Here's how I call it:
	var ds = ctxtObj.select("input.date", true);//.on("click", this.showDate);
	Ext.each(ds, this.attachDate, this);
attachDate looks like this:
 		attachDate : function(item, index, allItems){
 			var d = new Ext.form.DateField({ 
				target: item, 
				value: '02/28/2007', 
				format: 'm/d/Y'});
		},
I tried casting 'item' in the function to an element, but that didn't change it.

Any idea what I'm doing wrong?
Thanks...martin
Reply With Quote
  #2  
Old 03-04-2007, 12:59 AM
Default

Each operates on an array. A composite element is not an array. However, the CompositeElement class has it's own each method to make this easy.

var ds = ctxtObj.select("input.date", true);//.on("click", this.showDate);
//Ext.each(ds, this.attachDate, this);
ds.each(this.attachDate, this);

However, you can use it's "elements" property (array) with each.
Reply With Quote
分享到:
评论

相关推荐

    php.ini-development

    If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line ...

    Turbo C++ 3.0[DISK]

    You MUST use the INSTALL program to install Turbo C++. The files on the distribution disks are all archived and have to be properly assembled. You cannot do this by hand! IMPORTANT! If you want...

    Turbo C++ 3.00[DISK]

    You MUST use the INSTALL program to install Turbo C++. The files on the distribution disks are all archived and have to be properly assembled. You cannot do this by hand! IMPORTANT! If you want...

    Turbo C 2.00[DISK]

    WELCOME TO TURBO C 2.0 ---------------------- This README file contains important, last minute information about Turbo C 2.0. The HELPME!.DOC file on the COMMAND LINE/UTILITIES disk also answers ...

    Turbo C 2.01[DISK]

    WELCOME TO TURBO C 2.01 ----------------------- This README file contains important, last minute information about Turbo C 2.01. The HELPME!.DOC file on the COMPILER/UTILITIES disk also answers many...

    msgpack-python-0.4.2.tar

    How to use ----------- One-shot pack & unpack ^^^^^^^^^^^^^^^^^^^^^^ Use ``packb`` for packing and ``unpackb`` for unpacking. msgpack provides ``dumps`` and ``loads`` as alias for compatibility with...

    ImpREC 1.7c

    - Added an IRC log to explain how to use it (Greetings to LaBBa) - Tracers - Error codes updated for the Tracers Level2 and 3 - Plugin Tracer - Redesigned interface for good reasons (See <Plugin....

    Linux System Administrator Guide Version0.9

    - **Using a Swap Space**: Describes how to configure and use swap space. - **Sharing Swap Spaces with Other Operating Systems**: Discusses sharing swap space across multiple operating systems. - **...

    Universal-USB-Installer

    these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the...

    Ubuntu The Complete Reference

    - **Permissions and Ownership**: Detailed explanation of file permissions and ownership, including how to change them using commands like `chmod` and `chown`. #### Part V - Applications **Chapter 13...

    Java邮件开发Fundamentals of the JavaMail API

    protocols will help you understand how to use the JavaMail API. While the API is designed to be protocol agnostic, you can't overcome the limitations of the underlying protocols. If a capability isn...

    .htaccess

    In this part I will show you how to use the .htaccess file to implement some of these. 在上一部分,我已经简单介绍了.htaccess以及它的一些有用功能,在这一部分,我将向你演示如何使用.htaccess文档去...

Global site tag (gtag.js) - Google Analytics