69.4 F
Los Angeles
Thursday, April 18, 2024

Trump Lawyer Resigns One Day Before Trial To Begin

Joseph Tacopina has filed with the courts that he will not represent Donald J. Trump. The E. Jean Carroll civil case is schedule to begin Tuesday January 16,...

Judge Lewis A. Kaplan Issues Order RE Postponement

On May 9, 2023, a jury found Donald J. Trump liable for sexual assault and defamation. The jury awarded Ms. Carroll $5 million in damages. Seven months ago,...

ASUS Announces 2023 Vivobook Classic Series

On April 7, 2023, ASUS introduced five new models in the 2023 Vivobook Classic series of laptops. The top laptops in the series use the 13th Gen Intel® Core™...
StaffIncremental BloggerSupporting multiple instances of generated Silverlight content

Supporting multiple instances of generated Silverlight content

Over the weekend I’ve been experimenting with a version of InkPlayer written with Silverlight.

Originally I wrote InkPlayer as a C++ app that generated Flash SWF files which showed animated ink drawings. I could fairly easily embed these Flash animations (one or more instances) within a blog post. I’d like to do something similar with Silverlight.

Currently in Silverlight I have a page that I can use to draw something. The app then displays the code I need to place in a blog post in order to play back the ink drawn. I’m able to create an instance of the playback code in Silverlight as linked to above.

That’s not too hard to do, although placing a Silverlight app in a blog post requires a script block, which not all blog services allow. Likewise, you have to upload a series of files which is kind of messy. It looks like it’s possible to use Microsoft’s new Silverlight hosting service to simplify the app packaging, however, I haven’t gotten any further than signing up for an account yet. If you’re interested, Tim Heuer has some instructions on how to use the new service to host your Silverlight app.

The part I’m still trying to figure out is how to host multiple instances of the same Silverlight app, or similarly generated ones, in the same post or html page. Minimally duplicate IDs, variable names, and the like need to be avoided, however, is it even practical what I want to do?

I began to wonder if the Silverlight hosting service helps to solve some of these issues or if it introduces some other concerns. As a simple test I tried to take Tim Heuer’s “Click” example and call duplicates of it in a page, however, I couldn’t even get one instance to work, so I tried a sample from Bryant. Unfortunately I’m getting a run-time error in his app. I tried hosting two instances of it anyway in a page and sure enough they conflict. I tried making IDs and so forth unique, but that doesn’t seem to get multiple instances working in a single page. I’ll probably need to create my own simple hosted Silverlight code to see what special techniques I need, if any, for hosting multiple instances of a Silverlight app.

I also need to go back and find out if Silverlight really needs a parent element name as well as a unique name for each instance when it’s used. Ideally embedding Silverlight content should be no more challenging than embedding let’s say a YouTube video.

Loren
Lorenhttp://www.lorenheiny.com
Loren Heiny (1961 - 2010) was a software developer and author of several computer language textbooks. He graduated from Arizona State University in computer science. His first love was robotics.

Latest news

Related news