This is a migrated thread and some comments may be shown as answers.

Sys.CultureInfo.prototype._getAbbrMonthIndex

3 Answers 180 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Martin Sarosi
Top achievements
Rank 2
Martin Sarosi asked on 18 Jul 2008, 11:49 AM
Hi I understand this has been a problem before.

I am using Telerik.Web.UI 2008.1.619.20.

And the ASP.NET AJAX Extensions 1.0 for .NET 2.0.

Most of my pages are fine.

However, there are three pages where this error occurs:
Sys.InvalidOperationException: Handler must be a function
Sys$CultureInfo$_getAbbrMonthIndex("")ScriptRe...211899413 (line 5762) 
ScriptResource.axd?d=d5iptTOXMq3rekLMuo5H-_o4gDDVPzzYLEE92e7THUmpaxGPBusaIHO4rLdLU7dm0&t=633510249006508017()()ScriptRe...006508017 (line 793) 
this._upperAbbrMonths = this...s.dateTimeFormat.AbbreviatedMonthNames); 
 
 


 Firebug shows this is where it is called from:
789 Telerik.Web.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3}; 
790 Telerik.Web.BoxSide.registerEnum("Telerik.Web.BoxSide",false); 
791 if(Sys.CultureInfo.prototype._getAbbrMonthIndex){ 
792 try
793 Sys.CultureInfo.prototype._getAbbrMonthIndex(""); 
794 } 
795 catch(ex){ 
796 Sys.CultureInfo.prototype._getAbbrMonthIndex=function(_c8){ 
797 if(!this._upperAbbrMonths){ 
798 this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames); 
799 } 
 


These three pages dynamically load a User Control. There is no codebehind for the user control as it inherits from a separate assembly I have written.

I have a base page for all pages which adds the scriptmanager and RadAjaxManager.

I have tried RadScriptManager as well as ScriptManager.

I am at a loss to solve this problem.

Please help!

Marty

3 Answers, 1 is accepted

Sort by
0
Martin Sarosi
Top achievements
Rank 2
answered on 18 Jul 2008, 01:45 PM
As an update to this issue I have connected the issue I am having to one control.

A RadCombobox on the .aspx file.

Opera's dragonfly helped me nail this by giving a very full stack trace.

Very nice debugger actually as a compliment to firebug.

Cheers


Marty


Error:
name: Sys.InvalidOperationException
message: Sys.InvalidOperationException: Handler must be a function.
stacktrace:   Line 2842 of linked script http://localhost:50425/SafetyTortilla/ScriptResource.axd?d=3s4geISiUjN1F5wvPHA4mlVZYnXKwwKodZiDTWWLY0Ef9b9neu0yavzrf-ygiLHq7P0AnprMaoJDXIp3dhyX9dfXdjm8dL1lqCUQHkzuGjY1&t=633471432211899413: In function Sys$Component$create
                if (!(events[name] instanceof Function)) throw new Error.invalidOperation(Sys.Res.eventHandlerNotFunction);
  Line 8 of inline#26 script in http://localhost:50425/SafetyTortilla/riskassessment.aspx?entity=RiskAssessment&pk=RA000031&refid=3b26e960-8e92-49a1-a896-c656156d0206
        $create(Telerik.Web.UI.RadComboBox, {"_dropDownWidth":0,"_height":100,"_skin":"Default2006","_text":"Medium Risk","_uniqueId":"ctl00$MainPage$RATypes","_value":"Medium Risk","_virtualScroll":false,"attributes":{},"clientStateFieldID":"ctl00_MainPage_RATypes_ClientState","collapseAnimation":"{\"type\":12,\"duration\":200}","itemData":[{"value":"(None)"},{"value":"Medium Risk","selected":true}],"markFirstMatch":true,"selectedIndex":1}, {"selectedIndexChanged":enableButtons()}, null, $get("ctl00_MainPage_RATypes"));
  Line 2503 of linked script http://localhost:50425/SafetyTortilla/ScriptResource.axd?d=3s4geISiUjN1F5wvPHA4mlVZYnXKwwKodZiDTWWLY0Ef9b9neu0yavzrf-ygiLHq7P0AnprMaoJDXIp3dhyX9dfXdjm8dL1lqCUQHkzuGjY1&t=633471432211899413
                        evt[i](source, args);
  Line 3792 of linked script http://localhost:50425/SafetyTortilla/ScriptResource.axd?d=3s4geISiUjN1F5wvPHA4mlVZYnXKwwKodZiDTWWLY0Ef9b9neu0yavzrf-ygiLHq7P0AnprMaoJDXIp3dhyX9dfXdjm8dL1lqCUQHkzuGjY1&t=633471432211899413: In function Sys$_Application$_doInitialize
                handler(this, Sys.EventArgs.Empty);
  ...  Line 50 of linked script http://localhost:50425/SafetyTortilla/ScriptResource.axd?d=3s4geISiUjN1F5wvPHA4mlVZYnXKwwKodZiDTWWLY0Ef9b9neu0yavzrf-ygiLHq7P0AnprMaoJDXIp3dhyX9dfXdjm8dL1lqCUQHkzuGjY1&t=633471432211899413
            return method.apply(instance, arguments);
  ...
0
Rosi
Telerik team
answered on 18 Jul 2008, 03:09 PM
Hi Martin Sarosi,

This problem is a result of a bug in MS AJAX which is not handled in framework 2.0. More about this you can read here:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=277646

For a workaround you can see this topic: https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=277646

Hope this helps.

Best wishes,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Martin Sarosi
Top achievements
Rank 2
answered on 18 Jul 2008, 03:16 PM
Finally traced it to me!

I am in the process of upgrading all telerik controls to ASP.NET AJAX controls.

The ClientSelectedIndexChanged event had a different method signature to the new sender, eventArgs type.

But that is a very, very strange error to get!

:)

PS Can you mark this as answer please!
Tags
Ajax
Asked by
Martin Sarosi
Top achievements
Rank 2
Answers by
Martin Sarosi
Top achievements
Rank 2
Rosi
Telerik team
Share this question
or