Problem in binding for RSS feed Items as slide show

I want to create a gadget that is capable of showing several RSS feed items as a slide show.

I have created a binding for loading slide show items .On calling

Web.Bindings.attachElementBindingSync(

loadingContainer,

Microsoft.Live.GadgetSDK.ExampleBinding,

this); have getting the error "module' is null or not an object" on debugging.

On the code above "Microsoft.Live.GadgetSDK" is my name space and it has classes

"Microsoft.Live.GadgetSDK.RssGadget" and "

"Microsoft.Live.GadgetSDK.ExampleBinding". AttachElementBindingSync is being called from RssGadget class.

What am I doing wrong Can you please send me a sample code for binding.

Is binding the way to go for the slide show Or is there any approach. Also where should the dealy for the slide show be called

(Basic objective is making the slide show)




Answer this question

Problem in binding for RSS feed Items as slide show

  • NetDragonKing

    Couple things:

    • Are you working for Microsoft in the group building the GadgetSDK samples If not, you really should pick a different namespace than "Microsoft.Live.GadgetSDK". That's a sample namespace used in the SDK code, with the intention that you will change it to be appropriate to your scenario. For example, I tend to use something like "ToddOs.GadgetName" and then "ToddOs.GadgetName.Main" for the main gadget class and "ToddOs.GadgetName.Foo" for supporting bindings. Similarly, you probably ought to pick a nice descriptive name for your binding besides "ExampleBinding".
    • I don't see "module" being used at all in the line of code you're referencing. If you're going by what IE tells you, they're usually off by one line (ie, if it says the error occured on line 28, it's probably actually on line 27 because it didn't catch that line 27 had an error until it's moved on to line 28 and processed line 27). Anyway, unless you specified otherwise, there is no "module" variable available to gadgets by defaults. There is p_args.module, which many people will alias to m_module ("var m_module = p_args.module;") for convenience. A link to code would help in debugging.
    • attachElementBindingSync() takes a fourth parameter. Javascript is generally lenient about that, but you really ought to pass a null there if you're not explicitly passing some data to the binding.

    I like bindings. For a control like a slideshow, a binding very much makes sense -- you can build the slideshow in a generic way, and then be able to more easily use it in another gadget without having to copy and paste a bunch of code. Just reference the js file containing your binding.


  • Tryst

    Hi ToddOs,

    Thanks for your replay .Binding was woking witht no problems.
    Sorry for the confusion in Namespace name.I alreday changed to a suitable name.

    Thanks,
    Eapen t john


  • Problem in binding for RSS feed Items as slide show