473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

wxPtyhon 2.4 non trivial problems :D

Hi to everybody :)

I use Boa-constructor 0.3.1, wx 2.4 and python 2.3.

I'have 2 big problems in my application :

1. My EVT_KEY_UP on wxTextCtrl works only when mouse pointer is on the
active window. If i'll move it outside the window (with no clicking)
it doesn't work. And if i move mouse pointer back on the window - it
works.

Anyone know why???

2. My application is divided into few sections. I want to create each
window only once - on first visit, because creating a window takes a
80% of time needed to open it (about 6 seconds on a middle-sized
window). I did a construction which allows to do this and which
destroys all windows on exiting to another section of program. Here is
my solution :

from wxPython.wx import *
from wxPython.lib.maskededit import *
from wxPython.lib.maskednumctrl import *
....

window = None // variable which has a object inside (its not
destroyed
after a closing a window
oldparent = None // it helps me to check do i have to recreate a
window with
new parent

def ShowMyWindow(parent): //this function shows my window. And
creates
it if needed
global window,oldparent

if oldparent<>parent:
oldparent = parent
window = create(parent)

window.Inicialize(parent) // it does some things to window -
sets
accelerator table, sets
fonts,loads data and
such
window.SetTitle(' My window')
window.MakeModal(True)
window.Show()
And i close my window with :

def OnMyWindowClose(self, event):
self.Hide()
self.MakeModal(FALSE)
It's destroyed when a parent is destroyed.

It looks simple.

Now my problem :D

I can create a chains of windows. They are all destroyed when the
parent of the first of them is being destroyed.

I want to create tree :

Parent
|
Child1
|
Child2

Where parent is created and destroyed on open/close and children are
created once and destroyed with parent.

When i open a child1 and close it - it stays created, and if i open it
second time it opens faster and works properly. It happens with second
child too. Problem appears when i : open first child, open second
child and close both. Then they both exist and child1 is parent of
child2. After that if i open child1 it works properly, but opening of
child2 results with some kind of inactivity of it. It's losing focus
on all application and is inactive in strange way. My tests told me
that both windows exist.

Can anyone can help me? It's really important to me...

Thanks for answers

Michal
Jul 18 '05 #1
0 1090

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bml | last post by:
Is "Trivial constructor" either a default constructor generated by compiler or the one you write but it does nothing (empty inside method definition)? Is it required by C++ standard to bypass...
55
by: drhowarddrfine | last post by:
I'm working on a web site that could use some control using js but am concerned about what problems I may have with potential users having their js turned off. Has anyone had any serious problems...
1
by: David Johnston | last post by:
I am converting to the .NET platform and I am starting with C#. Just for exercise I'm writing a text editor and I am having some problems with saving files. I am using a single document...
15
by: Mark Gillespie | last post by:
I have a class that launches a process (amongst other things). I keep track of the process handle, and just prior to the obejct being destroyed by the garbage collector, I want to kill that...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
3
by: baibaichen | last post by:
hi, i am reading a C++ book, it mentions a term non-trivial object. what i understand is: if a object has: a) trivial constructor b) trivial assignment operator c) trivial destructor then it...
0
by: jd | last post by:
I am trying to figure out how to deploy a page and I'm not making much progress. I created an IIS virtual directory, configured it for ASP.NET 2, turned off authentication, and then copied a...
409
by: jacob navia | last post by:
I am trying to compile as much code in 64 bit mode as possible to test the 64 bit version of lcc-win. The problem appears now that size_t is now 64 bits. Fine. It has to be since there are...
84
by: jacob navia | last post by:
As many people know, I think that garbage collection is a good solution for many memory allocation problems. I am aware however, that nothing is "the silver bullet", not even the GC. A recent...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.