Digest for wxpython-users@googlegroups.com - 9 Messages in 5 Topics

Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet

···

From: wxpython-users@googlegroups.com

Sender: wxpython-users@googlegroups.com

Date: Tue, 22 May 2012 17:11:08 +0000

To: Digest Recipientswxpython-users@googlegroups.com

ReplyTo: wxpython-users@googlegroups.com

Subject: [wxPython-users] Digest for wxpython-users@googlegroups.com - 9
Messages in 5 Topics

Today’s Topic Summary

Group: http://groups.google.com/group/wxpython-users/topics

  • textctrl multiline errors on linux [2 Updates]
  • Problem with wxConfig & wxPython Demo [1 Update]
  • Why does EVT_TREE_ITEM_HYPERLINK trigger on selection [2 Updates]
  • wx.BitmapFromBuffer data for PNG format [3 Updates]
  • Possible to detect if control is on the screen or not? [1 Update]
    textctrl multiline errors on linux

blissend blissend@gmail.com May 22 09:06AM -0700

  Hi,

I’m using Fedora 16 with wxPython 2.9.3.1 and I’m having problems setting a

textctrl to be multiline. It works fine on both Windows 7 and Fedora 16 if

I do this…

text = wx.TextCtrl(frame, -1, ‘test’, size=(200,200), style=wx.TE_MULTILINE)

However, if I do it this way it only works on Windows 7 but throws

errors/warnings on Fedora 16…

text = wx.TextCtrl(frame, -1, ‘test’, size=(200,200))

text.SetWindowStyle(wx.TE_MULTILINE)

This is the warning I get on Linux…

(debug.py:2094): GLib-GObject-WARNING **: invalid cast from `GtkEntry’ to

`GtkTextView’

I first noticed this using XRC to define a textctrl to be multiline but it

threw a different message on Linux…

wx._core.PyAssertionError: C++ assertion “IsSingleLine()” failed at

/tools/wxPython-src-2.9.3.1/src/gtk/textctrl.cpp(828) in GetEditable():

shouldn’t be called for multiline

Am I doing something wrong here?

Thanks,

Adam

Mike Driscoll kyosohma@gmail.com May 22 09:15AM -0700

  On Tuesday, May 22, 2012 11:06:23 AM UTC-5, blissend wrote:

Am I doing something wrong here?

Thanks,

Adam

I’m guessing there are two different widgets on Linux whereas on Windows,

it’s just one. Thus you probably have to instantiate it one way or the

other, not change it after it’s been created. We’ll see if my hunch is

right when Robin jumps in here…

  • Mike

Problem with wxConfig & wxPython Demo

Gadget/Steve GadgetSteve@live.co.uk May 22 10:39AM +0100

  Hi All,

I had a problem which occurred with the wxPython demo that highlighted a

problem with wxConfig - when the demo had a problem reading the config

file it displayed a message, giving me the path and a details button -

the only trouble is that the error box only persisted for a few seconds

  • presumably until the application terminated - this was not long enough

to read the file path. Once I had managed to find the faulty file I

just needed to rename it to get things running again but I had to try

running the demo 5 or 6 times before I saw enough of the path.

Is there any way of, when an error is displayed, waiting until the error

has been read by the user before terminating the application - e.g.

making the error dialogue modal and giving it a go away button, (OK or

Cancel), in the case of a fatal error like this?

I am sure that I have seen errors like this before with other wx based

applications and they have been known to make an application unusable.

Even worse uninstalling the demo and reinstalling it - my first option -

didn’t remove the configuration file that contained the fault.

wx python version 2.8.12.1 (msw-unicode)

demo version ditto.

Gadget/Steve

Why does EVT_TREE_ITEM_HYPERLINK trigger on selection

Andrea Gavana andrea.gavana@gmail.com May 21 10:05PM +0200

  Hi,

On 21 May 2012 11:21, Dag Wastberg wrote:

Just tested it and it seems to work fine. Thanks!

Now that that works, I’m thinking about the possibility to trigger a

hyperlink with space/enter. What do you think?

I gave it a try and implemented it in SVN. Could you test it and see

if it works?

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”

http://xoomer.alice.it/infinity77/

Andrea Gavana andrea.gavana@gmail.com May 22 09:16AM +0200

  On 21 May 2012 22:05, Andrea Gavana wrote:

hyperlink with space/enter. What do you think?

I gave it a try and implemented it in SVN. Could you test it and see

if it works?

Bad attempt. Shame on me for not testing it… I’ll fix it when I get

back home tonight :frowning:

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”

http://xoomer.alice.it/infinity77/

wx.BitmapFromBuffer data for PNG format

King animator333@gmail.com May 21 11:19AM -0700

  Chris,

I think the problem is in data order. Even in the code (link posted), at

the bottom, before writing png image, some manipulation is going on but not

able to understand it correctly.

Thanks for pointing out “result[1]” mistake, unfortunately it didn’t helped.

Yes, Cython recently added support for array.array. I’ll look into this

later.

Robin,

I changed to char array instead of python’s list, it works but results are

pretty much same.

Cheers

Prashant

Robin Dunn robin@alldunn.com May 21 11:26AM -0700

  On 5/21/12 11:19 AM, King wrote:

Robin,

I changed to char array instead of python’s list, it works but results

are pretty much same.

Ah, I just noticed that you seem to be adding 4 values per pixel, 3 for

RGB (presumably) and 1 with a constant value of 255 for the alpha

(presumably). I only noticed the 1st 3 lines before. If that is your

intent then you should be using wx.BitmapFromBufferRGBA instead of

wx.BitmapFromBuffer, and use widthheight4 instead of the *3 I

mentioned before. Also you should double check that the values you are

fetching from the source buffer are in RGB order.

Robin Dunn

Software Craftsman

http://wxPython.org

King animator333@gmail.com May 21 09:50PM -0700

  Thanks Robin,

Using wx.BitmapFromBufferRGBA, every thing is working fine.

Cheers

Prashant

On Monday, May 21, 2012 11:56:57 PM UTC+5:30, Robin Dunn wrote:

Possible to detect if control is on the screen or not?

Gadget/Steve GadgetSteve@live.co.uk May 21 07:04PM +0100

  On 21/05/2012 1:16 PM, Paul Wiseman wrote:

every time the timer event is fired which I’d rather avoid. Hoping

there will be a an event.

When’s EVT_ACTIVATE supposed to fire? is it based on the app focus?

Yes it is/should be see the demo for splitter window - that logs every

time the focus moves from the window(s) of the application to something

else.

Gadget/Steve

You received this message because you are subscribed to the Google Group wxpython-users.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en