How to pass the focus on python application

Discussion in 'Python' started by titouille, Apr 26, 2004.

  1. titouille

    titouille Guest

    Hi everybody !

    first, sorry for my poor english, I'm french mothertongue ;)

    technologies :
    --------------
    Python 2.3
    Twisted Matrix 1.2.0
    wxPython 2.5.1

    platform :
    ----------
    winXP


    I explain my problem :

    I try to build a multi-plateform python socket server to interact with
    flash animations.
    Animations send by xmlSocket xml string, server intercept string,
    parse it, execute method and return result as xml string to the
    FlashXmlSocket.

    at beginning, xml sended string contains DOM document who describe one
    or multiples operation(s) to execute. So final xml string (with return
    results) contains already one or multiple return execution statements

    When i use serveal methods like OpenFile or SaveFile, DialogBox
    appears on the screen.

    But it appear not on the top, because focus is on flash animation...
    So if flash animation is for exemple in full-screen, user don't see
    the opened dialog-box...

    How to, on each platform (win, linux, mac), add a method to set the
    focus on the server if it's required ??

    for example, send xml contain method like this :

    1. setFocusToServer ()
    3. setNewWorkingDirectory (path)
    2. OpenDialog (message, defaultDirectory, defaultFile, wildcard)

    and add a --

    setFocusToServer (self)

    if wx.Platform == '__WXMAC__':
    # code to focus server on mac when required

    elif wx.Platform == '__WXMSW__':
    # code to focus server on window when required

    elif wx.Platform == '__WXGTK__ || wx.Platform == '__WXMOTIF__ :
    # code to focus server on linux when required


    -- method to focus application on each platform

    many thanks in advance for your ideas, url and experience about this
    subject


    Thierry
    titouille, Apr 26, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason
    Replies:
    4
    Views:
    1,617
    Jason
    May 7, 2007
  2. Replies:
    2
    Views:
    336
    Thomas 'PointedEars' Lahn
    Jun 6, 2005
  3. Roger
    Replies:
    3
    Views:
    321
  4. Jeff

    manual focus vs. focus()

    Jeff, May 20, 2007, in forum: Javascript
    Replies:
    4
    Views:
    178
  5. Spizzat2
    Replies:
    2
    Views:
    177
    Spizzat2
    Jan 9, 2008
Loading...

Share This Page