[ANN] wxSqueak update

Rob Gayvert rtg at rochester.rr.com
Tue Nov 16 12:09:52 UTC 2004


Andreas,

If you grab the source version from my site, you'll find the changes
in a file called win32-vm-changes.txt. I'll list them here as well.
Basically there's a call at startup, one at shutdown, and a patch to
the event handling to restrict the get/peek to the Squeak window.

For OS X, I had hoped to keep the event processing in a separate
thread (and possibly handle callbacks without calling interpret()),
but couldn't get it to work, so I had to substitute a single-threaded
event method. These changes are in macosx-vm-changes.txt.

You might also be interested in the callback mechanism used for event
handling and method overrides. This uses a scheme you outlined some
time ago on this list, involving setjmp/longjmp and interpret(). I
think my current implementation is stable but unsatisfying. Callbacks
may occur at awkward times (e.g., while calling a primitive to create
a widget, or while handling another event), so a lot can go on in a
seemingly simple scenario. I had to resort to a clumsy 2-step process
to return values safely, but I'm sure there must be a cleaner way that
suspends/resumes processes in a manner that makes this unnecessary.

.. Rob

-------------------------------------------------------


sqWin32Intel.c (493)
-------------------

#ifdef _WXSQUEAK
extern void wxExitApp();
extern void wxInitApp(struct VirtualMachine* vm);
#endif

sqWin32Intel.c (536)
-------------------
#ifdef _WXSQUEAK
  wxExitApp();
#endif

sqWin32Intel.c (774)
-------------------

#ifdef _WXSQUEAK
  wxInitApp(sqGetInterpreterProxy());
#endif

sqWin32Intel.c (774)
-------------------
#ifdef _WXSQUEAK
  // for wx, we need to constrain peek/get to consider only the Squeak
window
  while(PeekMessage(&msg,stWindow,0,0,PM_NOREMOVE))
    {
      GetMessage(&msg,stWindow,0,0);
#else
  while(PeekMessage(&msg,0,0,0,PM_NOREMOVE))
    {
      GetMessage(&msg,0,0,0);
#endif

-------------------------------------------------------


> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of
> Andreas Raab
> Sent: Monday, November 15, 2004 11:09 PM
> To: The general-purpose Squeak developers list
> Subject: Re: [ANN] wxSqueak update
>
>
> Hi Rob -
>
> > say how much would be required to make wxSqueak work with 2.2. A few
> > VM changes are necessary (about 5 lines in Win32, but more for OS X).
>
> Care to send me these five lines?
>
> Cheers,
>   - Andreas
>
> ----- Original Message -----
> From: "Rob Gayvert" <rtg at rochester.rr.com>
> To: "The general-purpose Squeak developers list"
> <squeak-dev at lists.squeakfoundation.org>
> Sent: Monday, November 15, 2004 10:44 AM
> Subject: RE: [ANN] wxSqueak update
>
>
> > PhiHo,
> >
> > I'm a relative newcomer to Squeak (I started with 3.2), so I can't
> > say how much would be required to make wxSqueak work with 2.2. A few
> > VM changes are necessary (about 5 lines in Win32, but more for OS X).
> > If you leave out the WxWidgets-Tools category, there should be no
> > interaction with anything Morphic. Event handling for wx objects is
> > done is separate processes, so there isn't any dependency on the normal
> > Squeak event loop. The main issue with earlier versions of Squeak
> > would probably be with the plugin generation. Can 2.2 use plugin source
> > generated by later versions? If not, it might be a bit tricky to
> > recreate the source, since I'm subclassing
> SmartSyntaxPluginCodeGenerator,
> > which is of more recent vintage.
> >
> > .. Rob
> >
> >
> >> -----Original Message-----
> >> From: squeak-dev-bounces at lists.squeakfoundation.org
> >> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]On Behalf Of
> >> SmallSqueak
> >> Sent: Sunday, November 14, 2004 3:32 AM
> >> To: The general-purpose Squeak developers list
> >> Subject: Re: [ANN] wxSqueak update
> >>
> >>
> >> Rob Gayvert wrote:
> >>
> >>
> >> > An update of my interface to wxWidgets is available at
> >> >
> >> >           http://homepage.mac.com/rgayvert/wxsqueak.html
> >> >
> >> > Below are some notes on what has changed in this version.
> >> >
> >> > Any comments or suggestions are appreciated.
> >> >
> >> >
> >>
> >>     This is cool. Thanks for sharing.
> >>
> >>     Does wxSqueak require Morphic ?
> >>     What version of Squeak does wxSqueak require ?
> >>     (I am thinking of wxSqueak from Squeak 2.2 :-)
> >>
> >>     Cheers,
> >>
> >>     PhiHo.
> >>
> >>
> >>
> >>
> >
>
>
>




More information about the Squeak-dev mailing list