PDA

View Full Version : [2.0b1][SOLVED] Ext.form.DateField



JeffHowden
22 Oct 2007, 1:39 AM
Ext 2.0 beta 1

Docs list the method as applyTo(), however no such method exists for a DateField. When inspecting what a new DateField returns, applyToMarkup() exists and does what you'd expect applyTo() to do. So, which is incorrect? Is there really a missing or misnamed applyTo() method? Or, is there an issue with the docs (applyTo() should really be applyToMarkup())? If it comes to a vote, I say it should be changed to be applyTo() to be consistent with previous usage and similar usage in other areas of the framework.

http://ext.vosandhowden.com/deploy/ext-2.0-beta1/examples/form/applyto.html
http://extjs.com/deploy/dev/docs/?class=Ext.form.DateField&member=applyTo

jack.slocum
22 Oct 2007, 2:29 PM
applyTo is a config option, not a function in 2.0. applyToMarkup exists for convenience with backwards porting.

HTwoO
22 Oct 2007, 7:40 PM
Thanks Jack. Could you mention it in the API docs? It is easy for the developers to know how API changed. For example:

In the Methods:
applyTo : Destroyed
This method become a config option from Ext 2.0, applyToMarkup exists for convenience with backwards porting.

Well, it just my personal opinion, but I think it is good for people who upgrade from Ext 1.1.1 if they get problems. :)

mystix
22 Oct 2007, 7:45 PM
Thanks Jack. Could you mention it in the API docs? It is easy for the developers to know how API changed. For example:

In the Methods:
applyTo : Destroyed
This method become a config option from Ext 2.0, applyToMarkup exists for convenience with backwards porting.

Well, it just my personal opinion, but I think it is good for people who upgrade from Ext 1.1.1 if they get problems. :)

that's most probably going into the 1.x to 2.x migration guide, not the docs. ;)

JeffHowden
22 Oct 2007, 9:01 PM
Ok, so then the applyTo() method probably should be pulled from the 2.0 docs then, eh?

HTwoO
22 Oct 2007, 9:17 PM
that's most probably going into the 1.x to 2.x migration guide, not the docs. ;)

It is a good idea too. We have a new product based on Ext 1.x with licensed already. I'll pass this information to the team if migration guide is available. Thanks.

brian.moeskau
22 Oct 2007, 9:26 PM
Jeff, I think you're seeing a method that I'm not. :-/ I see applyTo (config) and applyToMarkup (method) in the 2.0 docs.

And btw, it's already in the Migration Guide ;). Scroll all the way to the bottom of the page and look for the change related to Ext.form.Field (it affects all fields, not just DateField):

http://extjs.com/learn/Ext_1_to_2_Migration_Guide

JeffHowden
22 Oct 2007, 9:33 PM
My mistake, I think I'm post-drunk or something. Time to step back, read what I'm writing, and post only after I'm 100% certain. ;)