[Pythonmac-SIG] wxWindows Example

Chris Barker cbarker@jps.net
Wed, 14 Mar 2001 10:09:48 -0800


tom smith wrote:

> > If you want an example of what an application using the wxWindows
> > library looks like on the Mac, check out:
> >
> > http://www.cs.cmu.edu/~music/audacity/
 
> Looks OK, but saw no evidence of ANY mac widgets. No drag and drop,
> contextual menus. 

In many ways, that is not the best example of the wxWindows from a "use
of the native widgets" point of view. All the buttons are custom
designed. They ARE NOT windows widgets. wx does not render it's own
widgets, so it isn't emulating windows unless the author chooses to make
his own buttons look like windows buttons. If you use standard
wxButtons, the native ones are used.

>Hell, even the button with a cursor image on it is WHITE .

That is a custom bitmap button. It is a cross platform app. There are
always trade offs between consistancy across platforms and native look.
With a custom bitmap button like the cursor image one, an author would
have to have separate bitmaps for each platform in order to get an
absolutely native look (BTW, the arrow cursor on my Linux box is black,
and I think is is on Windows as well, so who knows why he decided to
draw
it that way). If you want all your custom buttons to look native, you
can
certainly do that. For that matter, you can make all your custom buttons
look more like Mac buttons, and they will look that way on all
platforms.
 
> It looks thoroughly like a windows app. After 1 minute of recording me
> whistling it bombed my computer.

This is what the author of the program said about the Mac port:

" Audacity works reasonably well on the Mac.  It definitely has bugs and
 is not as stable on the Mac (yet), but it shows that we're definitely
 getting close."

I'm sure he'd appreciate a bug report, and it's likely that bug has
nothing to do with wx anyway.

> ahem... what are the other options...

The only other option is tk. While at the moment, tk does function at
least somewhat on the Mac, It isn't really robust enough for substantial
projects, and I don't think it has a really promising future (see Jack's
previous post). There is no question that development of wxMac is behind
the other ports, but I do think it has a lot of promise. If no one uses
it, and no Mac developers take an active interest, it won't get better.
wxPython has given a real boost to wxWindows development (on Windows and
*nix) by giving it much more exposure, a larger user base, and a larger
develper base. wxMacPython could do the same for the Mac port if we can
get it started.

I work in a mostly Mac house, but we do need to distribute our software
to others, and over 90% of our other users are Windows based. We have
spent an enormous amount of time and money supporting both platforms. We
can't continue to do that, so we need to find a cross platform solution,
or the Mac will be dropped. I have been surprised that there don't seem
to be any good tools for cross-platform develpment of Mac and Windows
and Unix. (Real Basic is the first that holds any real promise, but it
has it's limitations, and doesn't support *nix. I'd also much rather see
and open source option). I guess the reality is that if you really
wanted to reach the broadest possible audience, you wouldn't be
developing for the Mac in the first place, so Mac develpers don't seem
interested in cross platform tools.

I'm starting a project now using Python and wxPython, developing on
Linux and Windows. I would really like to have a Mac port of my app
eventually, but it's not going to happen if I have to re-write all the
GUI code. There must be others in my situation.


There was a recent article on wxPython in IBM developerworks. Check out: 

http://www.ibm.com/developerworks/library/l-wxpy/

For a nice little intro. It's written for Python Newbies, but it's good
PR anyway.

-Chris



-- 
Christopher Barker,
Ph.D.                                                           
cbarker@jps.net                      ---           ---           ---
http://www.jps.net/cbarker          -----@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Water Resources Engineering       ------   @    ------   @   ------   @
Coastal and Fluvial Hydrodynamics -------      ---------     --------    
------------------------------------------------------------------------
------------------------------------------------------------------------