What's this "-1"??

The ID of the widget you want to create. If you pass a -1, the
library will generate a unique ID for you.

You almost never need a widget ID, but you've got to specify
one anyway everytime you create a widget.

···

On 2006-01-20, Sbaush <sbaush@gmail.com> wrote:

Hi. I've generated a GUI from wxGlade. This is one line of my code. In a lot
of lines there is this -1

What is this???

self.label_1 = wxStaticText(self.notebook_2_pane_1, -1, "Select the chain")

--
Grant Edwards grante Yow! I guess you guys got
                                  at BIG MUSCLES from doing too
                               visi.com much STUDYING!

thanks all
http://wiki.wxpython.org/index.cgi/wxPython_20Style_20Guide is a great page!!
Thanks again

···

2006/1/20, Christopher Barker < Chris.Barker@noaa.gov>:

Grant Edwards wrote:

but, almost all of the example code in existence uses
positional arguments, and most of my little apps are started by
copying/modifying demo code.

Me too.

One of my goals is writing up that style guide was that we could all, as

a group, work on updating the Demo, Wiki, and examples to use modern
wxPython style. I think that would be a major help to newbies, and the
rest of us that still borrow code from the examples.

-Chris


Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov


To unsubscribe, e-mail:
wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org


Sbaush

That's one of the reasons that I strongly prefer Dabo. Parameters are
named, so you don't have to rely on arbitrary positions.

And since Dabo doesn't use IDs at all, this thread would never have
even started! :slight_smile:

···

On 1/20/06, Grant Edwards <grante@visi.com> wrote:

On 2006-01-20, Christopher Barker <Chris.Barker@noaa.gov> wrote:
> Grant Edwards wrote:
>
>> You almost never need a widget ID, but you've got to specify
>> one anyway everytime you create a widget.
>
> Unless you use keyword arguments:
> self.label_1 = wxStaticText(self.notebook_2_pane_1, label="Select the
> chain")

I should use that style more.

but, almost all of the example code in existence uses
positional arguments, and most of my little apps are started by
copying/modifying demo code.

--

# p.d.

What is DABO?

···

2006/1/20, Peter Decker pydecker@gmail.com:

On 1/20/06, Grant Edwards grante@visi.com wrote:

On 2006-01-20, Christopher Barker Chris.Barker@noaa.gov wrote:

Grant Edwards wrote:

You almost never need a widget ID, but you’ve got to specify
one anyway everytime you create a widget.

Unless you use keyword arguments:
self.label_1 = wxStaticText(self.notebook_2_pane_1, label=“Select the
chain”)

I should use that style more.

but, almost all of the example code in existence uses
positional arguments, and most of my little apps are started by

copying/modifying demo code.

That’s one of the reasons that I strongly prefer Dabo. Parameters are
named, so you don’t have to rely on arbitrary positions.

And since Dabo doesn’t use IDs at all, this thread would never have

even started! :slight_smile:

p.d.


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org


Sbaush

I agree with all of the suggestions for improving the demo. Personally,
though, I would be willing to work on some small pieces of that task
without any prestige or prize system, if there were a list of tasks, and
an easy way to say "I'll try that one."

···

On 1/21/06, Peter Damoc <peter@sigmacore.net> wrote:

Move the Demo to MVP :wink:
Create minimal samples and advanced samples for every widget.
Properly document the perils of multithreading environments

well... I could go on... but short of cloning Robin I can't see this
really happening.

There is one more way... described by Paul Graham in:
How to Do What You Love
PRESTIGE

If Robin could implement a prestige system in wxPython maybe things could
move a little faster.
All it takes is a system that could hold a quantifier of work done... and
a Top of best contributers.
Then... a "We want this" list from where people wanting to move up that
top could start doing work.
For extra motivation maybe a real prize could be awarded for the top
contributer (or top 3) and diplomas for the rest.
The real prize could be something rather cheap like an iPod, a MacMini or
an Optimus keyboard.

What do you think?