From Feed at common-lisp.net Fri Nov 2 23:09:57 2007 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 02 Nov 2007 15:09:57 -0800 Subject: [cells-devel] Feed Blaster puts your ad right to the screens of millions in 15 Minutes ! Message-ID: <20071102150957.2A75EC03BE6B19E5@from.header.has.no.domain> Feed Blaster puts your ad right to the screens of millions in 15 Minutes ! More and more people are subscribing to feeds every day and there are millions who are already subscribed. Thus, your ad will reach a very broad range of potential customers with each use of Feed Blaster! Feed Blaster is the first & only submitter that can submit your ads to thousands of feeds within a few minutes! Post your ads where people read them! - What if you could place your ad into all these feeds ? Right, that would mean you would have millions of sites linking to your ad - and millions of users reading your message within minutes - and my idea actually works. http://www.promote-bz.net/feedblaster/ Unsubscribe http://www.promote-bz.net/remove/ From achambers.home at googlemail.com Fri Nov 2 18:42:02 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Fri, 2 Nov 2007 18:42:02 +0000 Subject: [cells-devel] celtk expander Message-ID: Here's my effort at an expander. It doesn't have the arrow's yet. I was trying to get the expanding bit working correctly first. It works the first time (i.e. you can expand it once, then unexpand) but after that it kills the kids and can't re-create them again. Any hints? (defmodel expander (frame-stack) ((label :initarg :label :accessor label :initform "") (expanded :initarg :expanded :accessor expanded :initform (c-in nil)) (expansion :initarg :expansion :accessor expansion :initform nil)) (:default-initargs)) (defmacro mk-expander ((&rest initargs) &rest kids) `(make-instance 'expander , at initargs :fm-parent *parent* :expansion (c? (the-kids , at kids)) :expanded (c-in nil) :kids (c? (the-kids (mk-button-ex ((^label) (setf (expanded (upper self expander)) (not (expanded (upper self expander)))))) (when (^expanded) (^expansion)))))) ;; test the expander (defmodel test-win (window) () (:default-initargs :kids (c? (the-kids (mk-stack (:packing (c?pack-self)) (mk-label :text "hi") (mk-expander (:label "expander") (mk-stack () (mk-label :text "expanded"))) (mk-label :text "ho")))))) (defun test () (test-window 'test-win t)) Cheers, Andy From achambers.home at googlemail.com Fri Nov 2 20:59:12 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Fri, 2 Nov 2007 20:59:12 +0000 Subject: [cells-devel] Re: celtk expander In-Reply-To: References: Message-ID: On 11/2/07, Andy Chambers wrote: > (defmacro mk-expander ((&rest initargs) &rest kids) > `(make-instance 'expander , at initargs > :fm-parent *parent* > :expansion (c? (the-kids , at kids)) > :expanded (c-in nil) > :kids (c? (the-kids > (mk-button-ex ((^label) (setf > (expanded (upper self expander)) > (not (expanded (upper self expander)))))) > (when (^expanded) > (^expansion)))))) (defmacro mk-expander ((&rest initargs) &rest kids) `(make-instance 'expander , at initargs :fm-parent *parent* :expansion (c? (lambda () (the-kids , at kids))) :expanded (c-in nil) :kids (c? (the-kids (mk-button-ex ((^label) (setf (expanded (upper self expander)) (not (expanded (upper self expander)))))) (when (^expanded) (funcall (^expansion))))))) wrapping the expansion rule inside a lambda works. This creates a new set of widgets each time the rule runs though. Is there some way of doing it without that? From Instant at common-lisp.net Mon Nov 5 19:55:05 2007 From: Instant at common-lisp.net (Instant at common-lisp.net) Date: 05 Nov 2007 11:55:05 -0800 Subject: [cells-devel] How would You like to divert 1000s of fresh new visitors daily. Message-ID: <20071105115505.C00E2BD37C0CAE18@from.header.has.no.domain> Can you afford to lose 300,000 potential customers per year ? How would You like to divert 1000s of fresh, new visitors daily to Your web site or affiliate web site from Google, Yahoo, MSN and others At $0 cost to you...? ...iNSTANT BOOSTER diverts 1000s of fresh, new visitors daily to Your web site or affiliate web site from Google, Yahoo, MSN and others at $0 cost to you! ...No matter what you are selling or offering - INTSANT BOOSTER will pull in hordes of potential customers to your website - instantly! http://www.promote-busines.com/instantbooster/ http://www.promote-busines.com/remove/ From kennytilton at optonline.net Mon Nov 5 20:17:02 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Mon, 05 Nov 2007 15:17:02 -0500 Subject: [cells-devel] Re: cells mailing list In-Reply-To: References: Message-ID: <472F7A3E.1030605@optonline.net> Andy Chambers wrote: > Hi Kenny, > > Is the cells mailing list active? Is that where I should send > questions/patches related to celtk development? > > I sent a message on Saturday morning about an expander widget but it > hasn't shown up in in the archives yet and I haven't had any bounce > messages. > > Cheers, > Andy > Sorry for the delay in responding, I let this slip. Just checked the list and do not see any issues. I am CCing the list to see what I can see. Celtk questions/patches go to Cells until someone steps up to maintain a standalone project. kt From kennytilton at optonline.net Tue Nov 6 00:23:42 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Mon, 05 Nov 2007 19:23:42 -0500 Subject: [cells-devel] Re: celtk expander In-Reply-To: References: Message-ID: <472FB40E.3050102@optonline.net> Andy Chambers wrote: > On 11/2/07, Andy Chambers wrote: > > >>(defmacro mk-expander ((&rest initargs) &rest kids) >> `(make-instance 'expander , at initargs >> :fm-parent *parent* >> :expansion (c? (the-kids , at kids)) >> :expanded (c-in nil) >> :kids (c? (the-kids >> (mk-button-ex ((^label) (setf >> (expanded (upper self expander)) >> (not (expanded (upper self expander)))))) >> (when (^expanded) >> (^expansion)))))) > > > (defmacro mk-expander ((&rest initargs) &rest kids) > `(make-instance 'expander , at initargs > :fm-parent *parent* > :expansion (c? (lambda () > (the-kids , at kids))) > :expanded (c-in nil) > :kids (c? (the-kids > (mk-button-ex ((^label) (setf > (expanded (upper self expander)) > (not (expanded (upper self expander)))))) > (when (^expanded) > (funcall (^expansion))))))) > > wrapping the expansion rule inside a lambda works. This creates a new > set of widgets each time the rule runs though. Is there some way of > doing it without that? There are two things you can do here. One is to look at the family-values class, which has a fancy mechanism for maintaining a list of kids based on the md-value slot, which would go back and forth between '(:expander) and '(:expander :expandee). Then the kids rule avoids forever generating the expander widget because it basically pairs widget kids against the md-value list and sees it can keep a kid (a big issue being that rules can see the last value calculated most supportedly via the .cache symbol macro). The other approach makes the expandee simply /visible/ based on the parnets expanded value. This avoids creating/destroying/recreating what is often an expensive widget. My GUI classes also have a 'collapsed' slot which can be set to mirror the visible slot of an expandee, so you get the treeview effect where the expansion closes up and everything scrunches back over to conserve space. I usually go with the latter. Your second post came thru pretty fast after the first (seems like maybe the lists started working again?) so I did not get a chance to meditate on why the expander only worked thru one cycle. I did see some things I would do differently, but the above pretty much moves us a couple of squares ahead so let's stay where we are. ken From peter.denno at nist.gov Tue Nov 6 13:25:01 2007 From: peter.denno at nist.gov (Peter Denno) Date: Tue, 6 Nov 2007 08:25:01 -0500 Subject: [cells-devel] Re: [cells-gtk-devel] porting to cells3 In-Reply-To: References: Message-ID: <200711060825.02504.peter.denno@nist.gov> On Tuesday 30 October 2007 06:11, Andy Chambers wrote: > I'm just communicating this in case it elicits a nugget of insight > from someone that might have attempted a similar task before. I haven't looked at it, but if you get serious about this, you should have CVS commit permission. Let me know. -- Best regards, - Peter From achambers.home at googlemail.com Wed Nov 7 17:34:35 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Wed, 7 Nov 2007 17:34:35 +0000 Subject: [cells-devel] celtk expander In-Reply-To: <47306D36.9050305@optonline.net> References: <47304C42.90803@optonline.net> <47306D36.9050305@optonline.net> Message-ID: On 11/6/07, Ken Tilton wrote: > Andy Chambers wrote: > > On 11/6/07, Ken Tilton wrote: > Hmmpph. Too bad Tk does not know about that, we have to unpack and then > repack, no simple "visible" flag. > > > > > So I think that setting the visible attribute is the way to go. > > OK. Don't forget :collapsed (c? (not (^visible))) if that is what you > want. (I /think/ collapsed works in the Tk bit.) grepping the Celtk source, I can't find anything about collapsed (although it does appear in the cells geometer class. I can't find anything in the tk docs about collapse either. Should I inherit from the geometer class itself to get this or am I missing the point entirely. -- Andy From kennytilton at optonline.net Wed Nov 7 17:56:15 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Wed, 07 Nov 2007 12:56:15 -0500 Subject: [cells-devel] celtk expander In-Reply-To: References: <47304C42.90803@optonline.net> <47306D36.9050305@optonline.net> Message-ID: <4731FC3F.7020305@optonline.net> Andy Chambers wrote: > On 11/6/07, Ken Tilton wrote: > >>Andy Chambers wrote: >> >>>On 11/6/07, Ken Tilton wrote: > > >>Hmmpph. Too bad Tk does not know about that, we have to unpack and then >>repack, no simple "visible" flag. >> >> >>>So I think that setting the visible attribute is the way to go. >> >>OK. Don't forget :collapsed (c? (not (^visible))) if that is what you >>want. (I /think/ collapsed works in the Tk bit.) > > > grepping the Celtk source, I can't find anything about collapsed > (although it does appear in the cells geometer class. I can't find > anything in the tk docs about collapse either. Should I inherit from > the geometer class itself to get this or am I missing the point > entirely. Hmmm, come to think of it, if you are doing vanilla Celtk (not Cello) collapsed might not apply. I /think/ simply making, say, the middle widget of three invisible would cause it to be unpacked (there being no way to say "invisible" in Tk) and then packing would scrunch the ends together simply because there would be no middle. Sorru for the headfake. kt From achambers.home at googlemail.com Thu Nov 8 11:17:36 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Thu, 8 Nov 2007 11:17:36 +0000 Subject: [cells-devel] celtk expander In-Reply-To: <4731FC3F.7020305@optonline.net> References: <47304C42.90803@optonline.net> <47306D36.9050305@optonline.net> <4731FC3F.7020305@optonline.net> Message-ID: On Nov 7, 2007 5:56 PM, Ken Tilton wrote: > Hmmm, come to think of it, if you are doing vanilla Celtk (not Cello) > collapsed might not apply. I /think/ simply making, say, the middle > widget of three invisible would cause it to be unpacked (there being no > way to say "invisible" in Tk) and then packing would scrunch the ends > together simply because there would be no middle. OK I've got it working nicely now. It's mostly the same as I previously posted except the expansion is specified more like a row/stack widget (i.e. you don't have to use :expansion you just put in the widgets). The specified expansion together with the expander button all remain as kids for the life of the widget and an observer on the expanded slot packs/unpacks as necessary. My next question is about the :tk-spec keyword in deftk forms. How does this relate (if at all) to the allowed options you see in the tk manual pages. It seems like some of them correspond directly and others don't exist. For example... comparing the spec at http://www.tcl.tk/man/tcl8.5/TkCmd/bitmap.htm to.... (deftk bitmap (item) () (:tk-spec bitmap -state -tags -anchor -background -activebackground -disabledbackground -bitmap -activebitmap -disabledbitmap -foreground -activeforeground -disabledforeground)) the celtk spec doesn't have the -data, -file, -maskdata, -maskfile options and the tk spec doesn't have the -state, -tags, -anchor options. >From what I can gather, celtk is mostly using tile widgets as the underlying framework and some of the :tk-specs match those specs better but there are still inconsistencies. Cheers, Andy From achambers.home at googlemail.com Thu Nov 8 15:15:24 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Thu, 8 Nov 2007 15:15:24 +0000 Subject: [cells-devel] celtk expander In-Reply-To: <47331B32.9030301@optonline.net> References: <47304C42.90803@optonline.net> <47306D36.9050305@optonline.net> <4731FC3F.7020305@optonline.net> <47331B32.9030301@optonline.net> Message-ID: On Nov 8, 2007 2:20 PM, Ken wrote: > Andy Chambers wrote: > > On Nov 7, 2007 5:56 PM, Ken Tilton wrote: > > OK I've got it working nicely now. > Cool. You are now certified for Cells /and/ Tk. :) > > It's mostly the same as I > > previously posted except the expansion is specified more like a > > row/stack widget (i.e. you don't have to use :expansion you just put > > in the widgets). The specified expansion together with the expander > > button all remain as kids for the life of the widget and an observer > > on the expanded slot packs/unpacks as necessary. > > > You had to do your own? I am just wondering if the existing "packing" > rule had done reasonable things with the visible/collapsed slots. There's a kids-packing rule for the frame widgets but it doesn't know about visible or collapsed slots. In fact, I'm pretty sure celtk doesn't know anything about these. The only reference I could find to either was in the gui-geometry bit of cells which doesn't seem to be used by celtk. Grepping through Celtk for either "visible" or "collapse" yields nothing. Maybe this is another celloism? I was thinking about this though as a further change. We could add a visible slot to tk-object and the kids-packing rule could check it while creating its pack statement. I'll get the expander finished first though. Just need to draw the bitmaps on the buttons. Thanks for all your help. Andy From frgo at mac.com Fri Nov 16 17:12:20 2007 From: frgo at mac.com (Frank Goenninger) Date: Fri, 16 Nov 2007 18:12:20 +0100 Subject: [cells-devel] Celtk: File Open Dialog ? Message-ID: <2D46307A-1600-46B3-80CD-23B99D7B21ED@mac.com> Hi all: I have been trying to get a button with (mk-button :id :choose-fw-file-btn :text "Choose ..." :command "tk_getOpenFile") in order to get an Open File dialog and get a filename back. The dialog opens but I can't get the selected filename as a value... Any ideas? thx!!! All the best Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Fri Nov 16 18:37:03 2007 From: frgo at mac.com (Frank Goenninger) Date: Fri, 16 Nov 2007 19:37:03 +0100 Subject: [cells-devel] Celtk: Labels no more sunken or raised ... Tile side-effect ? Message-ID: <361F89E8-75C0-44B2-A71B-97ED24F47A1D@mac.com> Hi all: I found some strange effect ... I can't seem to get :relief 'sunken make my label really sunken... (mk-label :text (c? (let ((fw-filename (fm^v :choose-fw-file- btn))) (or fw-filename ""))) :parent-x 210 :parent-y 340 :width 30 :borderwidth 1 :relief 'sunken :tile? nil) When browsing through the code in Celtk I found very few places with Tile dependency only. The most complex being: (defgeneric tk-class-options (self) (:method-combination append) (:method :around (self) (or (get (type-of self) 'tk-class-options) (setf (get (type-of self) 'tk-class-options) (loop with all = (remove-duplicates (call-next- method) :key 'second) for old in (when (tile? self) (case (type-of self) (label '(pady padx height indicatoron relief tk-label)) (otherwise '(pady padx #+hmmm height indicatoron relief tk-label))));; do (setf old (delete old all :key 'car)) finally (return all)))))) .. which does what exactly? I see there's a (when (tile? self) in there ... but what if no Tile is loaded? Sorry, random poking here, clearly, but I can't find what I do different than 10 months ago when last working with Celtk ... Thanks for any insight! Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Sat Nov 17 17:33:14 2007 From: frgo at mac.com (Frank Goenninger) Date: Sat, 17 Nov 2007 18:33:14 +0100 Subject: [cells-devel] Cells: `=0/ANONCELL/NIL]' is not of the expected type `REAL' ??? Message-ID: <012673D3-A13E-4482-9E06-965DA0CC09CF@mac.com> Hi Kenny, hi all ... i've never had this before ... Or so I think ;-) What may cause `=0/ANONCELL/NIL]' is not of the expected type `REAL' to happen ? It's like some cell is not recognized as such and doesn't get "evaluated" correctly? Or is it? Thx for any pointers... Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Sat Nov 17 18:34:38 2007 From: frgo at mac.com (Frank Goenninger) Date: Sat, 17 Nov 2007 19:34:38 +0100 Subject: [cells-devel] Cells: `=0/ANONCELL/NIL]' is not of the expected type `REAL' ??? SOLVED In-Reply-To: <012673D3-A13E-4482-9E06-965DA0CC09CF@mac.com> References: <012673D3-A13E-4482-9E06-965DA0CC09CF@mac.com> Message-ID: Solved. Never do the following: (defmd frgo () slot-1 :slot-1 (c-in 0)) then later on (setf (^slot-1) (c-in 1)) ^^^^^^^^ Cells doesn't recognize this (well, how should it? - it can't) so we're ruining the Cells metadata ... (It has to be a normal setf without the c-in ...) Cheers Frank Am 17.11.2007 um 18:33 schrieb Frank Goenninger: > * PGP Signed: 11/17/07 at 18:33:22 > > Hi Kenny, hi all ... > > i've never had this before ... Or so I think ;-) > > What may cause > > `=0/ANONCELL/NIL]' is not of the expected type `REAL' > > to happen ? It's like some cell is not recognized as such and > doesn't get "evaluated" correctly? Or is it? > > Thx for any pointers... > > Frank > > > > > * Frank Goenninger > * 0xED320F02:0x05AE0907 > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel > > > * PGP Signed: 11/17/07 at 18:33:22 > * text/plain body > * Frank Goenninger > * 0xED320F02:0x05AE0907 -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Sun Nov 18 11:43:49 2007 From: frgo at mac.com (Frank Goenninger) Date: Sun, 18 Nov 2007 12:43:49 +0100 Subject: [cells-devel] Celtk: mk-scrolled-list / Listbox: How to access the current selection ? Message-ID: Hi all: (I also attached a screendump, but this most likely is stripped by the handler for cells-devel) I have a listbox created via (mk-scrolled-list :id :pm-list :tile? nil :parent-x 10 :parent-y 158 :tkfont (list "Courier New" 14 'roman 'normal) :width 80 :selectforeground "#FFFFFF" :selectbackground "#00257A" :list-height 6 :list-item-keys (c? (pms-as-keys (pm-array-ptr (fm^ :pmutil- gui)) (nr-pms (fm^ :pmutil-gui)))) :list-item-factory (lambda (pm) (when pm (make-instance 'listbox-item :id :pm-listbox :fm-parent *parent* :value pm :item-text (conc$ " # " (serial- number pm) " : " (call-out- device pm) ", \"" (callsign pm) "\", FW Version: " (firmware- version pm))))))) I am trying to access the selection with (value (fm-other :pm-list )) but always get NIL - no matter if a line in the listbox is selected or not.... I double checked with the demos in lotsa-.widgets but could not find any difference from the examples there ... Any help really appreciated. Thx - Frank P.S.: On the screendump there's the line "Info on selected Power..:" - > The second one of the NILs there is the result of (value (fm-other :pm-list)) ... -------------- next part -------------- A non-text attachment was scrubbed... Name: Bild 2.png Type: image/png Size: 73115 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Mon Nov 19 22:21:38 2007 From: frgo at mac.com (Frank Goenninger) Date: Mon, 19 Nov 2007 23:21:38 +0100 Subject: [cells-devel] Celtk: Listbox again: new-value does not get propagated ... Or so it seems ; -) ?! Message-ID: <8BFB553E-380A-42E8-B826-473EF442B725@mac.com> Kenny, all: I have still the Listbox problem of not getting a new-value from the listbox after selecting an item. I was able to track it down to the following function in file widget.lisp: (defmethod tk-output-selection (self new-value old-value old-value- boundp) (declare (ignorable old-value old-value-boundp)) (trc "widget.lisp: selection output" self old-value new-value) (when new-value (with-integrity (:client `(:variable ,self)) (let ((v$ (if (stringp new-value) ;; just going slow on switching over to C API before changing tk-send-value new-value (tk-send-value new-value)))) (tcl-set-var *tki* (tk-variable self) v$ (var-flags :tcl- namespace-only)))))) I do get the following line as debug output: 0> 81 widget.lisp: selection output pm-list nil 25681408 So, yeah, there it is: the value of pm-list is changing from NIL to a cffi pointer address. My cell rule (c? (value (fm-other :pm-list))) does not fire ... How should I enable some more debugging ? Thanks! Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Thu Nov 22 11:56:51 2007 From: frgo at mac.com (Frank Goenninger) Date: Thu, 22 Nov 2007 12:56:51 +0100 Subject: [cells-devel] Celtk: mk-entry: How to set initial value? Message-ID: <9D04508B-4170-4EB1-979B-AAF0266DA19E@mac.com> Hi Kenny, hi all (would be interesting to see who actually monitors this ?) I have an entry widget like this: (mk-entry :id :callsign-entry :value (c?n (let ((pm (selected-pm (fm^ :pmutil-gui)))) (if pm (callsign pm)))) :enabled (c? (pm-selected-p (fm^ :pmutil-gui))) :width 17 :tk-justify 'left :relief 'sunken :borderwidth 1 :parent-x 424 :parent-y 321 :background (c_? (required-field-color .parent)) :tile? nil) Intention is to be able to set the value initially and afterwards have the rule kick-in and setting the value automagically. Alas, neither the initial setting of the value really works nor does the cell rule fire ... Are the rules off here or is it just another point where a tiny little code fragment is missing in Celtk that drives the entry widget? Any pointers really appreciated! Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From kennytilton at optonline.net Thu Nov 22 13:42:02 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Thu, 22 Nov 2007 08:42:02 -0500 Subject: [cells-devel] Celtk: mk-entry: How to set initial value? In-Reply-To: <9D04508B-4170-4EB1-979B-AAF0266DA19E@mac.com> References: <9D04508B-4170-4EB1-979B-AAF0266DA19E@mac.com> Message-ID: <4745872A.7040308@optonline.net> Frank Goenninger wrote: > Hi Kenny, hi all (would be interesting to see who actually monitors > this ?) > > I have an entry widget like this: > > (mk-entry :id :callsign-entry > :value (c?n (let ((pm (selected-pm (fm^ :pmutil-gui)))) > (if pm > (callsign pm)))) > :enabled (c? (pm-selected-p (fm^ :pmutil-gui))) > :width 17 > :tk-justify 'left > :relief 'sunken > :borderwidth 1 > :parent-x 424 > :parent-y 321 > :background (c_? (required-field-color .parent)) > :tile? nil) > > Intention is to be able to set the value initially and afterwards have > the rule kick-in and setting the value automagically. Alas, neither the > initial setting of the value really works nor does the cell rule fire ... You do not show nor can I guess what you mean by "set the value initially". If you are supplying a value initarg, then none of the above applies. If you are making the instance and then in the next line of code setf'ing the value that is still not "initially". Please elucidate. Meanwhile, c?n goes the other way: the rule runs once to come up with an initial value and then becomes a classic input cell. As for what you want, it seems a little ugly in that callsign-entry is somewhat a slave to pmutil-gui and somewhat not, and this confusion is making the cells code hard to write. this may be clearer, btw, when we understand better how you meant to supply a value "initially". There is/was something called c-drifter and c-drifter-absolute is close to what you want, but a quick look suggests they are broken precisely at the initialization point, and any fix makes no sense: does this thing depend on its rule or not? If you really need to do this... (c? (let ((x )) (if .cache-bound-p x))) You need the rule to run even if not cache-bound-p (ie, initially) to set up the dependencies. That too is ugly, again I think because of the original confusion over whether the one widget really is a slave to the other. I would resolve that and not get caught up with clever cells tricks. kt From achambers.home at googlemail.com Thu Nov 22 13:46:30 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Thu, 22 Nov 2007 13:46:30 +0000 Subject: [cells-devel] Celtk: mk-entry: How to set initial value? In-Reply-To: <9D04508B-4170-4EB1-979B-AAF0266DA19E@mac.com> References: <9D04508B-4170-4EB1-979B-AAF0266DA19E@mac.com> Message-ID: On Nov 22, 2007 11:56 AM, Frank Goenninger wrote: > Hi Kenny, hi all (would be interesting to see who actually monitors > this ?) I'm listening. Though I can't promise to be very helpful yet. Still learning cells/celtk. -- Andy From frgo at mac.com Thu Nov 22 13:56:33 2007 From: frgo at mac.com (Frank Goenninger) Date: Thu, 22 Nov 2007 14:56:33 +0100 Subject: [cells-devel] Celtk: mk-entry: How to set initial value? In-Reply-To: <4745872A.7040308@optonline.net> References: <9D04508B-4170-4EB1-979B-AAF0266DA19E@mac.com> <4745872A.7040308@optonline.net> Message-ID: <0C43E34E-9970-4B8C-B13C-C3F4262D005E@mac.com> Ok - so here goes the use case: 1. A user is present a list of devices (PowerMasters, "pm") (in listbox :pm-list). 2. The entry field :call-sign entry is empty. 3. The user selects an item in the listbox. This sets a slot in the parent model (named :pmutil-gui) with the value of the corresponding element of the listbox's item-factory. 4. *** Now the entry field - as it does a c?n on that "selected-pm" - should get the callsign of that selected pm. The user is then able to change that value to a new one by overtyping it. 5. The user selects a button that reads the value of :callsign-entry and sends that value to the pm device (this works already). 6. After programming the device with the new callsign the listbox has to refresh,it is re-reading the items such that no item is selected. The :callsign-entry should be set to "" (= cleared) because no pm is selected. 7. Goto step 3 That's it. Does this make it more clear. Meanhwile I am chewing on your details below ... Thx!!! Frank Am 22.11.2007 um 14:42 schrieb Ken Tilton: > Frank Goenninger wrote: >> Hi Kenny, hi all (would be interesting to see who actually >> monitors this ?) >> I have an entry widget like this: >> (mk-entry :id :callsign-entry >> :value (c?n (let ((pm (selected-pm (fm^ :pmutil-gui)))) >> (if pm >> (callsign pm)))) >> :enabled (c? (pm-selected-p (fm^ :pmutil-gui))) >> :width 17 >> :tk-justify 'left >> :relief 'sunken >> :borderwidth 1 >> :parent-x 424 >> :parent-y 321 >> :background (c_? (required-field-color .parent)) >> :tile? nil) >> Intention is to be able to set the value initially and afterwards >> have the rule kick-in and setting the value automagically. Alas, >> neither the initial setting of the value really works nor does >> the cell rule fire ... > > You do not show nor can I guess what you mean by "set the value > initially". If you are supplying a value initarg, then none of the > above applies. If you are making the instance and then in the next > line of code setf'ing the value that is still not "initially". > Please elucidate. > > Meanwhile, c?n goes the other way: the rule runs once to come up > with an initial value and then becomes a classic input cell. > > As for what you want, it seems a little ugly in that callsign-entry > is somewhat a slave to pmutil-gui and somewhat not, and this > confusion is making the cells code hard to write. this may be > clearer, btw, when we understand better how you meant to supply a > value "initially". > > There is/was something called c-drifter and c-drifter-absolute is > close to what you want, but a quick look suggests they are broken > precisely at the initialization point, and any fix makes no sense: > does this thing depend on its rule or not? > > If you really need to do this... > > (c? (let ((x )) > (if .cache-bound-p > > x))) > > You need the rule to run even if not cache-bound-p (ie, initially) > to set up the dependencies. > > That too is ugly, again I think because of the original confusion > over whether the one widget really is a slave to the other. I would > resolve that and not get caught up with clever cells tricks. > > kt -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From kennytilton at optonline.net Thu Nov 22 14:51:35 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Thu, 22 Nov 2007 09:51:35 -0500 Subject: [cells-devel] Celtk: mk-entry: How to set initial value? In-Reply-To: <0C43E34E-9970-4B8C-B13C-C3F4262D005E@mac.com> References: <9D04508B-4170-4EB1-979B-AAF0266DA19E@mac.com> <4745872A.7040308@optonline.net> <0C43E34E-9970-4B8C-B13C-C3F4262D005E@mac.com> Message-ID: <47459777.6010002@optonline.net> Frank Goenninger wrote: > Ok - so here goes the use case: > > 1. A user is present a list of devices (PowerMasters, "pm") (in listbox > :pm-list). > > 2. The entry field :call-sign entry is empty. > > 3. The user selects an item in the listbox. This sets a slot in the > parent model (named :pmutil-gui) with the value of the corresponding > element of the listbox's item-factory. > > 4. *** Now the entry field - as it does a c?n on that "selected-pm" - > should get the callsign of that selected pm. The user is then able to > change that value to a new one by overtyping it. > > 5. The user selects a button that reads the value of :callsign-entry > and sends that value to the pm device (this works already). > > 6. After programming the device with the new callsign the listbox has > to refresh,it is re-reading the items such that no item is selected. > The :callsign-entry should be set to "" (= cleared) because no pm is > selected. > > 7. Goto step 3 > > That's it. Does this make it more clear. Yes. Your original spec off a bit, I think: If perchance the listbox got created populated and with some value initially selected, you would want its callsign prefilling the entry widget, so in fact the rule /always/ applies. So: (defmacro c?+n (&body body) `(make-c-dependent :inputp t :code ',body :value-state :unevaluated :rule (c-lambda , at body))) That is the same configuration as for c?, but it specifies that inputp is t, meaning one can also setf the critter. This should Just Work with the same rule you had. The edit code will be setfing away until the selection changes and then, wham, in comes the new callsign as a prefill for ongoing editing. kt ps. c?n is like the above but has without-c-dependency around the rule, so it runs only once and then, without any dependencies to talk to, gets optimized away. k > Meanhwile I am chewing on > your details below ... Thx!!! > > Frank > > Am 22.11.2007 um 14:42 schrieb Ken Tilton: > >> Frank Goenninger wrote: >> >>> Hi Kenny, hi all (would be interesting to see who actually monitors >>> this ?) >>> I have an entry widget like this: >>> (mk-entry :id :callsign-entry >>> :value (c?n (let ((pm (selected-pm (fm^ :pmutil-gui)))) >>> (if pm >>> (callsign pm)))) >>> :enabled (c? (pm-selected-p (fm^ :pmutil-gui))) >>> :width 17 >>> :tk-justify 'left >>> :relief 'sunken >>> :borderwidth 1 >>> :parent-x 424 >>> :parent-y 321 >>> :background (c_? (required-field-color .parent)) >>> :tile? nil) >>> Intention is to be able to set the value initially and afterwards >>> have the rule kick-in and setting the value automagically. Alas, >>> neither the initial setting of the value really works nor does the >>> cell rule fire ... >> >> >> You do not show nor can I guess what you mean by "set the value >> initially". If you are supplying a value initarg, then none of the >> above applies. If you are making the instance and then in the next >> line of code setf'ing the value that is still not "initially". Please >> elucidate. >> >> Meanwhile, c?n goes the other way: the rule runs once to come up with >> an initial value and then becomes a classic input cell. >> >> As for what you want, it seems a little ugly in that callsign-entry >> is somewhat a slave to pmutil-gui and somewhat not, and this >> confusion is making the cells code hard to write. this may be >> clearer, btw, when we understand better how you meant to supply a >> value "initially". >> >> There is/was something called c-drifter and c-drifter-absolute is >> close to what you want, but a quick look suggests they are broken >> precisely at the initialization point, and any fix makes no sense: >> does this thing depend on its rule or not? >> >> If you really need to do this... >> >> (c? (let ((x )) >> (if .cache-bound-p >> >> x))) >> >> You need the rule to run even if not cache-bound-p (ie, initially) to >> set up the dependencies. >> >> That too is ugly, again I think because of the original confusion >> over whether the one widget really is a slave to the other. I would >> resolve that and not get caught up with clever cells tricks. >> >> kt > > > From frgo at mac.com Fri Nov 23 19:06:28 2007 From: frgo at mac.com (Frank Goenninger) Date: Fri, 23 Nov 2007 20:06:28 +0100 Subject: [cells-devel] Celtk: Any :state slot brings up error ... ?! Message-ID: <1D078B30-5E67-409C-80C7-4163E60384EE@mac.com> Hi again: I have my entry widget as posted before: (mk-button-ex ("Change!" (let* ((pmutil-gui (fm^ :pmutil-gui)) (pm (selected-pm pmutil-gui))) (when pm (let ((callsign (fm^v :callsign-entry))) (set-status pmutil-gui +PMUTIL-GUI-STATUS- SETTING-CALLSIGN-IN-PM+) (setf (new-callsign pmutil-gui) (subseq callsign 0 (min (length callsign) +PMIO_MAX_CALLSIGN_LENGTH+) )) (set-status pmutil-gui +PMUTIL-GUI-STATUS- READY+))))) :id :callsign-entry-btn ;; :state (c? (if (pm-selected-p (fm^ :pmutil- gui)) <--- My intended functionality ;; 'enabled ;; 'disbled)) :state (c? (if 1 <-- Simple test 'enabled 'disbled)) :background (c? (background .parent)) :parent-x 589 :parent-y 320 :tile? nil) As soon as I put the :state part in I get the following error: the assertion (NOT (CFFI-SYS:NULL-POINTER-P CTK::SELF-TKWIN)) failed. [Condition of type SIMPLE-ERROR] I wasn't able to get a real trace/debug approach to this one ... I assume this has to do with the order of widget creation. I am sure I have used this before, so I haven't a clue what's wrong there. Oh my ... ?! Any help really appreciated... Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Fri Nov 23 19:09:28 2007 From: frgo at mac.com (Frank Goenninger) Date: Fri, 23 Nov 2007 20:09:28 +0100 Subject: [cells-devel] Celtk: Any :state slot brings up error ... ?! In-Reply-To: <1D078B30-5E67-409C-80C7-4163E60384EE@mac.com> References: <1D078B30-5E67-409C-80C7-4163E60384EE@mac.com> Message-ID: Ah - no, it's not caused by 'disbled being written incorrectly (I just saw this - sorry). Frank Am 23.11.2007 um 20:06 schrieb Frank Goenninger: > * PGP Signed: 11/23/07 at 20:06:41 > > Hi again: > > I have my entry widget as posted before: > > (mk-button-ex ("Change!" > (let* ((pmutil-gui (fm^ :pmutil-gui)) > (pm (selected-pm pmutil-gui))) > (when pm > (let ((callsign (fm^v :callsign-entry))) > (set-status pmutil-gui +PMUTIL-GUI-STATUS- > SETTING-CALLSIGN-IN-PM+) > (setf (new-callsign pmutil-gui) > (subseq callsign > 0 > (min (length callsign) > > +PMIO_MAX_CALLSIGN_LENGTH+) > )) > (set-status pmutil-gui +PMUTIL-GUI-STATUS- > READY+))))) > :id :callsign-entry-btn > ;; :state (c? (if (pm-selected-p (fm^ :pmutil- > gui)) <--- My intended functionality > ;; 'enabled > ;; 'disbled)) > :state (c? (if > 1 > <-- Simple test > 'enabled > 'disbled)) > :background (c? (background .parent)) > :parent-x 589 > :parent-y 320 > :tile? nil) > > As soon as I put the :state part in I get the following error: > > the assertion (NOT (CFFI-SYS:NULL-POINTER-P CTK::SELF-TKWIN)) failed. > [Condition of type SIMPLE-ERROR] > > I wasn't able to get a real trace/debug approach to this one ... I > assume this has to do with the order of widget creation. I am sure > I have used this before, so I haven't a clue what's wrong there. Oh > my ... ?! > > Any help really appreciated... > > Frank > > * Frank Goenninger > * 0xED320F02:0x05AE0907 > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel > > > * PGP Signed: 11/23/07 at 20:06:41 > * text/plain body > * Frank Goenninger > * 0xED320F02:0x05AE0907 -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From frgo at mac.com Fri Nov 23 19:13:18 2007 From: frgo at mac.com (Frank Goenninger) Date: Fri, 23 Nov 2007 20:13:18 +0100 Subject: [cells-devel] Celtk: Any :state slot brings up error ... ?! In-Reply-To: References: <1D078B30-5E67-409C-80C7-4163E60384EE@mac.com> Message-ID: Backtrace is: 1: (ERROR SIMPLE-ERROR :FORMAT-CONTROL "the assertion ~s failed." :FORMAT-ARGUMENTS ((NOT (CFFI-SYS:NULL-POINTER-P CTK::SELF-TKWIN)))) 2: (CTK::TK-CREATE-EVENT-HANDLER-EX CALLSIGN-ENTRY-BTN CTK::WIDGET-EVENT-HANDLER-CALLBACK -1) Locals: CTK::WIDGET = CALLSIGN-ENTRY-BTN CTK::CALLBACK-NAME = CTK::WIDGET-EVENT-HANDLER-CALLBACK NIL = -1 CTK::SELF-TKWIN = 0 <<<<<< ---- Here's the problem .... Yeah -why? CTK::CALLBACK-NAME = CTK::WIDGET-EVENT-HANDLER-CALLBACK 3: ((:INTERNAL (METHOD CTK::MAKE-TK-INSTANCE :AFTER (CTK::WIDGET)) 0) :USER-Q (:POST-MAKE-TK CALLSIGN-ENTRY-BTN)) 4: (CTK:TK-USER-QUEUE-HANDLER (NIL ((:PACK PM-LIST) . #))) 5: (CELLS::FINISH-BUSINESS) 6: (CELLS::CALL-WITH-INTEGRITY NIL NIL #) 7: (CTK::%RUN-WINDOW) Am 23.11.2007 um 20:09 schrieb Frank Goenninger: > * PGP Signed: 11/23/07 at 20:09:42, Decrypted > > Ah - no, it's not caused by 'disbled being written incorrectly (I > just saw this - sorry). > > Frank > > Am 23.11.2007 um 20:06 schrieb Frank Goenninger: > >> > Old Signed: 11/23/07 at 20:06:41 >> >> Hi again: >> >> I have my entry widget as posted before: >> >> (mk-button-ex ("Change!" >> (let* ((pmutil-gui (fm^ :pmutil-gui)) >> (pm (selected-pm pmutil-gui))) >> (when pm >> (let ((callsign (fm^v :callsign-entry))) >> (set-status pmutil-gui +PMUTIL-GUI-STATUS- >> SETTING-CALLSIGN-IN-PM+) >> (setf (new-callsign pmutil-gui) >> (subseq callsign >> 0 >> (min (length callsign) >> >> +PMIO_MAX_CALLSIGN_LENGTH+) >> )) >> (set-status pmutil-gui +PMUTIL-GUI-STATUS- >> READY+))))) >> :id :callsign-entry-btn >> ;; :state (c? (if (pm-selected-p (fm^ :pmutil- >> gui)) <--- My intended functionality >> ;; 'enabled >> ;; 'disbled)) >> :state (c? (if >> 1 >> <-- Simple test >> 'enabled >> 'disbled)) >> :background (c? (background .parent)) >> :parent-x 589 >> :parent-y 320 >> :tile? nil) >> >> As soon as I put the :state part in I get the following error: >> >> the assertion (NOT (CFFI-SYS:NULL-POINTER-P CTK::SELF-TKWIN)) failed. >> [Condition of type SIMPLE-ERROR] >> >> I wasn't able to get a real trace/debug approach to this one ... I >> assume this has to do with the order of widget creation. I am sure >> I have used this before, so I haven't a clue what's wrong there. >> Oh my ... ?! >> >> Any help really appreciated... >> >> Frank >> >> * Frank Goenninger >> * 0xED320F02:0x05AE0907 >> _______________________________________________ >> cells-devel site list >> cells-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/cells-devel >> >> >> > Old Signed: 11/23/07 at 20:06:41 >> * text/plain body >> * Frank Goenninger >> * 0xED320F02:0x05AE0907 > > > * Frank Goenninger > * 0xED320F02:0x05AE0907 -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 833 bytes Desc: not available URL: