Unless I read you wrong, this is not something the "effiing bozos" (real classy there) at Adobe loused up.
The version of Ext that shipped in CF9 is updated from CF8. This means that if you performed any _native_ functions on the objects, then there is a chance the API was dropped in the newer version of Ext. This is not a CF bug. At worst, you can blame Adobe for updating their version of Ext, but I guess they assumed that if you were going to be using Ext natively then you can probably handle checking the docs and updating your code. A lot of people ran into this with CFGRID. They would write code to get the grid object, ColdFusion.Grid.getGridObject, and then do stuff with that result. On Tue, Jun 14, 2011 at 11:48 AM, Steve L <[email protected]> wrote: > >>I recently upgraded to CF9 and have noticed that the moveTo function no >>longer seems to work to reposition a cfwindow. >> >>I still have a CF8 server running and the same code works perfectly in >>CF8, but throws the following JS error in CF9: >> >>Mywindow.moveTo is not a function >> > > I'm migrating an app and just ran into the same thing. > > it's still a function, just another one the effing bozzos at adobe loused > up... > > The moveTo method is expecting the 'el' property of the window to contain an > Ext.Element object but the CF constructor only loads the window id in there > and the moveTo method doesn't check or validate it (this is the same as in > CF8, but in CF8 the window constructor wisely uses the Ext BasicDialog > constructor which correctly allocates an Ext.Element to the el member ) > > I haven't exhaustively researched this yet, but this will certainly break > other Ext methods as well. > > As far as I can tell from looking at the script it doesn't appear that there > would be any fallout from correcting their mistake an assigning an instance > of an Ext.Element to the el member of the object like this: > > myWin.el=Ext.get(myWin.el); > > do this after you create the window object. > btw in CF8 you had to create the window and then get a reference to it > separately, now the window constructor returns an object reference: > > old: > > ColdFusion.Window.create('myWin','title',null,}) > var myWin=ColdFusion.objectCache['myWin']; > > new: > > var myWin=ColdFusion.Window.create('myWin','title',null,}); > > > if you really really want to fix it so you don't have to do that assignment > every time you create a window you can modify you cfwindow.js file line 139: > > flawed: > _de.el=_de.divid; > > fixed: > _de.el=Ext.get(_de.divid); > > > if you can't modify that line because you're on a shared server you can opt > to copy the whole createJSObj() function to a localized file and override the > default version of the function for your clients. Lines 126 - 204 in > cfwindow.js ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345290 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

