To ID or not to ID

There was a piggyback ride on the "POLL: wx.DC methods" thread about the use of IDs
I think it deserves a closer look.
I argued the presence of IDs in the constructors of the wxPython widgets.
Personally I think they are useless and should disappear.

wxWidgets as a philosophy uses the underlying platform widgets if at
all possible. Other toolkits (such as Swing and QT) do everything
themselves.

Consequently some of what the underlying systems require will leak
through into the API for wxWidgets. While it could in theory be
possible to make wxWidgets work the way you describe, it would become
horrendously complex under the hood.

complexity can be distributed on several layers.

In general wxWidgets supplies default arguments for most things.
You can supply defaults (-1, "") for some as well.

I shouldn't have to. Look at it like this: what would have happen if "print" would have required lets say the style and the color of the text with -1 as fallback to defaults. What if instead of
print "some stuff"
I would have had to write
print -1 -1 "some stuff"
It is not hard to add extra default parameters BUT I shouldn't have to do this.

If you are interested in this kind of stuff, I would recommend
writing simple programs using the various native toolkits out
there (win32, MFC, Xlib, Mac, GTK, PDA etc). Once you understand
all of them and their constraints, come up with an API design
that you can provide on top of them. The wxWidgets author pretty
much did that in the very early 90's and IMHO did a very good
job.

I respect the work of the people involved in the whole wx effort, I also think they did a good job BUT I also think that things can be better.

Some choices today may be a little different from over 10
years ago, but I don't think they would be that much different.

Roger

I think that most of the people who use wxpython use it because is THE BEST python GUI toolkit BUT being the best does not mean that it cannot be improved.

Nobody likes their code to break, or to be forced to update to a new namespace or fix the code so that their scripts work with a new version of the widgets this is why I think a new namespace is the best approach. It should be part of the wxpython and it should provide a wrapper for the wxpython toolkit. It should have a clear, consistent API that would allow programmers to get the most out of the wxpython with minimum effort.

Things I would like to see disappear are IDs and the need for a parent at declaration.
This can be achieved very easy via a "Container", widgets are born "parentless" and are given a parent when they are placed in the Container. A LayoutManager mechanism should replace the current Sizers with default LayoutManagers provided for Containers.

Adoption of the new API should be voluntary not mandatory (different namespace).
We could use Wax as a point of departure.
http://zephyrfalcon.org/weblog/arch_Wax.html
We also need someone to drive this subproject.

Any ideas? opinions?

···

On Sun, 25 Apr 2004 13:06:52 -0700, Roger Binns <rogerb@rogerbinns.com> wrote:

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

Peter Damoc wrote:

There was a piggyback ride on the "POLL: wx.DC methods" thread about the
use of IDs
I think it deserves a closer look.
I argued the presence of IDs in the constructors of the wxPython widgets.
Personally I think they are useless and should disappear.

And I showed you a perfectly good reason why they are useful. So we agree
that they are of no use to some people and a lot of use to others. There
is a default value if you don't care: -1

The remaining problem is how to fix the API. The problem there is that
Python (nor C++ or most other languages) allow you to have arguments
with default values followed by ones without default values. The only
way to get around this would be to re-order the arguments.

> Consequently some of what the underlying systems require will leak
> through into the API for wxWidgets. While it could in theory be
> possible to make wxWidgets work the way you describe, it would become
> horrendously complex under the hood.

complexity can be distributed on several layers.

Yes. That statement doesn't solve the problem though. wxWidgets is
constrained by the underlying systems. No amount of layers takes
that away.

> In general wxWidgets supplies default arguments for most things.
> You can supply defaults (-1, "") for some as well.

I shouldn't have to.

It is infrequent. The only case you have come up with is not using
ids, which has only been practically possible in wxPython 2.5.
Feel free to invent a time machine, visit Julian in 1993 and tell him
that using ids is not needed despite all the toolkits he was putting
wxWidgets on top of using them.

I respect the work of the people involved in the whole wx effort, I also
think they did a good job BUT I also think that things can be better.

Yes, but change is only worthwhile if there is a benefit from the
disruption. Every widget takes the parent and id as the first
two parameters. Changing the API isn't going to make programmers
more productive other than not having to supply -1 where they
don't care about the id. So you save a few hundred keystrokes.
I don't see that justifying the change.

Also note that you are asking for things to be removed, which
takes away functionality other people are already using.

I think that most of the people who use wxpython use it because is THE
BEST python GUI toolkit BUT being the best does not mean that it cannot be
improved.

I don't think anyone would disagree with that statement :slight_smile:

Incidentally I use it because it is cross platform (Windows, Linux and Mac)
and includes printing.

Nobody likes their code to break, or to be forced to update to a new
namespace or fix the code so that their scripts work with a new version of
the widgets this is why I think a new namespace is the best approach. It
should be part of the wxpython and it should provide a wrapper for the
wxpython toolkit. It should have a clear, consistent API that would allow
programmers to get the most out of the wxpython with minimum effort.

Go ahead and do it! Put your words into action. You can do this with
(wx)Python already. Look at how Robin did the script that supplied
extra XY methods, as well as wx package renamers. You can make a new
namespace and put in automatic wrappers that do away with the id argument
but supply -1 to the parent class.

Things I would like to see disappear are IDs and the need for a parent at
declaration.
This can be achieved very easy via a "Container", widgets are born
"parentless" and are given a parent when they are placed in the Container.
A LayoutManager mechanism should replace the current Sizers with default
LayoutManagers provided for Containers.

Like I said, use other toolkits first. Your scheme has a huge problem.
What do you do about methods called before items are added to a sizer
(and what if they are never added?) Many people initialise the settings
etc in their widgets before adding them to sizers. You will have to
remember all that, fake answers for things that require an actual widget
to exist (eg calls asking about size or background colour). And then
create the widget later. Again, you do this by writing your own wrappers
without modifying the existing toolkit.

Incidentally QT also requires a parent object supplied in the constructor
(except for top level items as far as I can tell). They draw their own
widgets so they are not constrained by the underlying gui platform.

Adoption of the new API should be voluntary not mandatory (different
namespace).
We could use Wax as a point of departure.
http://zephyrfalcon.org/weblog/arch_Wax.html
We also need someone to drive this subproject.

Ahh, you want everyone else to do your work? :slight_smile: Go for it. Python
allows you to very easily wrap up other stuff. Proove your concepts
work.

Roger

···

On Sun, 25 Apr 2004 13:06:52 -0700, Roger Binns <rogerb@rogerbinns.com> > wrote:

Peter Damoc wrote:

There was a piggyback ride on the "POLL: wx.DC methods" thread about the
use of IDs
I think it deserves a closer look.
I argued the presence of IDs in the constructors of the wxPython widgets.
Personally I think they are useless and should disappear.

And I showed you a perfectly good reason why they are useful. So we agree
that they are of no use to some people and a lot of use to others. There
is a default value if you don't care: -1

I see them as a backwards compability thing. The way things used to be done. Ok people are still using them BUT I cannot see their value over a more OO aproach (create menus, toolbars and buttons with the same action object)

The remaining problem is how to fix the API. The problem there is that
Python (nor C++ or most other languages) allow you to have arguments
with default values followed by ones without default values. The only
way to get around this would be to re-order the arguments.

> Consequently some of what the underlying systems require will leak
> through into the API for wxWidgets. While it could in theory be
> possible to make wxWidgets work the way you describe, it would become
> horrendously complex under the hood.

complexity can be distributed on several layers.

Yes. That statement doesn't solve the problem though. wxWidgets is
constrained by the underlying systems. No amount of layers takes
that away.

wanna bet? :smiley: take a look at wax or anygui... they manage to hide at least some of the complexity.

> In general wxWidgets supplies default arguments for most things.
> You can supply defaults (-1, "") for some as well.

I shouldn't have to.

It is infrequent. The only case you have come up with is not using
ids, which has only been practically possible in wxPython 2.5.
Feel free to invent a time machine, visit Julian in 1993 and tell him
that using ids is not needed despite all the toolkits he was putting
wxWidgets on top of using them.

wxWidgets and the rest of the toolkits used by wxWidgets are programmed in low level languages like C or C++, they need the IDs, wxPython is Python... and there are some nice features of python that maybe doesn't justify such a strong management.

I respect the work of the people involved in the whole wx effort, I also
think they did a good job BUT I also think that things can be better.

Yes, but change is only worthwhile if there is a benefit from the
disruption. Every widget takes the parent and id as the first
two parameters. Changing the API isn't going to make programmers
more productive other than not having to supply -1 where they
don't care about the id. So you save a few hundred keystrokes.
I don't see that justifying the change.

well, it might not help you BUT it might help a newbie. It might not reduce the size of the code all that much but it will reduce the number of things to worry about, I think it will sharpen the focus on the arguments.

Also note that you are asking for things to be removed, which
takes away functionality other people are already using.

I don't see it as taking away functionality. What use do you see for the parent argument? And if IDs can be replaced by a simpler action mechanism what's the point in using them? Also what I propose is a layer on top of wxpython so if you want to use the old way you still will be able to do it.

I think that most of the people who use wxpython use it because is THE
BEST python GUI toolkit BUT being the best does not mean that it cannot be
improved.

I don't think anyone would disagree with that statement :slight_smile:

Incidentally I use it because it is cross platform (Windows, Linux and Mac)
and includes printing.

Nobody likes their code to break, or to be forced to update to a new
namespace or fix the code so that their scripts work with a new version of
the widgets this is why I think a new namespace is the best approach. It
should be part of the wxpython and it should provide a wrapper for the
wxpython toolkit. It should have a clear, consistent API that would allow
programmers to get the most out of the wxpython with minimum effort.

Go ahead and do it! Put your words into action. You can do this with
(wx)Python already. Look at how Robin did the script that supplied
extra XY methods, as well as wx package renamers. You can make a new
namespace and put in automatic wrappers that do away with the id argument
but supply -1 to the parent class.

there is the wax project, the anygui project and maybe others, as I see it for such an initiative to succed it must have an official bessing, it must be something that the developers of wxpython would recomand to newbies. Such an initiative requires something like an API designer, I don't have enough experience to do this right, sure, I can take let's say the API of Swing and adapt it to the python/wxpython BUT that doesn't guarantees a good result.

Things I would like to see disappear are IDs and the need for a parent at
declaration.
This can be achieved very easy via a "Container", widgets are born
"parentless" and are given a parent when they are placed in the Container.
A LayoutManager mechanism should replace the current Sizers with default
LayoutManagers provided for Containers.

Like I said, use other toolkits first. Your scheme has a huge problem.
What do you do about methods called before items are added to a sizer
(and what if they are never added?) Many people initialise the settings
etc in their widgets before adding them to sizers. You will have to
remember all that, fake answers for things that require an actual widget
to exist (eg calls asking about size or background colour). And then
create the widget later. Again, you do this by writing your own wrappers
without modifying the existing toolkit.

Not really, I think this can be done without faking, maybe via a hidden parent - reparent - repaint mechanism

Incidentally QT also requires a parent object supplied in the constructor
(except for top level items as far as I can tell). They draw their own
widgets so they are not constrained by the underlying gui platform.

Incidentally QT was not writen in/for python. :smiley:

Adoption of the new API should be voluntary not mandatory (different
namespace).
We could use Wax as a point of departure.
http://zephyrfalcon.org/weblog/arch_Wax.html
We also need someone to drive this subproject.

Ahh, you want everyone else to do your work? :slight_smile: Go for it. Python
allows you to very easily wrap up other stuff. Proove your concepts
work.

Wax already proves my concepts (or at least some of them) work. If nobody else volunters... I might give it a try. All I need is a list of guidlines/suggestions and Robin's blessing :smiley:

···

On Mon, 26 Apr 2004 00:29:08 -0700, Roger Binns <rogerb@rogerbinns.com> wrote:

On Sun, 25 Apr 2004 13:06:52 -0700, Roger Binns <rogerb@rogerbinns.com> >> wrote:

Roger

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

Peter Damoc wrote:

> And I showed you a perfectly good reason why they are useful. So we
> agree
> that they are of no use to some people and a lot of use to others. There
> is a default value if you don't care: -1

I see them as a backwards compability thing. The way things used to be
done. Ok people are still using them BUT I cannot see their value over a
more OO aproach (create menus, toolbars and buttons with the same action
object)

Ok, so you don't agree then. I showed you an example from my real world
code where toolbar buttons, menu entries and widgets embedded inside
HTML all have the same action. They are bound to that action using
the id mechanism which automatically ensures that events travel up
the containment hierarchy, and are caught in the right place.

Since you want to take event ids away, show me how to write the code
without using them. (Hint: It would involve inventing a mechanism
whereby you use an integer or string identifier, and walk containment
hierarchies during event handling to find the right handler).

> Yes. That statement doesn't solve the problem though. wxWidgets is
> constrained by the underlying systems. No amount of layers takes
> that away.

wanna bet? :smiley: take a look at wax or anygui... they manage to hide at least
some of the complexity.

Yes, and they did it by removing available functionality! You do not have
access to every single method and bit of data of the underlying wxWidgets
controls (which in turn don't have every single method and bit of data
from the underlying native control, if any).

It is easy once you throw away functionality. One of the reasons I use
wx is because of the rich functionality available. I use a heck of a lot
of it. That helps me be more productive as a developer, and makes my
application easier for end users.

> Yes, but change is only worthwhile if there is a benefit from the
> disruption. Every widget takes the parent and id as the first
> two parameters. Changing the API isn't going to make programmers
> more productive other than not having to supply -1 where they
> don't care about the id. So you save a few hundred keystrokes.
> I don't see that justifying the change.

well, it might not help you BUT it might help a newbie. It might not
reduce the size of the code all that much but it will reduce the number of
things to worry about, I think it will sharpen the focus on the arguments.

I agree that there may be a marginal benefit in re-ordering the parameters
so that newbies don't have to specify an id unless they need to (as is
the case with the style today). However the benefit is small, and it
is a bad idea to design for newbies. The best target is perpetual
intermediates. (See the books by Alan Cooper for descriptions and
reasoning behind that.)

> Also note that you are asking for things to be removed, which
> takes away functionality other people are already using.

I don't see it as taking away functionality. What use do you see for the
parent argument?

It shows the containment hierarchy. There very much is a containment
hierarchy whether you specify it in XRC xml files, in constructors
or using sizers.

And if IDs can be replaced by a simpler action mechanism
what's the point in using them?

Show me how I could do my example without them and I will accept this.

> Ahh, you want everyone else to do your work? :slight_smile: Go for it. Python
> allows you to very easily wrap up other stuff. Proove your concepts
> work.

Wax already proves my concepts (or at least some of them) work. If nobody
else volunters... I might give it a try. All I need is a list of
guidlines/suggestions and Robin's blessing :smiley:

You don't need anyone's blessing :slight_smile: In the open source world, it is
code that matters. Anyone can talk :slight_smile: And it is way better for people
to view and discuss something that already exists and works.

Something like anygui works by giving a lowest common denominator
of functionality. wax works by carefully picking what functionality
it shows. In both cases, they are a higher level thing, but you always
lose capabilities when you go higher level, for the benefit of other
stuff becoming easier. (For example SQL makes it easier to access
a database but impossible to write space invaders).

Roger

I think the problem is that you just aren't pushing the toolkit hard enough. The underlying native toolkits use IDs, so at some point they have to be created. Furthermore there are some places in the wxWidgets/wxPython API where you have to use numeric ids to synchronize operations the most obvious being EVT_UPDATE_UI and EVT_UPDATE_UI_RANGE which I think Roger gave examples of earlier. Some IDs in wxWidgets have a special meaning, in particular dialog button ids and common menu item ids. Offhand, I don't know which of these correspond to a special id on the various OS platforms, but they have a purpose.

Furthermore, while anything that is subclassed from wxWindow can use a 'name' identifier that doesn't actually serve the same role as the ID and 'name' is absent from classes that don't subclass wxWindow, so you can't use it with menus and other UI objects.

It is certainly possible to provide your own layer on top of wxPython that hides the use of ids, PythonCard being one example. There are still "ids" in PythonCard, it is just that it consistently uses string identifiers for all components, menus, etc. in user code. The framework of course still has to make use of GetId(). Sometimes the framework uses -1 for class initialization and sometimes it has to create an id with NewId.

Anyway, this idea is not worth pursuing for wxPython and should be limited to a higher-level toolkit.

ka

···

On Apr 25, 2004, at 11:54 PM, Peter Damoc wrote:

There was a piggyback ride on the "POLL: wx.DC methods" thread about the use of IDs
I think it deserves a closer look.
I argued the presence of IDs in the constructors of the wxPython widgets.
Personally I think they are useless and should disappear.

Since you want to take event ids away, show me how to write the code
without using them. (Hint: It would involve inventing a mechanism
whereby you use an integer or string identifier, and walk containment
hierarchies during event handling to find the right handler).

I can't show you now... as you pointed out... mechanism not created yet. :smiley:

well, it might not help you BUT it might help a newbie. It might not
reduce the size of the code all that much but it will reduce the number of
things to worry about, I think it will sharpen the focus on the arguments.

I agree that there may be a marginal benefit in re-ordering the parameters
so that newbies don't have to specify an id unless they need to (as is
the case with the style today). However the benefit is small, and it
is a bad idea to design for newbies. The best target is perpetual
intermediates. (See the books by Alan Cooper for descriptions and
reasoning behind that.)

I don't think it is a bad ideea to design for newbies, this forces the developer of the toolkit to simplify the API or to delegate complexity to another layer. It is very very hard to make things simple.

And if IDs can be replaced by a simpler action mechanism
what's the point in using them?

Show me how I could do my example without them and I will accept this.

Again, I cannot but will try to cook up something... :smiley:

···

On Mon, 26 Apr 2004 11:25:48 -0700, Roger Binns <rogerb@rogerbinns.com> wrote:

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

Why should it be a "higher-level toolkit" and not a "higher-level layer" of wxpython?
I think there is value in providing that higher level *with* the toolkit.
Why not make wxpython a toolkit for experts and newbies alike.

well I guess is time to stop dreaming. I realised the what I'm asking will require mantaining 2 separate APIs and people who actualy do work on wxpython are already swamped...

I won't give up the ideea tho :smiley: I'll try cooking up something... this is the only way I can kill it :wink:

···

On Mon, 26 Apr 2004 11:51:42 -0700, Kevin Altis <altis@semi-retired.com> wrote:

Anyway, this idea is not worth pursuing for wxPython and should be limited to a higher-level toolkit.

ka

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

I meant that it wouldn't be a standard part of the wxPython.wx or wx namespaces which will continue to track the wxWidgets API. If Wax or Monty or whatever starts coming together as a generally useful higher-level API on top of wxPython, then I'm sure Robin will have no problem including it with the wxPython distribution. However, that framework will have to be very far along before it is included since once it is included people will start writing code to it and backwards compatibility becomes a big issue. I suspect that it will take at least one year at our current pace to come up with a complete "pythonic API" that sits on top of wxPython. It would be based on wxPython 2.6, which should be out later this year. If there isn't a project leader with a good vision that is able to build consensus then it will take much longer than a year or may never get done.

There is a very good reason PythonCard had a package name of PythonCardPrototype in releases prior to 0.8. It still isn't "done" but we are very close to the point where even with the various limitations imposed by the framework it is useful to a particular audience and worth stabilizing for a 1.0 release.

ka

···

On Apr 26, 2004, at 12:36 PM, Peter Damoc wrote:

On Mon, 26 Apr 2004 11:51:42 -0700, Kevin Altis > <altis@semi-retired.com> wrote:

Anyway, this idea is not worth pursuing for wxPython and should be limited to a higher-level toolkit.

ka

Why should it be a "higher-level toolkit" and not a "higher-level layer" of wxpython?
I think there is value in providing that higher level *with* the toolkit.
Why not make wxpython a toolkit for experts and newbies alike.

well I guess is time to stop dreaming. I realised the what I'm asking will require mantaining 2 separate APIs and people who actualy do work on wxpython are already swamped...

I won't give up the ideea tho :smiley: I'll try cooking up something... this is the only way I can kill it :wink:

Peter Damoc wrote:

Anyway, this idea is not worth pursuing for wxPython and should be limited to a higher-level toolkit.

ka

Why should it be a "higher-level toolkit" and not a "higher-level layer" of wxpython?
I think there is value in providing that higher level *with* the toolkit.
Why not make wxpython a toolkit for experts and newbies alike.

I wouldn't mind including such a layer with wxPython (in fact KevinA and I discussed doing this at one time with a possible offshoot of PythonCard) as long as certain criteria were met:

1. Full coverage of the API exposed by wxPython. Anything that can be done with the current layer should be doable with the new layer.

2. It is always kept in sync with changes to wxPython, so I am not waiting for updates to the new layer before I can do a release. I can get CVS access for somebody to work on this, but it means that they would have to be activly building the CVS version of wxPython for developing and testing the new layer, preferably on more than one platform.

3. It is truly simpler to use in reality, not just a regurgitation of current wxPython after it has been through a textbook rendering of what is good OO.

4. It has it's own samples, demo, and docs.

5. I don't have to spend more than very minimal time on it, now or in the future. (IOW, you've made me comfortable that there is not a possibility of the developer(s) of this layer losing interest in it and it starts to stagnate.)

···

On Mon, 26 Apr 2004 11:51:42 -0700, Kevin Altis > <altis@semi-retired.com> wrote:

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

Peter,

Please do not give up yet on this idea. We are looking
at the same issue, some higher level kit which provides
basic, abstracted UI capabilities, like Wax or Anygui.

Such a UI kit may not be able to do all the fancy tricks
supplied by the underlying toolkit, but that is OK, at
least for our needs.

We are building a couple of UI applications in Python with
rather basic functionality requirements. If we do have a
more demanding requirement, it is alsways possible to dig
down and deal with the lower level. But that should be an
exception rather than the rule.

/Jean Brouwers
  ProphICy Semiconductor, Inc.

Peter Damoc wrote:

···

On Mon, 26 Apr 2004 11:51:42 -0700, Kevin Altis > <altis@semi-retired.com> wrote:

Anyway, this idea is not worth pursuing for wxPython and should be limited to a higher-level toolkit.

ka

Why should it be a "higher-level toolkit" and not a "higher-level layer" of wxpython?
I think there is value in providing that higher level *with* the toolkit.
Why not make wxpython a toolkit for experts and newbies alike.

well I guess is time to stop dreaming. I realised the what I'm asking will require mantaining 2 separate APIs and people who actualy do work on wxpython are already swamped...

I won't give up the ideea tho :smiley: I'll try cooking up something... this is the only way I can kill it :wink:

I have a client that wants an application to run via the Internet, an intranet or a desktop (when the PC is a stand alone machine).

We are thinking about using ZOPE with HTML forms to ask questions/ get the answers from the users for the Internet/Intranet solution. We plan on just using radio buttons.

I was thinking if possible, I would like to use the same python code to generate the questions & collect the answers on the stand alone desktop as the Internet/Intranet solutions.

Could I use a wxIE or wxMozilla window for the forms. I know I can display forms, but what about reading the form (after the user selects thier answers via the radio buttons and hits a "submit my answers" button)...how does one do this?

Thanks
    Frank

···

============
Frank Wilder
610-370-1039

well... now I know why there is no such layer in wx :smiley:

All 5 points are very well thought, cold water for my daytime dreaming. :smiley:

I'll just have to wait and see... :smiley:

···

On Mon, 26 Apr 2004 13:14:51 -0700, Robin Dunn <robin@alldunn.com> wrote:

Peter Damoc wrote:

On Mon, 26 Apr 2004 11:51:42 -0700, Kevin Altis >> <altis@semi-retired.com> wrote:

Anyway, this idea is not worth pursuing for wxPython and should be limited to a higher-level toolkit.

ka

  Why should it be a "higher-level toolkit" and not a "higher-level layer" of wxpython?
I think there is value in providing that higher level *with* the toolkit.
Why not make wxpython a toolkit for experts and newbies alike.

I wouldn't mind including such a layer with wxPython (in fact KevinA and I discussed doing this at one time with a possible offshoot of PythonCard) as long as certain criteria were met:

1. Full coverage of the API exposed by wxPython. Anything that can be done with the current layer should be doable with the new layer.

2. It is always kept in sync with changes to wxPython, so I am not waiting for updates to the new layer before I can do a release. I can get CVS access for somebody to work on this, but it means that they would have to be activly building the CVS version of wxPython for developing and testing the new layer, preferably on more than one platform.

3. It is truly simpler to use in reality, not just a regurgitation of current wxPython after it has been through a textbook rendering of what is good OO.

4. It has it's own samples, demo, and docs.

5. I don't have to spend more than very minimal time on it, now or in the future. (IOW, you've made me comfortable that there is not a possibility of the developer(s) of this layer losing interest in it and it starts to stagnate.)

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

Hi Frank,
Your application can start a small server (check cherrypy http://www.cherrypy.org/ it's really good for this kind of stuff) and post your values to it.
Just be aware that some windows virus programs/personal-firewalls will alert the user about his/her machine been abducted by
aliens when a anything comes close to a port (e.g.. 8080 or whatever port you choose)
The other alternative is to use javascript to communicate with your wxIE control.
It works something like this:
you use the javascript url protocol to send actions to the page
ie.navigate("javascript:window.status='#answer#'+ document.myform.myfield.value")

if you register the EVT_MSHTML_STATUSTEXTCHANGE(self,-1,self.statusMessage)
Then your page can communicate back to your app like this:
def statusMessage(self,event):
  prefix = '#answer#'
  command = event.GetText1()
  if command[0:len(prefix)] == prefix:
    print "my comand:%s" % str[len(prefix):len(command)]

The reason you have to use a prefix to pass your commands back is that when the user rolls the mouse
over a link the url will be sent as a status text, the same goes for other events.
hope that helps.
Ronald

/ronald

···

On Apr 26, 2004, at 10:36 PM, Frank Wilder wrote:

I have a client that wants an application to run via the Internet, an intranet or a desktop (when the PC is a stand alone machine).

We are thinking about using ZOPE with HTML forms to ask questions/ get the answers from the users for the Internet/Intranet solution. We plan on just using radio buttons.

I was thinking if possible, I would like to use the same python code to generate the questions & collect the answers on the stand alone desktop as the Internet/Intranet solutions.

Could I use a wxIE or wxMozilla window for the forms. I know I can display forms, but what about reading the form (after the user selects thier answers via the radio buttons and hits a "submit my answers" button)...how does one do this?

Thanks
   Frank

============
Frank Wilder
610-370-1039

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

Frank Wilder wrote:

Could I use a wxIE or wxMozilla window for the forms. I know I can display forms, but what about reading the form (after the user selects thier answers via the radio buttons and hits a "submit my answers" button)...how does one do this?

You woudl need a server for the http to post to, but there is no reason that couldn't be part of your app too.

···

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

After reading Robin's post... all I can say is that I will try to do a spike to see just how feasible is something like this for me. I seriously doubt that I will ever have the time to do it all by myself but if I can create something usable in small apps maybe people will join.

Points 2 and 3 from Robin's argument are killers...
2 requires an attitude of "open the faucet and leave it running", highly time consumming.
3 requires design capabilities way beyond my level.

Anyway, thanks for the encouragement. :smiley:

···

On Mon, 26 Apr 2004 13:29:49 -0700, Jean Brouwers <JBrouwers@ProphICy.com> wrote:

Peter,

Please do not give up yet on this idea. We are looking
at the same issue, some higher level kit which provides
basic, abstracted UI capabilities, like Wax or Anygui.

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

Peter Damoc wrote:

···

On Mon, 26 Apr 2004 13:29:49 -0700, Jean Brouwers > <JBrouwers@ProphICy.com> wrote:

Peter,

Please do not give up yet on this idea. We are looking
at the same issue, some higher level kit which provides
basic, abstracted UI capabilities, like Wax or Anygui.

After reading Robin's post... all I can say is that I will try to do a spike to see just how feasible is something like this for me. I seriously doubt that I will ever have the time to do it all by myself but if I can create something usable in small apps maybe people will join.

Points 2 and 3 from Robin's argument are killers...
2 requires an attitude of "open the faucet and leave it running", highly time consumming.

An alternative would be to find a way to generate parts of the new layer using the info in docs/xml/wxPython-metadata.xml then it could be mostly automated.

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

will look into it...

···

On Mon, 26 Apr 2004 16:18:57 -0700, Robin Dunn <robin@alldunn.com> wrote:

Peter Damoc wrote:

On Mon, 26 Apr 2004 13:29:49 -0700, Jean Brouwers >> <JBrouwers@ProphICy.com> wrote:

Peter,

Please do not give up yet on this idea. We are looking
at the same issue, some higher level kit which provides
basic, abstracted UI capabilities, like Wax or Anygui.

  After reading Robin's post... all I can say is that I will try to do a spike to see just how feasible is something like this for me. I seriously doubt that I will ever have the time to do it all by myself but if I can create something usable in small apps maybe people will join.
Points 2 and 3 from Robin's argument are killers...
2 requires an attitude of "open the faucet and leave it running", highly time consumming.

An alternative would be to find a way to generate parts of the new layer using the info in docs/xml/wxPython-metadata.xml then it could be mostly automated.

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html