Java Webstart versus Flash

I have used Flash. Its good points are:
  - very easy to install on Windows machines
  - excellent curve artistry
  - excellent animation
  - good Action Script language
  - its movies tend to be quite compact (few bytes long)

···

---------

Flash's weak points are:
  - heavily oriented to people who like to or can do a lot with their
mouses
  - Action Script cannot replace the objects created or placed with the
mouse
  - There is not a Python interface to either Flash or to Action Script
  - It does not seem to be able to refer to external files, so the
pictures, web pages, and sounds you play all seem to need to be INSIDE
the flash movie (unlike html files that pull in a lot of files outside
the html script).

----------

I just downloaded Java Webstart and then clicked on the first four demos
at the Sun site
http://java.sun.com/products/javawebstart/demos.html.

The files to run the demos were missing, so I could not see Java
Webstart in action to make a comparison.

The installation of Java Webstart was very easy and the fifth demo (the
Java Web Start Application Manager launched the first time).

When the demo is fixed, someone should compare this to Flash, as the
original poster requested.

Mike

Hello. I'm having problems getting a modeless dialog to return a value for
wxID_OK (from a pressed button). Is this possible, or does it only work
for dialog.ShowModal() ??

thanks.
-Steve

Hello. I'm having problems getting a modeless dialog to return a value

for

wxID_OK (from a pressed button). Is this possible, or does it only work
for dialog.ShowModal() ??

I think only ShowModal will return the dialog's return code, but you should
also be able to get it with dialog.GetReturnCode(). The key is that the
button event handler needs to set it with SetReturnCode or EndModal, which
is done in the default handlers for wxID_OK and wxID_CANCEL.

···

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

Hmm, so I'm trying something along these lines:

class NewDialog(wxDialog):
    def __init__(self, parent, ID, title, position, size):
        wxDialog.__init__(self, parent, ID, title, wxDefaultPosition,
wxSize(400,400))

        self.ID_OKB = 101
        self.ID_CANCELB = 102

        self.ok_b = wxButton(self, self.ID_OKB, "OK", wxPoint(160,40),
wxSize(60,30))
        self.cancel_b = wxButton(self, self.ID_CANCELB,
"CANCEL",wxPoint(160, 240), wxSize(60,30))

        EVT_BUTTON(self, self.ID_CANCELB, self.Cancel)
        EVT_BUTTON(self, self.ID_OKB, self.OK)

    def Cancel(self, event):
        self.SetReturnCode(0)
        self.Destroy()

    def OK(self, event):
        self.SetReturnCode(1)
        self.Destroy()

Class GetIt:
    def GetVal(self):
        self.new_dialog = NewDialog(NULL, -1, "Get Val", wxDefaultPosition,
wxDefaultSize)
        self.new_dialog.Show(true)
        val = self.new_dialog.GetReturnCode()
        print val

# What do I need to tweak to get this to work?? BTW, the calling class is
in a separate module from the callee, so I'm having problems trying to
figure out a workaround that doesn't involve the creation of global
variables.....

thanks.

>

I think only ShowModal will return the dialog's return code, but you

should

···

also be able to get it with dialog.GetReturnCode(). The key is that the
button event handler needs to set it with SetReturnCode or EndModal, which
is done in the default handlers for wxID_OK and wxID_CANCEL.

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

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

Class GetIt:
    def GetVal(self):
        self.new_dialog = NewDialog(NULL, -1, "Get Val",

wxDefaultPosition,

wxDefaultSize)
        self.new_dialog.Show(true)
        val = self.new_dialog.GetReturnCode()
        print val

# What do I need to tweak to get this to work?? BTW, the calling class is
in a separate module from the callee, so I'm having problems trying to
figure out a workaround that doesn't involve the creation of global
variables.....

One of the differences between Show and ShowModal is that the call to the
ShowModal method does not return until the dialog has been "completed," IOW,
until some event handler calls EndModal(return_value). In your code above,
the call to GetReturnCode happens and returns before the user has a chance
to do anything with the dialog because Show just tells the window manager to
display the window when it feels like it (usually right away) and then
continues on.

If you really need the value from the dialog immediately like this then you
should use ShowModal. Otherwise you should reorganize your code such that
the dialog can notify other parts of the program when the button events
happen. One way to do this is to use the event system, either creating your
own events and sending them to other event handlers, or perhaps even hooking
your dialog's button events directly to handlers elsewhere in your program.
Of course your button events could also just call methods of other objects
directly...

···

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

I am very please to see a discussion on this topic.

We are working on a wxPython replacement for our IE client application.
Part of this involves the creation of an auto-updating Python/wxPython
sandbox that can download and run code from over a network. It is
responsible for making sure the code is up to date and running securely in a
sandbox.

So far we have looked at the various python application distribution tools,
including McMillans 'installer' as well as 'freeze'. Both have their
problems. We have also taken a look at the internals of Grail.

Essentially we'd like to have a distributable, safe, python scriptable,
gui/application environment as a complete replacement over a browser.

Anyone interested in this goal, please let me know. Perhaps we can
collaborate.

Joshua

···

----- Original Message -----
From: "Mike Brenner" <mikeb@mitre.org>
To: <wxpython-users@lists.wxwindows.org>
Sent: Tuesday, March 20, 2001 8:47 AM
Subject: Re: [wxpython-users] Java Webstart versus Flash

I have used Flash. Its good points are:
- very easy to install on Windows machines
- excellent curve artistry
- excellent animation
- good Action Script language
- its movies tend to be quite compact (few bytes long)

---------

Flash's weak points are:
- heavily oriented to people who like to or can do a lot with their
mouses
- Action Script cannot replace the objects created or placed with the
mouse
- There is not a Python interface to either Flash or to Action Script
- It does not seem to be able to refer to external files, so the
pictures, web pages, and sounds you play all seem to need to be INSIDE
the flash movie (unlike html files that pull in a lot of files outside
the html script).

----------

I just downloaded Java Webstart and then clicked on the first four demos
at the Sun site
http://java.sun.com/products/javawebstart/demos.html.

The files to run the demos were missing, so I could not see Java
Webstart in action to make a comparison.

The installation of Java Webstart was very easy and the fifth demo (the
Java Web Start Application Manager launched the first time).

When the demo is fixed, someone should compare this to Flash, as the
original poster requested.

Mike

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users