Browse by Tags

Tagged Content List
  • Blog Post: Fun Friends for Functions, Part 2: Handling Exceptions

    Previously we looked at how you can bind a function to a set of arguments and then call the resultant function at some time in the future. This technique is very powerful, but as-is it is a ticking bomb. As Amy points out in her blog post on exception handling , you always need to be prepared to handle...
  • Blog Post: Why the ‘arguments’ object is bad, Exhibit #3,745

    Having just written a post with an example of how to use the arguments object , you might question my choice of title for this blog post. In my not-so-humble opinion, the 'arguments' object in ECMAScript is only useful for one thing: The 'arguments' object should only be used by infrastructure functions...
  • Blog Post: Fun Friends For Functions

    And now for a more techy post. In ECMAScript, functions are considered first-class objects. "What," you might ask, "differentiates a 'first-class' object from a merely 'economy-class' object?" Well, the main thing is that functions in ECMAScript are treated just like any other type of data (strings,...
  • Blog Post: Maintaining Callback Semantics

    One of the key programming concepts in HDi is the use of asynchronous processing with callback functions. The HDi platform exposed to title authors is not multi-threaded (which helps reduce the complexity of writing applications), but many of the functions of the player are asynchronous in nature. For...
  • Blog Post: Sliced bread ain’t got nuthin’ on this!

    Forget being the best thing since sliced bread – this is the best thing ever . Well maybe not quite that good, but it's still darn cool! Finally – FINALLY! – you can get decent IntelliSense for JScript inside Visual Studio ! Holy hotcakes, Batman! This is so awesome you have to download Visual Studio...
  • Blog Post: Using Timers Effectively in HDi

    The use of timers in HDi applications is very common, and there are a few things you should keep in mind when using them to avoid performance issues when playing back your title. I will categorise these as: The autoReset problem The closure problem The re-use problem The general-abuse problem...
  • Blog Post: Simple ACA dumper

    Quick one today – if you have an ACA with some files in it, you can use the createaca tool (provided as part of the Jumpstart Kit ) to list the files inside it. Trouble is that the output is not very helpful; it contains too much information. So here is a simple JScript file you can run on the output...
  • Blog Post: Helpful Tracing Routines

    Last time we looked at conditional compilation , and how using it with HDiSim could aid with interactive debugging of runtime exceptions. But as useful as interactive debugging is, there are three major cases where it is impractical or impossible: When the bug is timing related, and using a debugger...
  • Blog Post: Using Conditional Compilation in HDi

    One of the cardinal rules for developing HD DVD applications is, "let no exception go unhandled." The reason for this is simple – if you fail to handle an exception, the player will kill your application and stop the disc. This leads many developers to wrap entire functions in try / catch blocks, which...
  • Blog Post: A Game of Chance that Pirates like to Play

    Ahoy there me laddies! Yarrrr you better be readin' this blog then matey, or you'll be feelin' the lick o' the cat come nightfall! No, it's not Talk Like a Pirate Day ; it's Let's Post Another HDi Game Day . The other week I posted an HDi sample based of the old arcade game Space Invaders . Today...
  • Blog Post: Red Box Debugging

    Today I have a simple debugging tip. Sometimes when you have an obscure bug, you need to answer the question "is my code even getting executed?" Often you can find that really obscure bugs are caused simply by a bad conditional, a typo, an unexpected exception, or some other flow-control issue that...
  • Blog Post: Simple Pre-Processor for HDi

    Hope you all had a good break. I haven't blogged for a while due to travel (both business and pleasure) and laziness… but I thought I'd start off today with simple pre-processor for HDi. One of the things that is missing from HD DVD is a good pre-processor; anyone familiar with C will know of all...
  • Blog Post: Script Execution Order in HD DVD

    An HDi application can use multiple script files so that you can better manage your code (more manageable files; easier source control; etc.). You do this simply by listing the files inside <Script> elements inside the manifest (and of course add the appropriate <Resource> elements if they...
  • Blog Post: How do I get started with iHD?

    Many DVD authoring professionals may be wondering how they can get started with HD DVD. Probably the first thing to do is to download the iHD Jumpstart kit and get yourself a good XML editor (like the free Visual Studio Web Developer edition ) and a graphics program like Photoshop or the Microsoft Expressions...
  • Blog Post: Inheritance in JavaScript - Part 2

    Last time we took a (very) long-winded look at a simple JavaScript program that used basic inheritance. This time, we'll expand on that a little bit and improve on the techniques. Calling the Constructor Directly First of all, let's look back at the Point constructor again: function Point...
  • Blog Post: Inheritance in JScript - Part 1

    JScript (JavaScript / ECMAScript) is not a class-based language like C++ or Java; rather it is a prototype-based language. Nevertheless, it is often desirable to use class-based design patterns (such as inheritance) in ECMAScript programs, especially as they get larger and more complex. In the next...
  • Blog Post: The Evil Problem

    Over on the IE Blog, a commenter made a very good point -- why is it that IE flags scripts as “potentially bad”? That’s very confusing to the average user, and they have no way of knowing whether or not the script really is bad or not (and therefore whether they should enable it or not). Unfortunately...
  • Blog Post: Everett SP1 Tech Preview and VSA / VSTO

    Updated information about VSTO below As you may know, the .NET Framework 1.1 ("Everett") Service Pack 1 Tech Preview is available for download . You should try to install this on your non-production machines and test to make sure your existing applications continue to run. Please report any problems...
  • Blog Post: GetObject and LinkDemands

    A few weeks ago I posted a blog entry about a security problem we found with JScript .NET's GetObject method before the initial release of the CLR. Talking about the problem in full would take a while, and I want to get through a few blogs today, so some of the details might have to wait... perhaps forever...
  • Blog Post: Calling class constructors twice

    Yesterday I blogged about a bug that you could exploit in JScript .NET, and the other day I made a comment on Eric's blog about compiler-enforced rules versus runtime-enforced rules. Here's a quick story about one such rule that we fixed before the CLR shipped. I'm warning you -- it's obscure and boring...
  • Blog Post: GetObject and Security

    Eric has recently done a series on script security, and one of the things he very briefly mentions is how you can use GetObject with a moniker to get an instance of an object. This reminds me of one of the "cool" bugs we found before the first version of the CLR was released. I say "cool" because it...
  • Blog Post: Clinick's Clinic is back!

    My "old" boss (he hates it when I say that <g>) Andrew Clinick has started blogging . He'll be talking about VSTO 2, scripting, and other stuff. Hopefully he'll adopt dotWord and update it to VSTO 2.0 :-)
  • Blog Post: Security and Inheritance

    I received an e-mail from a customer referencing this newsgroup post and asking two questions about virtual methods and inheritance: 1. Why does it work like this? 2. What's the 'security' implication? Funnily enough, I just read Eric's post on a very similar topic, but I'm going...
  • Blog Post: Redefining a function in JScript

    Taking a leaf out of Eric 's book, I'm going to re-post a question I received in mail here. The question was (essentially): How do you re-define a function in JScript, and keep the parameters intact? Simple! There are (at least) two ways to do it: 1) Just re-define the...
  • Blog Post: Compiled, interpreted, whatever

    Every now and then, people talk about "compiled" versus "interpreted" languages, and how they are different. Whilst there are obvious technical differences between the two, the degree to which the end-user / developer can tell the difference is mostly a function of the language design...
Page 1 of 1 (25 items)