RE: RE: Failed to invoke: Javascript function

2011-11-29 Thread Greg Keogh
Maybe there is a javascript error on the page causing problems.

I don't see one in the browser. I've tried running the SL4 app in debug and
non-debug modes but I get no extra information from anywhere, just the same
Failed to Invoke error. No helpful diagnostic information is anywhere that
I can find via any trick I can think of so far.

Even if the JavaScript function doesn't exist I get the same error.
InvalidOperationException is all I get and nothing else to help me, so it's
not even getting as far as the browser. It's like a typical security
roadblock, but there are no hints that it is one in this case. This is just
a perfectly normal SL4 app with no weird things happening, it's just calls
a WCF service to send XML back and forth and that's all working fine.

I will now compare the html an scripts generated by the VS2010 wizard and my
live ones.

Greg 

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: RE: Failed to invoke: Javascript function

2011-11-29 Thread Jonathan Parker
Try

HtmlPage.Window.Alert(Test);

as per this thread http://forums.silverlight.net/t/211409.aspx/1

On Tue, Nov 29, 2011 at 11:07 PM, Greg Keogh g...@mira.net wrote:

 Maybe there is a javascript error on the page causing problems.

 I don’t see one in the browser. I’ve tried running the SL4 app in debug
 and non-debug modes but I get no extra information from anywhere, just the
 same “Failed to Invoke” error. No helpful diagnostic information is
 anywhere that I can find via any trick I can think of so far.

 Even if the JavaScript function doesn’t exist I get the same error.
 InvalidOperationException is all I get and nothing else to help me, so it’s
 not even getting as far as the browser. It’s like a typical security
 roadblock, but there are no hints that it is one in this case. This is just
 a perfectly normal SL4 app with no “weird” things happening, it’s just
 calls a WCF service to send XML back and forth and that’s all working fine.
 

 I will now compare the html an scripts generated by the VS2010 wizard and
 my live ones.

 Greg 

 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight




-- 
Regards,
Jonathan Parker
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: RE: Failed to invoke: Javascript function

2011-11-29 Thread Greg Keogh
HtmlPage.Window.Alert(Test);

as per this thread http://forums.silverlight.net/t/211409.aspx/1 

 

Alert works. I have spent another two hours trying to get the Invoke
working.

 

I looked back to June 2010 in version control to see who I did a similar
testing technique then. I used GetProperty() to get a ScriptObject and then
InvokeSelf. That code no longer works and I get null back from GetProperty.

 

I have tried dozens of script functions signatures and nothing changes.

 

I have moved the script to different places but nothing changes.

 

I tried calling OnSilverlightError (the function generated by the wizard)
and I get a different error Object doesn't support property or method
'getHost', but that gives me no clues. I also tried renaming my function to
OnSilverlightError but I get no clues.

 

So after 4 man-hours of trying to get any JavaScript function work (even an
empty one) I only get the Failed to Invoke error and I have no clues. I
only know that a fresh wizard generated SL4 app does Invoke okay and my real
one doesn't.

 

So here we are well into the 21st century in the age of science fiction and
I'm still spending half of my working life trying to get hello world scripts
to run. Even on mainframes I had core dumps to analyse, now I usually have
nothing but sorry for the inconvenience. Silverlight, WPF, WCF and
security blocks are fucking killing me, I'm wasting time, losing money and
going mad and losing sleep, and this has been going on for years now with
absolutely no sign that anything will improve.

 

Oh well, now I will waste another hour up until 1:30am trying to get script
debugging working in VS2010 (as John just suggested), but I'm sure if I do
get it working (I thought it already was?!) then I will learn nothing and be
right back where I started two days ago.

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight