[gtk-server] Re: clisp, gtk-server & glade-2.10

  • From: Peter van Eerten <administrator@xxxxxxxxxxxxxx>
  • To: gtk-server@xxxxxxxxxxxxx
  • Date: Thu, 04 May 2006 13:25:03 +0200

Hi,

This line with GtkScript actually does create a scale with float intervals:

range$ = gtk_hscale_new_with_range(0.5, 1.5, 0.1)

Or with newLISP:

(set 'range (gtk "gtk_hscale_new_with_range" 0.5 1.5 0.1))


The range appears without any problem, and has float intervals with a step of
0.1. Attached a screenshot. Therefore I think your issue is not GTK-server
related but CLisp related. Please verify that CLisp really is sending float
values, and not strings or integers.

(Unfortunately I am not sure how this works in CLisp. Maybe you better contact
the original author of the CLisp GTK package you are using, which is Jim
Bailey.)

Regards
Peter


Citeren CLisp <card.lemoine@xxxxxxxxxx>:

> Thank you.
>
> Le Mardi 2 Mai 2006 08:41, Peter van Eerten a écrit :
> > Hi,
> >
> > The function "gtk_hscale_new_with_range ()" is defined in the example
> > gtk-server configfile which is shipped by the package.
>
> Indeed it is, I don't know where to put myself. I must have downloaded many
> config files at the beginning of my interest for gtk-server and not installed
> the one which belongs to this package. Anyway the line is correct. I put my
> ".gtk-server.cfg" file in attachment.
> >
> > When you define to read GTK 1.x libraries, the FLOAT keyword in the
> > configfile will be interpreted as a single float, since GTK 1 uses single
> > floats solely.
> >
> > When you define the configfile to read GTK 2.x libraries, the FLOAT keyword
> > is interpreted to a double float.
> OK
> >
> > So it should be working out of the box. So which libraries did you define
> > exactly?
> >
> GTK_LIB_NAME = libgtk-x11-2.0.so
> GDK_LIB_NAME = libgdk-x11-2.0.so
> GLIB_LIB_NAME = libglib-2.0.so
> GTK_LIB_EXTRA = libgdk_pixbuf_xlib.so
> > Also, could you provide me the following:
> >
> > 1) your definitions in the configfile
> > 2) the LISP code which does not seem to work correctly.
> Here is the code I thought to have to add (Please keep in mind that I'm a new
> comer in lisp) :
> In the (case clas ... :
> <<
>         (|GtkHScale|
>          (let ((adjust
>                 (get-mult-prop-values
>                  (get-strm-mult-prop "adjustment" props) ())))
>            (setq new-widget
>                  (gtk_hscale_new_with_range
>                   (coerce (cadr adjust) 'float)
>                   (coerce (caddr adjust) 'float)
>                   (coerce (cadddr adjust) 'float)))))
> >>
> In the early defuns section :
> <<
> (defun get-strm-mult-prop (prop-name props)
>   (setq strm-prop (make-string-input-stream
>                   (gethash prop-name props 0))))
>
> (defun get-mult-prop-values (strm-prop list-prop)
>       (if (not (listen strm-prop))
>       list-prop
>       (get-mult-prop-values
>        strm-prop (cons (read strm-prop) list-prop))))
>
> Please find the concerned files in the tarbal attached
> Regards
> >>
> > Thanks,
> > Peter
> >
> > Citeren CLisp <card.lemoine@xxxxxxxxxx>:
> > > Hello,
> > >
> > > I have tried the Jim Bailey's package that is mentionned at the end of
> > > the Mac Carter documentation page which is devoted to gtk-server and
> >>>>>>>>>>>>>>>...
>


-- 
http://www.gtk-server.org

Attachment: range.jpg
Description: JPEG image

Other related posts: