From: WoodHacker
Subject: Match Error on Dialog Box
Date: 
Message-ID: <1133188079.368423.131160@o13g2000cwo.googlegroups.com>
Can anyone help me on this....

I'm trying to show a dialog box in CLX (in SBCL).   I'm creating a top
top window to do it and it works fine except that it does not
automatically get focus when it shows.    I try using
(xlib:set-input-focus display window :parent nil), but I get a match
error.   If I understand it correctly, which I probably don't, the
mismatch is between the window I just popped and the display/screen.
However, the depth is correct (24) and everything else seems ok.
After all, the topwindow dialog appears and does everything it should
do when the user gives it focus.

Is there another way to assign focus or is there some easy way to fix
the match error?   I'm sort of at a loss here.....

From: Mattias Nilsson
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <1133188934.783194.243430@g49g2000cwa.googlegroups.com>
WoodHacker wrote:
> Can anyone help me on this....
> ...  I'm creating a top top window to do it and it works fine
> except that it does not automatically get focus when it shows.
> I try using (xlib:set-input-focus display window :parent nil),
> but I get a match error.
>
> Is there another way to assign focus or is there some easy way to fix
> the match error?   I'm sort of at a loss here.....

I'm not sure about the match error, but you should almost never
set the focus to one of your top windows yourself, but instead rely
on the window manager to do this. Don't forget to set the proper
hints.

Check: http://tronche.com/gui/x/icccm/

Best regards,
Mattias Nilsson.
From: WoodHacker
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <1133219248.160124.243970@z14g2000cwz.googlegroups.com>
Well, studying hints got me closer, but still no cigar.    The X
Reference talks about WM_TAKE_FOCUS, which tells the WM to issue a
client-message when the dialog window is activated.    The client is
then allowed to issue a set-input-focus safely.    Although this
approach clears up my error, I still don't get the dialog to
automatically have focus.  I only get focus when I move the mouse
pointer into the dialog.

I'm missing something here.....
From: Mattias Nilsson
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <1133258706.886901.90080@g14g2000cwa.googlegroups.com>
I know that this topic is not really about Lisp anymore, so I
am sorry if I am breaking some rule by answering again, but
here goes...

WoodHacker wrote:
> ... I still don't get the dialog to automatically have focus.
> I only get focus when I move the mouse pointer into the dialog.

Assuming you are not writing a window manager, there is no
way you can make the dialog take the focus automatically when
mapped (unless you're OK with screwing things up for other
clients). Read section 4.1.7 of the ICCCM carefully: There are
only four input models, and what you want is not one of them.

There might be some specific window manager that lets you
do what you want, but that's outside basic X.

Mattias.
From: WoodHacker
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <1133272172.375404.59010@g49g2000cwa.googlegroups.com>
Thanks for effort.....
From: Edi Weitz
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <uoe43sdh3.fsf@agharta.de>
On 29 Nov 2005 02:05:06 -0800, "Mattias Nilsson" <········@bredband.net> wrote:

> I know that this topic is not really about Lisp anymore, so I am
> sorry if I am breaking some rule by answering again

Look at some of the other threads.  We have some people who virtually
/never/ post anything about Lisp but jump on every OT theme and ride
it to death.  Your answer was at least about programming... :)

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: WoodHacker
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <1133301284.686453.21550@g14g2000cwa.googlegroups.com>
Not to beat a dead horse, but my original question WAS about Lisp.
I'm trying to write
GUI widgets in CLX for Lisp.   Isn't that about Lisp?   Am I to
understand that Lisp is only for the console croud?  One  thing I've
learned as I've gotten into this is that no one seems to be doing what
I'm doing in Lisp outside of the commercial versions.    When you get
into CLX there are almost no examples, no books, no tutorials -
nothing.    I'm fairly new to Lisp, but have been programming a very
long time.   How on earth can Lisp grow and prosper without an open
source GUI widget set?    I don't mean to rock the boat, but, Guys, the
days of DOS like console programs are long gone.    Ports to Gtk, Tcl,
etc?   Why noit just write in C and be done with it.....
From: Christophe Rhodes
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <sq7jarnjo9.fsf@cam.ac.uk>
"WoodHacker" <·······@comcast.net> writes:

> Not to beat a dead horse, but my original question WAS about Lisp.
> I'm trying to write
> GUI widgets in CLX for Lisp.   Isn't that about Lisp?   Am I to
> understand that Lisp is only for the console croud?  One  thing I've
> learned as I've gotten into this is that no one seems to be doing what
> I'm doing in Lisp outside of the commercial versions.    When you get
> into CLX there are almost no examples, no books, no tutorials -
> nothing.    I'm fairly new to Lisp, but have been programming a very
> long time.   How on earth can Lisp grow and prosper without an open
> source GUI widget set?    I don't mean to rock the boat, but, Guys, the
> days of DOS like console programs are long gone.    Ports to Gtk, Tcl,
> etc?   Why noit just write in C and be done with it.....

There isn't much of a boat to rock, really; I suspect I can count the
number of people even using libraries built on top of CLX on the
fingers of one slightly-mutated hand; the number of people who
understand the implementation details of CLX is, of course, much
smaller.  That said, you might get a better response if you mailed the
CLX development list, which, while quiescent at the moment, has a
small number of relative experts subscribed.  Start here:
<http://www.cliki.net/portable-clx>

Christophe
From: John Thingstad
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <op.s00wsxjlpqzri1@mjolner.upc.no>
On Tue, 29 Nov 2005 22:54:44 +0100, WoodHacker <·······@comcast.net> wrote:

> Not to beat a dead horse, but my original question WAS about Lisp.
> I'm trying to write
> GUI widgets in CLX for Lisp.   Isn't that about Lisp?   Am I to
> understand that Lisp is only for the console croud?  One  thing I've
> learned as I've gotten into this is that no one seems to be doing what
> I'm doing in Lisp outside of the commercial versions.    When you get
> into CLX there are almost no examples, no books, no tutorials -
> nothing.    I'm fairly new to Lisp, but have been programming a very
> long time.   How on earth can Lisp grow and prosper without an open
> source GUI widget set?    I don't mean to rock the boat, but, Guys, the
> days of DOS like console programs are long gone.    Ports to Gtk, Tcl,
> etc?   Why noit just write in C and be done with it.....
>

Depends on what you want to do.
Most applications I write these days have a web interface.
I typically write a lisp server.
Anyhow there is a Tk interface for Lisp which is free.
Also foil allows to to connect to Java and use a
Java interface if you prefer. I like foils abillity
to acess .NET forms best though.
If you wanna go commercial:
Common Graphics from franz.
Or LispWorks's GUI.

Personally I think Clue/Clx is too low level..
Nevertheless there are options..

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: John Thingstad
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <op.s01ts2jlpqzri1@mjolner.upc.no>
On Tue, 29 Nov 2005 23:30:23 +0100, John Thingstad  
<··············@chello.no> wrote:


> Or LispWorks's GUI.
That was supposed to be LispWork's CAPI.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Robert Strandh
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <6w4q5u2383.fsf@serveur5.labri.fr>
"WoodHacker" <·······@comcast.net> writes:

> Am I to
> understand that Lisp is only for the console croud?  

I am not sure what gave you that idea, but the answer is definitely
`no'. 

> One  thing I've
> learned as I've gotten into this is that no one seems to be doing what
> I'm doing in Lisp outside of the commercial versions.    

It depends on exactly what you are doing, but before concluding such a
thing, you might want to look around a bit (start on cliki.net for
instance).  There are several projects (in various degrees of
completeness) that let you use GUIs with Lisp. 


> When you get
> into CLX there are almost no examples, no books, no tutorials -
> nothing.    

Like Xlib, CLX is a low-level library that communicates with the X
server using the X protocol.  Documenting the effects of various CLX
operations would amount to rewriting the X protocol specification with
only slightly different syntax, and then the result would have to be
maintained and updated.  Nobody has had the energy to do that.
Instead, you will have to look at examples using the Xlib and
translate as necessary.

> I'm fairly new to Lisp, but have been programming a very
> long time.   

Good to know. 

> How on earth can Lisp grow and prosper without an open
> source GUI widget set?    

[I am assuming this was supposed to be a rhetorical question, and that
you really  don't want to know how Lisp can grow without such a GUI
widget set.]

If you want Lisp to grow and prosper, if you think that it can't be
done without Lisp having an open-source GUI widget set, and if you
think the ones that exist won't cut it, I definitely think you should
write one.  I am certainly not going to stop you.

> I don't mean to rock the boat, but, Guys, the
> days of DOS like console programs are long gone.    

Let's calm down a bit shall we.  

First, the fact that the days of such programs are gone does in no way
imply that this is a good evolution.  A very accurate quotation that I
read likened the most common version of GUI interfaces of today to
using primitive grunts instead of the complex linguistic features of a
CLI.  The fact that most users today have no desire to be efficient in
their use of computers does in no way imply that we should invest our
energy into helping them, even if doing so would mean that Lisp might
grow and `prosper' in the process.

Second, you seem to be suggesting that people in this newsgroup
generally prefer DOS-like console programs.  While that *might* be the
case, I seriously doubt it. 

Third, you seem to imply that the only alternative to GUI interfaces
is DOS-like console programs.  I seriously suggest you take a look at
the CLIM  specification for an example of an excellent specification
of an `Interface Manager' (which is much more than a GUI widget set)
for Common Lisp.

> Ports to Gtk, Tcl,
> etc?   Why noit just write in C and be done with it.....

I am not sure what you are trying to suggest here.  If you are
suggesting abandoning Lisp in favor or C because Gtk and Tcl do not
exist for Lisp, you are obviously free to do so.

-- 
Robert Strandh
From: WoodHacker
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <1133357361.915695.146320@g44g2000cwa.googlegroups.com>
Sorry for the rant.....    (Especially since I'm a newbie here)

I've looked at CLIM and it just seems too complex.    I've written
programs using Gtk and especially Tcl and I think my real problem is
they all seem to require more work than is necessary.    That's why
I've decided to write my own GUI system at the lowest level possible.
 (Wait a minute, didn't I just mention too much work?)    Anyway, the
truth of the matter is that I've rediscoved a newfound love of Lisp and
am having more fun than I've had in years devloping a GUI system that
works the way I THINK it should.    When I hit a stone wall (as above)
I get frustrated.    But that's what programming is all about.

Again, sorry for the rant...
From: John Thingstad
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <op.s017jib7pqzri1@mjolner.upc.no>
On Wed, 30 Nov 2005 14:29:21 +0100, WoodHacker <·······@comcast.net> wrote:

> Sorry for the rant.....    (Especially since I'm a newbie here)
>
> I've looked at CLIM and it just seems too complex.    I've written
> programs using Gtk and especially Tcl and I think my real problem is
> they all seem to require more work than is necessary.    That's why
> I've decided to write my own GUI system at the lowest level possible.
>  (Wait a minute, didn't I just mention too much work?)    Anyway, the
> truth of the matter is that I've rediscoved a newfound love of Lisp and
> am having more fun than I've had in years devloping a GUI system that
> works the way I THINK it should.    When I hit a stone wall (as above)
> I get frustrated.    But that's what programming is all about.
>
> Again, sorry for the rant...
>

If you must! How about getting a group to support your effort.
It would require 5 people full time to deveop a usefull interface on Clx
probaly 10 part time.. Anyhow that is my estimate..

John

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Peter Herth
Subject: Re: Match Error on Dialog Box
Date: 
Message-ID: <dmjns8$jip$00$1@news.t-online.com>
WoodHacker wrote:
> Not to beat a dead horse, but my original question WAS about Lisp.
> I'm trying to write
> GUI widgets in CLX for Lisp.   Isn't that about Lisp?   Am I to
> understand that Lisp is only for the console croud?  One  thing I've
> learned as I've gotten into this is that no one seems to be doing what
> I'm doing in Lisp outside of the commercial versions.    When you get
> into CLX there are almost no examples, no books, no tutorials -
> nothing.    I'm fairly new to Lisp, but have been programming a very
> long time.   How on earth can Lisp grow and prosper without an open
> source GUI widget set?    I don't mean to rock the boat, but, Guys, the
> days of DOS like console programs are long gone.    Ports to Gtk, Tcl,
> etc?   Why noit just write in C and be done with it.....
> 

If you want nice Tk bindings for Lisp look at the link below :)

Peter


-- 
Ltk, the easy lisp gui http://www.peter-herth.de/ltk/