Results 1 to 6 of 6

Thread: HELP! PopState() my bare ass...

  1. #1
    Join Date
    Apr 2011
    Posts
    108

    Default HELP! PopState() my bare ass...

    Hi.

    I've been trying to circumvent the lack of includes, I thought I was pretty clever, but apparently not...

    I have a window (one), that shares some common components with several different screens.

    Each screen, is a list that occuppies somewhat the same area, but have different properties in how they display data.

    I was thinking I could then easily let Boxee navigate between the lists, simply by calling SetVisible() on them (thus hiding and showing as I see fit).

    But... once I introduce PushState, everything goes haywire...

    How do I get the back-key to actually go back? (well, it does, but the state-changes in visibility doesn't seem to trigger any of the animations, and ofc. the bug about list-focus etc. makes the focused-items f*cked up).

    And... I seem to have no way of knowing when a PopState occurs?!!?!

    Any way around this?
    ---
    In theory, theory and practice are the same. In practice they're not.
    http://razorax-repo.googlecode.com/svn/trunk/boxee

  2. #2

    Default

    Welcome to boxee, have a look here:
    http://jira.boxee.tv/browse/BOXEE-10097
    http://jira.boxee.tv/browse/BOXEE-10098

    If I read your problem my advice would be to stay away from python commands to control the gui, but use some of the smart xml controls. You can pass extra paramters to a list using the SetProperty function. These paramters can be related to you gui or whatever you want. From the xml you can read this data

    Here an example, say you have using the param 'active' to set a list or whatever

    Code:
    <visible>StringCompare(Container(10).ListItem.property(custom:active),sidelist)</visible>
    This way if the param is sidelist it will enable your control, you can even enhance with with multiple statements like so

    Code:
    <visible>!StringCompare(Container(10).ListItem.property(custom:active),)+ ControlGroup(1001).HasFocus</visible>
    Have a look at my repo at www.bartsidee.nl

  3. #3
    Join Date
    Apr 2011
    Posts
    108

    Default

    Thanks (again) Bart.

    But... it only brings me some of the way.

    What should I do when the user presses the back-button?
    Just exit the app then?
    ---
    In theory, theory and practice are the same. In practice they're not.
    http://razorax-repo.googlecode.com/svn/trunk/boxee

  4. #4

    Default

    Well my advice would be to use the pushstate, but to somehow combine it with the above. All the list are stored in session, so all the data you have provided with the list will be available for that session.

    At the moment it is just not possible to detect if the users has pushed the esc button and depending on the case the above could provide an option. On your last screen it will indeed exit the app, and sometimes this is not how you and I want it. To my opinion it would be better if boxee would (standard) show a dialog if a user would like to exit an app (yes/No), similar to how boxee shows a dialog before exiting a video.

    If you have any problem still, please try to state the problem better and I can look into it in more detail
    Last edited by bartsidee; September 21st, 2011 at 12:53 PM.
    Have a look at my repo at www.bartsidee.nl

  5. #5
    Join Date
    Apr 2011
    Posts
    108

    Default

    Trying your suggestion out, I have run into some problems.

    The visibility part seems to be working like a charm, but the item being displayed doesn't seem to be able to gain focus.

    I will try to write some more later (haven't got the time right now).
    ---
    In theory, theory and practice are the same. In practice they're not.
    http://razorax-repo.googlecode.com/svn/trunk/boxee

  6. #6
    Join Date
    Apr 2011
    Posts
    108

    Default Allllmooooosst there...

    Well.

    Thanks to bart for the good info.

    I now have something that's getting extremely close to working... but...

    When I first open the app, everything works.
    After I step back to apps, and re-enter it, I can't seem to get the lists to do what they should.

    It seems that what-ever state the <visible> tags have when I close the app, is restored upon-reopening the app, but not as I would expect.

    A work-around seems to be, to simply check whether the SetFocus call actually leads to focus, if not, we have to kick the app by forcing the control that should have had the focus by setvisible called from Python.

    Very weird. And it will make that animation look weird (since it first animates to something that is actually hidden, and then reanimates to the visible).

    I'm full of respect for those that actually continue working on Boxee as a platform. Bartsidee, you must be a very patient man!
    Last edited by Razorax; September 21st, 2011 at 05:12 PM.
    ---
    In theory, theory and practice are the same. In practice they're not.
    http://razorax-repo.googlecode.com/svn/trunk/boxee

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
  •