Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Strange problem!
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Udgam Mehetre  
View profile  
 More options Oct 2 2012, 3:47 pm
From: Udgam Mehetre <uvm...@gmail.com>
Date: Tue, 2 Oct 2012 12:47:02 -0700 (PDT)
Local: Tues, Oct 2 2012 3:47 pm
Subject: Strange problem!

Hello everyone!

The problem I m having, I m not sure if its related to python, wxpython,
mysqldb or just me..
Here is what happens:
I open the welcome screen of my project, which opens a login page, which
again opens a homepage..

On login page , i have a button event to open the welcome page again..

The respective linking works fine when I start from welcome page..
However, if I start from between, i.e  login page, then my program just
refuses to open the welcome page..

The same thing happens for other files as well, i.e the previous programs
are not opened if I run a program after it
Note that this before-after sequence is what I have set...

The code I use for opening a new file is:
def GoToLogin(self, event):
       self.Close()
       import login
       login.run()
       event.Skip()

run function in login is as follows:

class login(wx.App):
    def OnInit(self):
        frame = MyLogin(None)
        frame.Show()
        return True

# end of class MyLogin

if __name__ == "__main__":
    Login = MyLogin2(0)
    Login.MainLoop()

def run():
    app = login(1)
    app.SetAppName("Login")
    app.MainLoop()

Is the problem in programming or in the implementation of such a logic?
Oh, just in case u were wondering, My project uses MySQL to maintain a
database..
Plz help!

Thanks,
Udgam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Udgam Mehetre  
View profile  
 More options Oct 2 2012, 3:49 pm
From: Udgam Mehetre <uvm...@gmail.com>
Date: Tue, 2 Oct 2012 12:49:57 -0700 (PDT)
Local: Tues, Oct 2 2012 3:49 pm
Subject: Re: Strange problem!

By the way, each program runs perfectly on its own and also opens the
program after it..just that it doesnt open the one before it..


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Driscoll  
View profile  
 More options Oct 2 2012, 4:11 pm
From: Mike Driscoll <kyoso...@gmail.com>
Date: Tue, 2 Oct 2012 13:11:47 -0700 (PDT)
Local: Tues, Oct 2 2012 4:11 pm
Subject: Re: Strange problem!

Hi,

What I do when I need to have a login dialog before the main app loads is
something like this:

1) In my main frame's init, I load a login dialog and show it modally. This
causes any following code to be "paused" so the main app doesn't load
unless the user enters the correct credentials.
2) If the right credentials are entered, then you destroy the dialog and
the code continues to load the main frame (i.e. welcome page)

I have an example somewhere at home. I should put that on my blog sometime.

- Mike


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
uvmgr8  
View profile  
 More options Oct 3 2012, 9:08 am
From: uvmgr8 <uvm...@gmail.com>
Date: Wed, 3 Oct 2012 18:37:40 +0530
Local: Wed, Oct 3 2012 9:07 am
Subject: Re: [wxPython-users] Re: Strange problem!

I know what u mean...but what i am doing is not just opening login from
welcome, but opening welcome after a page which is after login..
In short, after logout, again welcome should open...
And it runs very well if I start from welcome initially...just doesnt work
if i start from login..

--
*Udgam Mehetre*
*
*
*" **Cause Laughter Is The Best Medicine** :)"*


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Dunn  
View profile  
 More options Oct 3 2012, 7:06 pm
From: Robin Dunn <ro...@alldunn.com>
Date: Wed, 03 Oct 2012 16:06:49 -0700
Local: Wed, Oct 3 2012 7:06 pm
Subject: Re: [wxPython-users] Strange problem!
On 10/2/12 12:47 PM, Udgam Mehetre wrote:

Rather than making them all be standalone applications, you should
instead have just one wx.App instance for the whole program and simply
create and show the frames or dialogs as appropriate when they are needed.

--
Robin Dunn
Software Craftsman
http://wxPython.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
uvmgr8  
View profile  
 More options Oct 4 2012, 8:57 am
From: uvmgr8 <uvm...@gmail.com>
Date: Thu, 4 Oct 2012 18:26:41 +0530
Local: Thurs, Oct 4 2012 8:56 am
Subject: Re: [wxPython-users] Strange problem!

 >Rather than making them all be standalone applications, you should
instead have just one
 >wx.App instance for the whole program and simply create and show the
frames or dialogs as
 >appropriate when they are needed.

Yes,you are right..
By the time I got the problem, I was very much into the hole to combine
them all together..
...Maybe I was lazy:p

But anyway, why does it happen? That was my initial question..so that I may
understand a bit more of the working of my code...

--
*Udgam Mehetre*
*
*
*" **Cause Laughter Is The Best Medicine** :)"*


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark  
View profile  
 More options Oct 3 2012, 11:49 am
From: Mark <wenkuow...@163.com>
Date: Wed, 3 Oct 2012 08:49:45 -0700 (PDT)
Local: Wed, Oct 3 2012 11:49 am
Subject: Re: Strange problem!
You should call MainLoop() once in the whole program. Don't initialize
another wxApp but just directly create one or more new loggin frames
simultaneously. Remeber each frame's handle, and then, you can switch over
them without any trouble.

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Strange-problem-tp5714829...
Sent from the wxPython-users mailing list archive at Nabble.com.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »