From johan at riise-data.no Mon Oct 8 19:09:09 2007 From: johan at riise-data.no (Johan Ur Riise) Date: Mon, 08 Oct 2007 21:09:09 +0200 Subject: [cells-gtk-devel] cells-gtk newbie problem no 1: style warning "can't find type for specializer MY-APP" when compiling defmodel Message-ID: <200710082109.09222.johan@riise-data.no> I have installed cells via asdf-install, and cells-gtk from cvs. My lisp is SBCL 1.0.10.33 This program just displays a top-level window with no functionality. The test-gtk program from the distribution does not have this problem, but in that case the symbol test-gtk is used for the asdf system-name. Program follows, then the full error message. If I compile again, there is no warnings. (require 'cells-gtk) (defpackage :my-package (:use :common-lisp :pod :cells :gtk-ffi :cells-gtk) (:export RUN-MY-APP) ) (in-package :my-package) (defmodel my-app (gtk-app) () (:default-initargs)) (defun run-my-app (&optional dbg) (cells-gtk-init) (cells-gtk:start-app 'my-app :debug dbg)) -+ Style Warnings (2) |-- can't find type for specializer MY-APP in | SB-PCL::PARAMETER-SPECIALIZER-DECLARATION-IN-DEFMETHOD. `-- --> PROGN PROG1 LET LET DEFMETHOD PROGN EVAL-WHEN ==> (SB-PCL::%DEFMETHOD-EXPANDER SHARED-INITIALIZE (:AFTER) ((CELLS:SELF MY-PACKAGE::MY-APP) CELLS::SLOT-NAMES &REST CELLS::IARGS &KEY) ((DECLARE (IGNORE CELLS::SLOT-NAMES CELLS::IARGS)) (UNLESS (TYPEP CELLS:SELF 'CELLS::MODEL-OBJECT) (ERROR "If no superclass of ~a inherits directly or indirectly from model-object, model-object must be included as a direct super-class in the defmodel form for ~a" 'MY-PACKAGE::MY-APP 'MY-PACKAGE::MY-APP)))) (in macroexpansion of (SB-PCL::%DEFMETHOD-EXPANDER SHARED-INITIALIZE # ...)) (hint: For more precise location, try *BREAK-ON-SIGNALS*.) can't find type for specializer MY-APP in SB-PCL::PARAMETER-SPECIALIZER-DECLARATION-IN-DEFMETHOD. From johan at riise-data.no Mon Oct 8 19:29:36 2007 From: johan at riise-data.no (Johan Ur Riise) Date: Mon, 08 Oct 2007 21:29:36 +0200 Subject: [cells-gtk-devel] cells-gtk newbie problem nr 2: Unable to close app Message-ID: <200710082129.36610.johan@riise-data.no> Since MY-APP (se prev message) inherits from GTK-APP, and GTK-APP has this: :on-delete-event (lambda (self widget event data) (declare (ignore self widget event data)) (signal 'gtk-user-signals-quit) 0) ..., I expected that the function RUN-MY-APP should return when I close the application window. (I run RUN-MY-APP in the REPL in SLIME). But it does not, instead I get "window is not responding" from the window manager with an option to terminate the sbcl process. I have also tried variations with (gtk-widget-destroy widget) and (gtk-main-quit). This closes the window, but I have to kill the function twice with c-c c-c, and it is not possible to start it again in the same image. What is the correct way to stop the app? From johan at riise-data.no Mon Oct 8 19:47:46 2007 From: johan at riise-data.no (Johan Ur Riise) Date: Mon, 08 Oct 2007 21:47:46 +0200 Subject: [cells-gtk-devel] cells-gtk newbie problem 3: Library names in debian Message-ID: <200710082147.46204.johan@riise-data.no> To be able to run test-gtk on my debian machine, I had to manually create these symbolic links in /usr/lib. For example, libgtk-x11-2.0.so was not available, but libgtk-x11-2.0.so.0 was. ln -s libgtk-x11-2.0.so libgtk-x11-2.0.so.0 produced the first of these: libgtk-x11-2.0.so -> libgtk-x11-2.0.so.0.800.20 libgdk-x11-2.0.so -> libgdk-x11-2.0.so.0.800.20 libgdk_pixbuf-2.0.so -> libgdk_pixbuf-2.0.so.0.800.20 Is this a bug in my debian, or has the convention for naming libraries changed lately? Anyway, the system does not work out of the box now. From johan at riise-data.no Tue Oct 9 09:22:08 2007 From: johan at riise-data.no (Johan Ur Riise) Date: Tue, 09 Oct 2007 11:22:08 +0200 Subject: [cells-gtk-devel] cells-gtk newbie problem nr 2: Unable to close app In-Reply-To: <200710082129.36610.johan@riise-data.no> References: <200710082129.36610.johan@riise-data.no> Message-ID: <200710091122.08436.johan@riise-data.no> On Monday 08 October 2007 21:29, Johan Ur Riise wrote: > Since MY-APP (se prev message) inherits from GTK-APP, and GTK-APP has this: > :on-delete-event (lambda (self widget event data) > > (declare (ignore self widget event data)) > (signal 'gtk-user-signals-quit) > 0) > > ..., I expected that the function RUN-MY-APP should return when I close the > application window. (I run RUN-MY-APP in the REPL in SLIME). > But it does not, instead I get "window is not responding" from the window > manager with an option to terminate the sbcl process. > > I have also tried variations with (gtk-widget-destroy widget) and > (gtk-main-quit). This closes the window, but I have to kill the function > twice with c-c c-c, and it is not possible to start it again in the same > image. > > What is the correct way to stop the app? > _______________________________________________ > cells-gtk-devel site list > cells-gtk-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-gtk-devel Investigating further with debug on, I get this when closing the window Calling (gtk-widget-destroy #.(SB-SYS:INT-SAP #X080AA848)) (gtk-widget-destroy #.(SB-SYS:INT-SAP #X080AA848)) returns NIL Then after c-c and selecting restart "give-up-cleanly", some more widgets are destroyed (my menu I guess) then I get this endlessly: Calling (gtk-main-level ) (gtk-main-level ) returns 1 Calling (gtk-main-quit ) (gtk-main-quit ) returns NIL Calling (gtk-main-level ) (gtk-main-level ) returns 1 Calling (gtk-main-quit ) (gtk-main-quit ) returns NIL Looks like my gtk+ library is 2.8.20 ---- well well well, just found the solution in http://common-lisp.net/pipermail/cells-gtk-devel/2007-May/000302.html Thanks Warren W From Feed at common-lisp.net Sun Oct 14 23:03:59 2007 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 14 Oct 2007 16:03:59 -0700 Subject: [cells-gtk-devel] Feed Blaster puts your ad right to the screens of millions in 15 Minutes ! Message-ID: <20071014160359.06C01417A26CE90F@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Instant at common-lisp.net Thu Oct 18 04:07:00 2007 From: Instant at common-lisp.net (Instant at common-lisp.net) Date: 17 Oct 2007 21:07:00 -0700 Subject: [cells-gtk-devel] Can you afford to lose 300, 000 potential customers per year ? Message-ID: <20071017210700.F0336B228E2DDDA8@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Income at common-lisp.net Sun Oct 21 03:21:05 2007 From: Income at common-lisp.net (Income at common-lisp.net) Date: 20 Oct 2007 20:21:05 -0700 Subject: [cells-gtk-devel] How would you like an extra $500 - $1000 a week with 15 minutes of your time ? Message-ID: <20071020202105.13F9C30CAE9418FF@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Hit-Booster at common-lisp.net Thu Oct 25 01:56:17 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 24 Oct 2007 18:56:17 -0700 Subject: [cells-gtk-devel] How to get free quality visitors to your website? Message-ID: <20071024113602.1A0FB5C1C0@common-lisp.net> An HTML attachment was scrubbed... URL: From Hit-Booster at common-lisp.net Sat Oct 27 10:31:37 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 27 Oct 2007 03:31:37 -0700 Subject: [cells-gtk-devel] How to get free quality visitors to your website? Message-ID: <20071027073205.CEA214082@common-lisp.net> An HTML attachment was scrubbed... URL: From achambers.home at googlemail.com Sat Oct 27 19:46:33 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Sat, 27 Oct 2007 20:46:33 +0100 Subject: [cells-gtk-devel] drag n' drop Message-ID: Hi, Can cells-gtk do drag and drop? I can't find anything in the examples but grepping for "drag" in the sources show's some references to the drag events. Cheers, Andy From achambers.home at googlemail.com Sun Oct 28 23:03:50 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Mon, 29 Oct 2007 00:03:50 +0100 Subject: [cells-gtk-devel] Hacking the gtk-ffi Message-ID: Hi, What are all the things you need to do to add support for a property on a widget. I'm trying to add the "headers-visible" property to the tree-view widget. Here is what I did.... - added the symbol headers-visible to the gtk-slots list in the widget specfication - added the form below to "def-gtk-lib-functions" - made an app with a listbox using that option (gtk-tree-view-set-headers-visible :void ((tree-view :pointer) (visible :gtk-boolean))) I ran the app with debug on but didn't see any calls to the c function. Is there something else you need to do? Any general tips on debugging cells/gtk apps are also welcome. Cheers, Andy From achambers.home at googlemail.com Sun Oct 28 23:50:19 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Mon, 29 Oct 2007 00:50:19 +0100 Subject: [cells-gtk-devel] Re: Hacking the gtk-ffi In-Reply-To: References: Message-ID: On 10/29/07, Andy Chambers wrote: > Hi, > > What are all the things you need to do to add support for a property > on a widget. I'm trying to add the "headers-visible" property to the > tree-view widget. Here is what I did.... > > - added the symbol headers-visible to the gtk-slots list in the > widget specfication > - added the form below to "def-gtk-lib-functions" > - made an app with a listbox using that option > > (gtk-tree-view-set-headers-visible :void > ((tree-view :pointer) > (visible :gtk-boolean))) > > I ran the app with debug on but didn't see any calls to the c > function. Is there something else you need to do? Any general tips > on debugging cells/gtk apps are also welcome. OK. I think I know why its not working. The ffi call never gets made because cells only uses it if either the new or old value is not nil. Looking further into it, the editable slot on the entry widget seems to have the same problem. Does anyone successfully make entry widgets non-editable? Cheers, Andy From BlogBlaster at common-lisp.net Mon Oct 29 11:27:01 2007 From: BlogBlaster at common-lisp.net (BlogBlaster at common-lisp.net) Date: 29 Oct 2007 03:27:01 -0800 Subject: [cells-gtk-devel] "How would you like to have your ad on 2 Million Websites ?" Message-ID: <20071029032701.19C3C3C614EF273A@from.header.has.no.domain> An HTML attachment was scrubbed... URL: From achambers.home at googlemail.com Mon Oct 29 10:58:45 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Mon, 29 Oct 2007 10:58:45 +0000 Subject: [cells-gtk-devel] Re: Hacking the gtk-ffi In-Reply-To: <47252B20.5020101@optonline.net> References: <47252B20.5020101@optonline.net> Message-ID: On 10/29/07, Ken Tilton wrote: > Andy Chambers wrote: > > On 10/29/07, Andy Chambers wrote: > > OK. I think I know why its not working. The ffi call never gets made > > because cells only uses it if either the new or old value is not nil. > > Properties are propagated from the Lisp model to Gtk by "observers" on a > slot. Celtk and Cells-Gtk generate these observers as part of the > macroexpansion of the def macro to which it seems you > correctly added the slot. It should not matter that the value (as you > imply) never changes, because Cells understands that an initial > propagation is necessary so observers and observed start out in synch. > > You can check that you see an observer in the macroexpansion, then that > that is being called. If not, I would have a concern that Cells-Gtk has > not been upgraded to use the latest version of Cells, because I have a > faint recollection that possibly older versions do not propagate a nil > initial value. I would be shocked if it did not propagate a non-nil > value, so one thing you might try as a sanity check is to specify a > non-nil just to see if anything fires. The observer is being created in the macro-expansion. That's how I knew to add the ffi definition (how cool is it that the software knew what function it needed to call before I did :-)). My immediate problem is fixed by overriding the generated observer to always propagate the value so I think you're spot on about cells-gtk not using the latest cells but I'm starting to have some fun now and feel a lot more confident about trying to upgrade. Cheers, Andy From peter.hildebrandt at gmail.com Mon Oct 29 14:32:14 2007 From: peter.hildebrandt at gmail.com (Peter Hildebrandt) Date: Mon, 29 Oct 2007 15:32:14 +0100 Subject: [cells-gtk-devel] Re: Hacking the gtk-ffi In-Reply-To: References: Message-ID: On Mon, 29 Oct 2007 00:50:19 +0100, Andy Chambers wrote: > Looking further into it, the editable slot on the entry widget seems > to have the same problem. Does anyone successfully make entry widgets > non-editable? Yep, did that a few months ago. However, I decided to bind the property to the individual columns, hence I extended the columns-def structure s.t. (fourth (columns-def self)) refers to the editable property. I addedd the following to def-c-output columns ((self tree-view)). It looks pretty messy, but I have other things to worry about right now (def-c-output columns ((self tree-view)) ... for renderer = (case col-type (:boolean (gtk-cell-renderer-toggle-new)) (:icon (gtk-cell-renderer-pixbuf-new)) (t (gtk-cell-renderer-text-new))) do ;; --- support editable columns --- (when-bind (editable (fourth (nth pos (columns-def self)))) ;; make the column editable by modifying the renderer (gtk-object-set-property renderer "editable" 'boolean editable) (when-bind (on-edit (on-edited self)) (register-renderer-for-tree-view renderer self pos col-type) ;; when an on-edited func is specified, register a callback that will funcall on-edited (gtk-signal-connect renderer "edited" (cffi:get-callback (case col-type (:boolean 'tree-view-edit-cell-callback-boolean) (t 'tree-view-edit-cell-callback-string)))))) ;; --- that's it --- ... From achambers.home at googlemail.com Mon Oct 29 17:53:58 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Mon, 29 Oct 2007 17:53:58 +0000 Subject: [cells-gtk-devel] cells-gtk on clisp (win32) In-Reply-To: <357b81470707240915w1a05e94vdd455d84ed0f5a72@mail.gmail.com> References: <357b81470707240915w1a05e94vdd455d84ed0f5a72@mail.gmail.com> Message-ID: On 7/24/07, Draggor wrote: > I'm trying to get cells-gtk to work on clisp for win32, and here's > what ends up happening. > > If I freshly unzip the cells-gtk 2006-02-16 tarball, and then run > clisp and do (load "load"), it will work just fine, and I'll be able > to run the demo. I've just tried the latest one and it doesn't even get that far. It loaded fine but the call to g-thread-init failed with FUNCALL: undefined function NIL [Condition of type SYSTEM::SIMPLE-UNDEFINED-FUNCTION] Here's the output with debug enabled.... CL-USER> (test-gtk:gtk-demo t) Calling (g-thread-init #) There's a comment in gtk-ffi.lisp about some code enabling us to call (g-thread-init +c-null+). It seems this doesn't work on clisp. Cheers, Andy From achambers.home at googlemail.com Tue Oct 30 10:11:40 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Tue, 30 Oct 2007 10:11:40 +0000 Subject: [cells-gtk-devel] porting to cells3 Message-ID: On 10/29/07, Ken Tilton wrote: > > I think you cannot "upgrade" Cells-Gtk, I think you have to make a giant > leap for guikind and call it Cells-Gtk3 (or 4, I actually forget if I am > at Cells3 or 4, the good thing being I do not think about Cells anymore > (tho every 4-8 months I run into a solid bug (another reason to, um, > upgrade))). Cells-Gtk3 will be an interestingly big job since I /think/ > you will be getting into a user-queue handler that knows about Gtk, but > as did Cells-Gtk Classic you can start by mimicking Celtk. I knew it wouldn't just be a case of moving the asd files around but perhaps I was still underestimating the task. Here's the problems I've come accross so far. 1) def-c-output seems to be called defobserver now. Is there any semantic differences between the two? 2) make-instance 'family now requires an :fm-parent My approach until now has been to update the cells that cells-gtk uses, then load-system, fix errors, load-system.... I'm just communicating this in case it elicits a nugget of insight from someone that might have attempted a similar task before. Cheers, Andy