Error Setting Property On Scriptable Plugin Object
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: SL2: Error setting property on scriptable plugin object! Silverlight > Programming Silverlight with JavaScript Question 0 Sign in to vote Hi Developers, i have a problem with the javascript -> silverlight communication. My silverlight app has to communicate with my html page via javascript. For testing purposes i simply add a method "SetText" which writes some output to an textblock-element. 1 [ScriptableType]2 public partial class Page : UserControl3 {4 public Page()5 {6 InitializeComponent();7 HtmlPage.RegisterScriptableObject("pageObject", this);8 }9 10 [ScriptableMember]11 public void SetText(string text)12 {13 this.txtResult.Text = text;14 }15 } So now i want to call the SetText-Method via JS: 1 var pluginContent = document.getElementById("slPlugin").content;2 pluginContent.pageObject.SetText("Test"); But i'm getting always the error "Error setting property on scriptable plugin object!". Any ideas, hints? Thanks in advance, Enrico Sunday, February 01, 2009 9:45 AM Reply | Quote Answers 0 Sign in to vote Hi Enrico, You can try to change your code like below: public Page() { InitializeComponent(); HtmlPage.RegisterScriptableObject("pageObject", this); } void Page_Loaded(object sender, RoutedEventArgs e) { HtmlPage.RegisterCreateableType("calculator", typeof(Calculator)); } [ScriptableTy
BMO. For more details see Persona Deprecated. Last Comment Bug308814 - weird "Error calling method on NPObject" error Summary: weird "Error calling method on NPObject" error Status: RESOLVED INVALID Whiteboard: Keywords: Product: Core Classification: Components Component: Plug-ins (show other bugs) Version: Trunk Platform: x86 All Importance: P3 normal with 2 votes (vote) TargetMilestone: --- Assigned To: Nobody; OK to take it and work on it QA Contact: TriageOwner: Benjamin Smedberg [:bsmedberg] Mentors: URL: http://tdconline.dk/ Depends on: Blocks: Show dependency tree /graph Reported: 2005-09-16 05:58 PDT by Henrik Gemal Modified: 2013-02-06 09:54 PST (History) CC List: 14 users https://social.msdn.microsoft.com/Forums/en-US/0fafb707-1340-4591-acac-bfa16fe73030/sl2-error-setting-property-on-scriptable-plugin-object?forum=silverlightjavascript (show) bzbarsky chung808 cliss gavin.sharp jaroslav.zaruba john jst martijn.martijn matt msintov paul.silaghi RNicoletto tmptgr tommi.komulainen Flags: pavlov: blocking1.9- reed: wanted1.9+ See Also: Crash Signature: (edit) QA Whiteboard: Iteration: --- Points: --- Has Regression Range: --- Has STR: --- Tracking Flags: Attachments Testcase in Mozilla archive (Zip with RDF) (1.72 KB, application/zip) 2006-08-10 08:53 PDT, Cees T. no flags Details View All Add an attachment (proposed patch, testcase, etc.) Description Henrik https://bugzilla.mozilla.org/show_bug.cgi?id=308814 Gemal 2005-09-16 05:58:48 PDT if you go to (flash installed needed) http://tdconline.dk/ and press the Menu button just right of the logo I see this in the console: Error: Error calling method on NPObject! Source File: http://i.tdconline.dk/tree/ngto_mail.js Line: 865 what does this mean and why do I get this error when the flash menu shows? Comment 1 Henrik Gemal 2005-09-16 05:59:07 PDT User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050915 Firefox/1.6a1 Comment 2 Philip Chee 2005-09-29 22:40:47 PDT This is very probably a duplicate of bug 309044 (which has a test case or two) Comment 3 Henrik Gemal 2005-11-09 01:12:29 PST damn. this bug is still present with the fix for bug 309044 in :( Comment 4 Henrik Gemal 2005-11-09 04:52:46 PST Michelle is this only a issue in the Flash 8 plugin or is it a mozilla issue? to reproduce: http://tdconline.dk/ and press the Menu button just right of the logo Comment 5 Michelle Sintov 2005-11-09 16:32:00 PST From the plug-in side, here is what is going on: - NPP_GetValue for NPPVpluginScriptableNPObject is called on plug-in. - plug-in calls NPN_CreateObject - NP_Allocate is called on plug-in - plug-in calls NPN_RetainObject - NP_Deallocate is called on plug-in - NPP_GetValue for NPPVpluginScriptableNPObject is called on plug-in. - plu
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
found for "GET /viewtopic.php" VideoLAN Forum Home All times are UTC+02:00 Delete all board cookies The team Powered by phpBB Forum Software © phpBB Limited GZIP: On