Matthew Lamari | 2 Apr 22:17 2007
Picon

Is there a "Suspend/Resume Layout" in CAPI?


That is, something that prevents the rerendering of a window/pane
while multiple changes are being made to layout so that the changes do
not appear in an animating fashion.

I am interested in any Win32 non-portable and portable solutions to this.

Thanks,
Matt

rosssd@gmail.com | 3 Apr 10:36 2007
Picon

Re: Is there a "Suspend/Resume Layout" in CAPI?


On Mon, 2007-04-02 at 15:17 -0500, Matthew Lamari wrote:
> That is, something that prevents the rerendering of a window/pane
> while multiple changes are being made to layout so that the changes do
> not appear in an animating fashion.

I'm not too sure if it's what you are looking for but try

capi:with-atomic-redisplay

Sean.

Sebastien Saint-Sevin | 3 Apr 10:45 2007

Re: Is there a "Suspend/Resume Layout" in CAPI?


Have you tried capi:with-atomic-redisplay ?

Cheers,

Sebastien.

Matthew Lamari a écrit :
> 
> That is, something that prevents the rerendering of a window/pane
> while multiple changes are being made to layout so that the changes do
> not appear in an animating fashion.
> 
> I am interested in any Win32 non-portable and portable solutions to this.
> 
> Thanks,
> Matt
> 
> 

Taylor, Joshua | 5 Apr 20:02 2007
Picon

killing process spawned with sys:open-pipe


Hello all,

Has anyone a way to kill a process that was spawned using
sys:open-pipe? System-dependent solutions are OK; I'd be looking for
OS X and Windows solutions, specifically. I know that inspecting the
pipe-stream returned by open-pipe will disclose the pid (on OS X)
which could, I suppose be the argument to a kill via call-system,
though this seems slightly awkward, and HProcess and HThread (on
Windows), but I'm not quite sure what I could do with those yet (I
don't do much in the Windows arena), but there's probably ample
documentation out there. I was just wondering if anyone had already
tackled this problem, or knew of a solution. Thanks in advance!
--

-- 
=====================
Joshua Taylor
tayloj <at> rpi.edu

"A lot of good things went down one time,
     back in the goodle days."
               John Hartford

Francis Leboutte | 5 Apr 20:57 2007
Picon

Re: killing process spawned with sys:open-pipe


Le 5/04/2007 20:02, Taylor, Joshua écrivait :

>Hello all,
>
>Has anyone a way to kill a process that was spawned using
>sys:open-pipe? System-dependent solutions are OK;

Hello,

On Windows, simply if you know the process name 
you can use sys:open-pipe to call a .bat file 
that does the job using taskkill (Windows NT and above).

Or use PsKill like this (extract from www.algo.be/cl/dialogue/index.htm )

 <at> echo off
echo going to kill all java VMs
pause
PsList|find /I "Java" >NUL && (PsKill java.exe & pause & goto :end)
echo no Java VM to kill
pause
:END

PSlist and PSkill:
http://www.microsoft.com/technet/sysinternals/utilities/pstools.mspx

Both PSkill and Taskkill accept a process ID too. 
Give the ID as an argument to the procedure and:
pskill %1
(Continue reading)

Eivind Midtgård | 5 Apr 23:40 2007
Picon

RE: killing process spawned with sys:open-pipe


> -----Original Message-----
> From: owner-lisp-hug <at> lispworks.com 
> [mailto:owner-lisp-hug <at> lispworks.com] On Behalf Of Taylor, Joshua
> Sent: Thursday, April 05, 2007 8:02 PM
> To: Lispworks HUG
> Subject: killing process spawned with sys:open-pipe
> 
> Has anyone a way to kill a process that was spawned using 
> sys:open-pipe? 

On Windows you can use:

(fli:define-foreign-function (terminate-process "TerminateProcess")
((hprocess :int)
(exitvalue :int))
:result-type :int)

Then, given the process handle, 

(terminate-process hprocess 1)

will terminate the process and tell any process that asks that the exit value of the process was 1. The
process is not notified and gets no chance to clean up anything, so this is a last-resort mechanism. 

(Windows has lots of ways of signalling from one process to another, so if you can tell it to exit gracefully,
you should. But you'd need to program the other process yourself, or at least know that the programmer has
included some mechanism for doing that.)

Eivind
(Continue reading)

Mitch Berkson | 7 Apr 14:18 2007

Why no closures in the Definitions tab?


How come closures don't appear in the Definitions tab?

Mitch

Mitch Berkson | 7 Apr 14:28 2007

RE: Combinatorics question ...


Krzys,

I found the following at http://paste.lisp.org/display/22379

(defun n-choose-k (list k &optional acc)
  (cond
    ((= k 0) (print acc))
    ((null list))
    (t (n-choose-k (cdr list) k acc)
       (n-choose-k (cdr list) (1- k) (cons (car list) acc)))))

Mitch

Taylor, Joshua | 7 Apr 22:18 2007
Picon

partitioning keyword arguments


Hello all,

This is a slightly more general Lisp oriented question, so perhaps I
should have sent it off to c.l.l, but all my examples are going to be
CAPI based, and I bet someone here has had to deal with these issues
before.

There is a macro capi:with-dialog-results which allows for (on OS X)
dialogs which are modal per window (and not for the whole
application.) For instance,

(capi:with-dialog-results (str okp)
    (capi:prompt-for-string "Enter a string")
  (when okp
    (print str)))

Now this is just syntactic sugar for (essentially) the following:

(capi:prompt-for-string
  "Enter a string"
  :continuation
  #'(lambda (str okp)
        (when okp
           (print string))))

so the point to notice is that the prompting function accepts a
:continuation keyword argument. Now prompt-for-string also accepts a
:text keyword argument specifiying initial-text for the prompt.

(Continue reading)

Taylor, Joshua | 7 Apr 22:23 2007
Picon

Re: partitioning keyword arguments


On 4/7/07, Taylor, Joshua <tayloj <at> rpi.edu> wrote:
> Hello all,
>
> This is a slightly more general Lisp oriented question, so perhaps I
> should have sent it off to c.l.l, but all my examples are going to be
> CAPI based, and I bet someone here has had to deal with these issues
> before.
>
> There is a macro capi:with-dialog-results which allows for (on OS X)
> dialogs which are modal per window (and not for the whole
> application.) For instance,
>
> (capi:with-dialog-results (str okp)
>     (capi:prompt-for-string "Enter a string")
>   (when okp
>     (print str)))
>
> Now this is just syntactic sugar for (essentially) the following:
>
> (capi:prompt-for-string
>   "Enter a string"
>   :continuation
>   #'(lambda (str okp)
>         (when okp
>            (print string))))
>
> so the point to notice is that the prompting function accepts a
> :continuation keyword argument. Now prompt-for-string also accepts a
> :text keyword argument specifiying initial-text for the prompt.
(Continue reading)


Gmane