Michael Perscheid | 3 Nov 2011 11:54

[ANN] Squeak Beginner Screencasts

Hi all,

as we teach Squeak as part of our software engineering lectures, we have prepared several
Squeak/Smalltalk-related screencasts that should help our students to get started. Now, I'd like to
announce that we make these videos available for the community.

https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/squeak_screencasts

Moreover, I'd like to acknowledge our student assistants, Eric Seckler, Robin Schreiber, and Partick
Rein for all their help with these screencasts.

We will complete the list of available screencasts step by step. 
If you have any wishes for new videos and feedback to existing ones, please let us know.

Best regards,
Michael
Sean P. DeNigris | 4 Nov 2011 18:47
Gravatar

Re: Is there a tandard way to attach context menus

To add a context menu to a morph class:
1. Enable mouse handling:
  #handlesMouseDown: anEvent
    ^ true.
2. Decide if you want to start with the standard menu, or go totally custom
  a. If you want to include the standard options:
    1. defaultYellowButtonMenuEnabled
        ^ true.
    2. #addCustomMenuItems:hand: with your morph-specific items
  b. To take full control and start from scratch, specify menu items in
#addYellowButtonMenuItemsTo:event: 

Probably too late to help the OP ;-) But I wanted to document this,
especially for myself when I forget in two weeks!

Sean

--
View this message in context: http://forum.world.st/Is-there-a-tandard-way-to-attach-context-menus-tp108458p3991035.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
Sean P. DeNigris | 4 Nov 2011 21:53
Gravatar

Canceling a PipeableOSProcess

How do I cancel a running PipeableOSProcess that is taking a long time, like
ctrl-c at the command line?

Thanks.
Sean

--
View this message in context: http://forum.world.st/Canceling-a-PipeableOSProcess-tp3991640p3991640.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
David T. Lewis | 5 Nov 2011 01:17
Picon
Favicon

Re: Canceling a PipeableOSProcess

On Fri, Nov 04, 2011 at 01:53:25PM -0700, Sean P. DeNigris wrote:
> How do I cancel a running PipeableOSProcess that is taking a long time, like
> ctrl-c at the command line?

You can kill the external process with a unix signal like this:

  p := PipeableOSProcess command: '/bin/sh'.
  p processProxy terminate.

However, in general, it is better to permit the external process to exit
normally. Usually this just involves closing the input to the process
and reading any available output. For example, if you run /bin/sh in a
PipeableOSProcess, you can terminate it simply by closing the input to
the shell to allow the shell to exit normally, which may be done like
this:

  p := PipeableOSProcess command: '/bin/sh'.
  p close.

Try stepping through these examples in the Smalltalk debugger to get a
better understanding of what is actually being done. Note that it is
entirely possible to send the exact equivalent of ctrl-c (which is a
unix SIGINT signal sent to the process) if you need to do so. See
method UnixOSProcessAccessor>>primSendSigintTo: to see how it is done.
But I suspect that you do not really need to do this, and I am only
mentioning it in case you are interested in the gory details ;)

HTH,
Dave
(Continue reading)

Sean P. DeNigris | 5 Nov 2011 01:30
Gravatar

Re: Canceling a PipeableOSProcess


David T. Lewis wrote:
> 
> You can kill the external process with a unix signal like this:
>   p processProxy terminate.
> 
Cool, thanks.

David T. Lewis wrote:
> 
> However, in general, it is better to permit the external process to exit
> normally.
> 
Better how? On the Unix side, or the Squeak side?

David T. Lewis wrote:
> 
> Note that it is
> entirely possible to send the exact equivalent of ctrl-c (which is a
> unix SIGINT signal sent to the process)
> 
I'll have to take a look. I was asking because I am calling Mac OS X's
hdiutil, which can take ~5-10 minutes to run, and sometimes I want to cancel
the op. I mentioned Ctrl-c specifically because I know it responds to it; on
the CLI, it gives a message about canceling before stopping.

Sean

--
View this message in context: http://forum.world.st/Canceling-a-PipeableOSProcess-tp3991640p3992150.html
(Continue reading)

David T. Lewis | 5 Nov 2011 02:02
Picon
Favicon

Re: Re: Canceling a PipeableOSProcess

On Fri, Nov 04, 2011 at 05:30:30PM -0700, Sean P. DeNigris wrote:
> 
> David T. Lewis wrote:
> > 
> > You can kill the external process with a unix signal like this:
> >   p processProxy terminate.
> > 
> Cool, thanks.
> 
> 
> David T. Lewis wrote:
> > 
> > However, in general, it is better to permit the external process to exit
> > normally.
> > 
> Better how? On the Unix side, or the Squeak side?
> 
> 
> David T. Lewis wrote:
> > 
> > Note that it is
> > entirely possible to send the exact equivalent of ctrl-c (which is a
> > unix SIGINT signal sent to the process)
> > 
> I'll have to take a look. I was asking because I am calling Mac OS X's
> hdiutil, which can take ~5-10 minutes to run, and sometimes I want to cancel
> the op. I mentioned Ctrl-c specifically because I know it responds to it; on
> the CLI, it gives a message about canceling before stopping.

In that case, try doing something more like this:
(Continue reading)

Sean P. DeNigris | 5 Nov 2011 02:12
Gravatar

Re: Canceling a PipeableOSProcess


David T. Lewis wrote:
> 
> In that case, try doing something more like this:
> 
>   p := PipeableOSProcess command: '/bin/sh'.
>   p processProxy sigint.
> 

Great, thanks. That looks like exactly what I wanted.

Sean

--
View this message in context: http://forum.world.st/Canceling-a-PipeableOSProcess-tp3991640p3992222.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
Sean P. DeNigris | 5 Nov 2011 03:08
Gravatar

Re: Canceling a PipeableOSProcess


David T. Lewis wrote:
> 
>   p processProxy sigint.
> 

It seems to have worked like a charm. Thanks again.

--
View this message in context: http://forum.world.st/Canceling-a-PipeableOSProcess-tp3991640p3992317.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
Matt Chelen | 7 Nov 2011 05:53
Picon

Confused about how to get everything set up

Hey everyone,

Currently, I'm looking into Squeak due to its dynamic environment that allows things to change at runtime, and its strong cross-platform support. One of the things I'd need to do is set up a database plugin, which I've been looking into. The seemingly most developed one I could find was SqueakDBX ( http://wiki.squeak.org/squeak/6052 ...if there's a better one, I'm all ears :) ), but the Wiki there is apparently deprecated, and both of the sites listed there seem to not be available.

Reading the list of requirements, I'd need OpenDBX (of which, from the provided instructions, I must admit I was confused on how to set up...do I need the Unix-like packages for a Win32 system?), FFI (which can be installed through universes, apparently, but the latest universe package, 3.10, seems to have been released several years ago, and the FFI packages are probably outdated? I also looked at FFI's source page and was not sure what I needed to download to get it set up on a Win32 system. Do I need the Kernel AND the Win32 package? Just the Win32 package?), and SqueakDBX core (I THINK the latest package, listed here ( http://www.squeaksource.com/SqueakDBX/ ) is version 283, but there are a ton of other packages listed there that I don't know if I need or not...). 

Then assuming I've got all that sorted out, and assuming SqueakDBX is the way to go, I'm not entirely sure how to install packages/plugins. Is there anything else I'd need?

Thanks in advance guys, and apologies for so many questions and confusion all in one. :)
--
Matt C
_______________________________________________
Beginners mailing list
Beginners <at> lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Amir Ansari | 7 Nov 2011 08:10

Re: Confused about how to get everything set up

There's a good overview of database options in the Seaside book: http://book.seaside.st/book/advanced/persistency

And the Pharo book also has chapters (in Section 6) describing each of these packages: http://book.pharo-project.org/book/table-of-contents/

Amir

On Sun, 6 Nov 2011 23:53:53 -0500
Matt Chelen <mattchelen <at> gmail.com> wrote:

> Hey everyone,
> 
> Currently, I'm looking into Squeak due to its dynamic environment that
> allows things to change at runtime, and its strong cross-platform support.
> One of the things I'd need to do is set up a database plugin, which I've
> been looking into. The seemingly most developed one I could find was
> SqueakDBX ( http://wiki.squeak.org/squeak/6052 ...if there's a better one,
> I'm all ears :) ), but the Wiki there is apparently deprecated, and both of
> the sites listed there seem to not be available.
> 
> Reading the list of requirements, I'd need OpenDBX (of which, from the
> provided instructions, I must admit I was confused on how to set up...do I
> need the Unix-like packages for a Win32 system?), FFI (which can be
> installed through universes, apparently, but the latest universe package,
> 3.10, seems to have been released several years ago, and the FFI packages
> are probably outdated? I also looked at FFI's source page and was not sure
> what I needed to download to get it set up on a Win32 system. Do I need the
> Kernel AND the Win32 package? Just the Win32 package?), and SqueakDBX core
> (I THINK the latest package, listed here (
> http://www.squeaksource.com/SqueakDBX/ ) is version 283, but there are a
> ton of other packages listed there that I don't know if I need or not...).
> 
> Then assuming I've got all that sorted out, and assuming SqueakDBX is the
> way to go, I'm not entirely sure how to install packages/plugins. Is there
> anything else I'd need?
> 
> Thanks in advance guys, and apologies for so many questions and confusion
> all in one. :)
> -- 
> Matt C

Gmane