[wxPython] Error Report plus Minor Problems and Questions

Running through the Tutorial App on the new Boa under
Linux (RH7.2), Python2.2.1, wxPython2.3.2/GTK I get
the following error when adding a wxMenu on the Data
View of wxFrame1 or selecting an already added wxMenu:

04:40:49 PM: TypeError: unbound method
properties() must be called with CollectionDTC
instance as first argument (got MenuDTC instance
instead)Traceback (most recent call last):
04:40:49 PM: TypeError: unbound method
properties() must be called with CollectionDTC
instance as first argument (got MenuDTC instance
instead) File
"/usr/lib/python2.2/site-packages/boa/Views/DataView.py",
line 197, in OnObjectSelect
04:40:49 PM: self.updateSelection()
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Views/DataView.py",
line 190, in updateSelection
04:40:49 PM:
self.inspector.selectObject(self.objects[self.selection[0][0]][0],
false)
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Inspector.py",
line 222, in selectObject
04:40:49 PM: c_p = compn.getPropList()
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Companions/BaseCompanions.py",
line 138, in getPropList
04:40:49 PM: propList =
RTTI.getPropList(self.control, self)
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/RTTI.py", line
145, in getPropList
04:40:49 PM: xtraProps = cmp.properties()
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Companions/UtilCompanions.py",
line 220, in properties
04:40:49 PM: props =
CollectionDTC.properties(self)
04:40:49 PM: TypeError: unbound method
properties() must be called with CollectionDTC
instance as first argument (got MenuDTC instance
instead)

There are some other issues with Menus relating to
properties mysteriously dissapearing (not just the
values but the attributes!) but I need to test further
before specifying the precise conditions under which
they arise.
Some other minor points I'll raise before I forget
them are:

(1) For some reason, when boa is invoked, instead of
being laid out so that the Palette, Inspector and
Editor abut each other neatly without overlap they are
laid out erratically. This was not formerly the case.

(2) Clicking on the 'wxPython Documentation' icon
doesn't take you into the document's index page.
Instead you get a blank page and need to navigate via
the contents bar. Minor point I know, but it's there.

(3) When an object is selected in the Palette it's not
displayed in the Palette check-box/label as specified.
Also, that check-box/label area probably needs a bit
more space.

(4) Another trivial one: In the Help Index facility
you have the "Show All" option. However, nowhere near
enough scrolling space is allowed for this operation.
Thus you get the last few hundred of the 13,000 or so
entries.

A couple of questions:

(1) Is there some way to set the default save area for
your work to somewhere other than the Boa root (ie.
/usr/.../site-packages/boa ?) This is a pain and
dangerous.

(2) Is there somewhere I can change the default size
of application frames?

John Bell

···

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com

Hi John,

Bell John wrote:

Running through the Tutorial App on the new Boa under
Linux (RH7.2), Python2.2.1, wxPython2.3.2/GTK I get
the following error when adding a wxMenu on the Data
View of wxFrame1 or selecting an already added wxMenu:

04:40:49 PM: TypeError: unbound method
properties() must be called with CollectionDTC
instance as first argument (got MenuDTC instance
instead)Traceback (most recent call last):
04:40:49 PM: TypeError: unbound method
properties() must be called with CollectionDTC
instance as first argument (got MenuDTC instance
instead) File
"/usr/lib/python2.2/site-packages/boa/Views/DataView.py",
line 197, in OnObjectSelect
04:40:49 PM: self.updateSelection()
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Views/DataView.py",
line 190, in updateSelection
04:40:49 PM:
self.inspector.selectObject(self.objects[self.selection[0][0]][0],
false)
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Inspector.py",
line 222, in selectObject
04:40:49 PM: c_p = compn.getPropList()
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Companions/BaseCompanions.py",
line 138, in getPropList
04:40:49 PM: propList =
RTTI.getPropList(self.control, self)
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/RTTI.py", line
145, in getPropList
04:40:49 PM: xtraProps = cmp.properties()
04:40:49 PM: File
"/usr/lib/python2.2/site-packages/boa/Companions/UtilCompanions.py",
line 220, in properties
04:40:49 PM: props =
CollectionDTC.properties(self)
04:40:49 PM: TypeError: unbound method
properties() must be called with CollectionDTC
instance as first argument (got MenuDTC instance
instead)

Ouch :frowning:

In Companions.UtilCompanions line 220
change
        props = CollectionDTC.properties(self)
to
        props = UtilityDTC.properties(self)

This didn't cause an error before Python 2.2 (even tho it's a typo)
I still use 2.1.

There are some other issues with Menus relating to
properties mysteriously dissapearing (not just the
values but the attributes!) but I need to test further
before specifying the precise conditions under which
they arise.
Some other minor points I'll raise before I forget
them are:

(1) For some reason, when boa is invoked, instead of
being laid out so that the Palette, Inspector and
Editor abut each other neatly without overlap they are
laid out erratically. This was not formerly the case.

Blame the window manager. It's definitely not Boa.

(2) Clicking on the 'wxPython Documentation' icon
doesn't take you into the document's index page.
Instead you get a blank page and need to navigate via
the contents bar. Minor point I know, but it's there.

Ok, done.
In Explorer.gtk.cfg under the [help] section, in the palettehelp
dictionary change the wx definition from:
'wx': 'wxPython Documentation',
to:
'wx': 'wxWindows 2.3: A portable C++ and Python GUI toolkit',

(3) When an object is selected in the Palette it's not
displayed in the Palette check-box/label as specified.

It's actually still there if you move your mouse over it, you'll see
it sometimes. It's a wxGTK problem.

Also, that check-box/label area probably needs a bit
more space.

Ok.

(4) Another trivial one: In the Help Index facility
you have the "Show All" option. However, nowhere near
enough scrolling space is allowed for this operation.
Thus you get the last few hundred of the 13,000 or so
entries.

The help facility uses the wxHelpController classes.

A couple of questions:

(1) Is there some way to set the default save area for
your work to somewhere other than the Boa root (ie.
/usr/.../site-packages/boa ?) This is a pain and
dangerous.

Under Preferences you may set the pref exWorkingDirectory to something
other than ''. Blank means that Boa uses it's process' current working
directory. If you just started Boa from your projects' directory
(instead of the Boa root directory) your projects directory will be
used as the 'default save area'.
You may also change the current directory in the Explorer by selecting
a File Explorer item, right clicking and selecting 'Set as os.cwd'.
That's three ways, enough ? :wink:

(2) Is there somewhere I can change the default size
of application frames?

Not yet, on Windows wxDefaultSize is used. This did not work well
on Linux and I defined it as 2/3rds of the screen size.
See Preferences.py, wxDefaultFrameSize

···

John Bell

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com

--
Riaan Booysen
___________________________________________________
Boa Constructor - RAD GUI building IDE for wxPython
     http://boa-constructor.sourceforge.net

I have a couple of questions about what goes on "behind the
scenes" between a wxToolbar and a wxSatus-bar.

In the demo a status bar is created (without saving a reference to it).
Then a toolbar is created, and tools added with AddSimpleTool.
There is no reference to the status bar in this process, but
afterwards when the mouse "enters" a tool bitmap its "long help" is
displayed in the status bar...
I have reproduced this in my own code and of course the same
happens.

Here are the questions :

1) is there an explanation somewhere (other than in the C++ code :slight_smile:
on how the little bit of magic happens ?

2) when the mouse leaves the toobar altogether, the last displayed
help string is not erased. How could I add this without losing the
previous behaviour ?

TIA,
fp

I have a couple of questions about what goes on "behind the
scenes" between a wxToolbar and a wxSatus-bar.

In the demo a status bar is created (without saving a reference to it).
Then a toolbar is created, and tools added with AddSimpleTool.
There is no reference to the status bar in this process, but
afterwards when the mouse "enters" a tool bitmap its "long help" is
displayed in the status bar...
I have reproduced this in my own code and of course the same
happens.

Here are the questions :

1) is there an explanation somewhere (other than in the C++ code :slight_smile:
on how the little bit of magic happens ?

It's just some built-in cooperation between the toolbar and the frame. If a
tool has longHelp, then the toolbar checks if the parent window is a frame
and if so calls SetStatusText. The menubar does a similar thing, but uses
events.

2) when the mouse leaves the toobar altogether, the last displayed
help string is not erased. How could I add this without losing the
previous behaviour ?

The toolbar sample in the demo uses a timer to clear it.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!