Results 1 to 5 of 5

Thread: Safe to use LaunchedWindowParameters?

  1. #1
    Join Date
    Jul 2011
    Posts
    129

    Default Safe to use LaunchedWindowParameters?

    I did some searching on the forums and didn't find any references to using LaunchedWindowParameters, is it safe to use them? In our SageTV app we are using them to pass data between windows and I want to make sure we're not asking for trouble.

    In the calling window we have:

    Code:
    params = mc.Parameters()
    params['FavoriteID'] = FavID
    mc.GetApp().ActivateWindow(14031, params)
    In some places we use:

    Code:
    params = mc.GetApp().GetLaunchedWindowParameters()
    params['FavoriteID'] = FavID
    mc.GetApp().ActivateWindow(14031, params)
    And then in the called window we have:

    Code:
    params = mc.GetApp().GetLaunchedWindowParameters()
    mc.LogDebug("SageBoxee: Favorite ID = " + params['FavoriteID'])

  2. #2
    Join Date
    Aug 2011
    Location
    United States
    Posts
    1

    Default Download Rio Divx

    Part Quotes From The Movie Remember Me online Download The Film The Sammy's Adventures: The Secret Passage Download Of Get Him to the Greek The Movie Download The Whole Hanna Movie Download The Gnomeo & Juliet Movie The Messenger (HD) film watch full film Knight and Day video Hd Quality Your Highness (HQ) Watch Watch The Other Guys The Film On The Computer The Way Back movie summary Kung Fu Panda 2 (LQ) online The Breastford Wives movie in english to download download the Smallville - Season Ten fool-length Inception film review

  3. #3

    Default

    It is not used that often as to be honest it is more used for some native boxee (xbmc) functions as the official boxee main skin is not using python. The parameters allow them to pass data for pure skin files. But you can definitely use it. Still you might want to look at the last conversation in this tread:
    http://forums.boxee.tv/showthread.php?t=14177&page=2

    It is much easier to setup global vars with python for that purpose. It will only allow you to pas regular variables, but access complete classes/objects with your data stored in it (over all windows and dialogs). What you are doing is actually more or less a workaround.
    Have a look at my repo at www.bartsidee.nl

  4. #4
    Join Date
    Jul 2011
    Posts
    129

    Default

    Quote Originally Posted by bartsidee View Post
    It is not used that often as to be honest it is more used for some native boxee (xbmc) functions as the official boxee main skin is not using python. The parameters allow them to pass data for pure skin files. But you can definitely use it. Still you might want to look at the last conversation in this tread:
    http://forums.boxee.tv/showthread.php?t=14177&page=2

    It is much easier to setup global vars with python for that purpose. It will only allow you to pas regular variables, but access complete classes/objects with your data stored in it (over all windows and dialogs). What you are doing is actually more or less a workaround.
    I see. Why is using global variables a better solution? We don't really need to have these variables around in the whole app, we just need to pass them to a window to control what is displayed in that particular window.

  5. #5

    Default

    No problem in using them, it is just more in line with object oriented programming.

    Its not that you have to store all of them as global vars, but making a simple class would be sufficient. It also helps with splitting the gui part from the coding.

    In the end it is your personal coding style which one to choose. The one I stated is just more in line with more advanced apps and helps to organize your code better.
    Have a look at my repo at www.bartsidee.nl

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •