Page view counter
How do I use onLoad? Subscribe to this thread
Last post 05-11-2007 3:42 PM by WynApse. 2 replies.
Sort Posts:
05-11-2007 2:03 AM
How do I use onLoad?

I'm still having trouble with the GlyphMap demo: http://www.wynapse.com/Silverlight/Silverlight_GlyphMap_Utility.aspx particularly in Firefox, but sometimes in IE6.

The issue is that the center content of all the Glyphs is not being loaded.

In reading about using onLoad:somefunction ... I thought maybe I could split out the global variable instantiation from all the createFromXaml code and just do the inits in the xaml Loaded function and fill my grid 'o' Glyphs in the onLoad ... and it worked locally, but yowzer... I could NOT figure out where to poke it to make it work from the web ... using IE7, too! ... forget Firefox... lots of errors there.

So now I've restored it all to a 'stable' position. it works fine in IE7, but Firefox isn't displaying a thing and is givin gme "cyclic_proto_value" errors ...

 So I guess I'm asking if I had the right idea about using onLoad, and if so, does someone have a good working example. I used the correct prototype for it according to the documentation, so I at least got that far. if I made it onLoad:onLoad and then had my function named onLoad, it complained it couldn't find it... just confusing...

Any help??

Thanks!

-Dave

 

Stay in the 'Light
MVP: Visual Developer - Client Application Development
http://www.wynapse.com
Twitter SLNews | Join me @ SilverlightCream | SL Web Articles | My Articles | My Tutorials | My Tooltips | SilverlightCream

WynApse

Loading...
Joined on 05-13-2004
Posts 341
05-11-2007 1:42 PM
Re: How do I use onLoad?

Did you get this worked out? According to the SDK the onLoad is supposed to be called after all the loaded events fire in the xaml objects:

http://msdn2.microsoft.com/en-us/library/bb412401.aspx#Using_the_OnLoad_Event

 

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

bryant

Loading...
Joined on 10-23-2002
Simi Valley, CA
Posts 1,153
05-11-2007 3:42 PM
Re: How do I use onLoad?

Hi Bryant...

 

That's why I wanted to use OnLoad in the manner I described. I'm not sure, but it sounds like just possibly I have a race condition on my hands because if I load up all that createFromXaml during the Canvas "Loaded", I'm thinking I'm getting hammered by something.

So if I just do the minimal I need to set some things up in the Canvas "Loaded", and then do the heavy-lifting in the OnLoad... which is after the other... but I just had zero luck doing so.

Like I said... it worked perfectly locally, but when I put it on my site, it acted like I'd left off the onLoad function...

 

Stay in the 'Light
MVP: Visual Developer - Client Application Development
http://www.wynapse.com
Twitter SLNews | Join me @ SilverlightCream | SL Web Articles | My Articles | My Tutorials | My Tooltips | SilverlightCream

WynApse

Loading...
Joined on 05-13-2004
Posts 341
Microsoft Communities