Mirko Vukovic | 17 Apr 2012 20:17
Picon

can one make dependencies between models?

Hello,

I am doing very basic cell-stuff, much like the ones in the doc folder:  Not liking excel and its cousins, I am implementing spread-sheet like calculations in cells.

My question:

1) Can I build two models (model1, model2) and specify that a slot in model2 depends on changes in some other slot in model1?
2) Related: can I change a slot specification in a model.  For example from `c-in' to `c?'.  I assume that I can, but I would have to re-initialize the model somehow.  Correct?

I am also very interested in the question posted just a few minutes ago.  I would like to build an automated way of generating a GUI front end my cell models.

Thanks,

Mirko

<div><p>Hello,<br><br>I am doing very basic cell-stuff, much like the ones in the doc folder:&nbsp; Not liking excel and its cousins, I am implementing spread-sheet like calculations in cells.<br><br>My question:<br><br>1) Can I build two models (model1, model2) and specify that a slot in model2 depends on changes in some other slot in model1?<br>
2) Related: can I change a slot specification in a model.&nbsp; For example from `c-in' to `c?'.&nbsp; I assume that I can, but I would have to re-initialize the model somehow.&nbsp; Correct? <br><br>I am also very interested in the question posted just a few minutes ago.&nbsp; I would like to build an automated way of generating a GUI front end my cell models.<br><br>Thanks,<br><br>Mirko<br></p></div>
Frank Goenninger | 17 Apr 2012 23:08

Re: can one make dependencies between models?

Hi Mirko,

Am 17.04.2012 um 20:17 schrieb Mirko Vukovic:

> Hello,
> 
> I am doing very basic cell-stuff, much like the ones in the doc folder:  Not liking excel and its cousins, I am
implementing spread-sheet like calculations in cells.
> 
> My question:
> 
> 1) Can I build two models (model1, model2) and specify that a slot in model2 depends on changes in some other
slot in model1?

Sure:

(in-package #:cells)

;;; ------------------
;;; ***  Model M1  ***
;;; ------------------

(defmd m1 ()
  a
  b
  :a (c-in 1)
  :b (c-in 1))

(defobserver a ((self m1))
  (when new-value
    (format *debug-io* "~%~S: New value for slot a => ~S."
      self (a self))))

(defobserver b ((self m1))
  (when new-value
    (format *debug-io* "~%~S: New value for slot b => ~S."
      self (b self))))

(defmacro mk-m1 (id)
  `(make-instance 'm1
     :fm-parent *parent*
     :md-name ,id))

;;; ------------------
;;; ***  Model M2  ***
;;; ------------------

(defmd m2 ()
  (c (c? (let ((m1 (fm^ :m1)))   ;; -> fm^ searches for :m1 in the current family
           (* (a m1) (b m1))))))

(defmacro mk-m2 (id)
  `(make-instance 'm2
     :fm-parent *parent*
     :md-name ,id))

(defobserver c ((self m2))
  (when new-value
    (format *debug-io* "~%~S: New value for slot c => ~S."
      self (c self))))

;;; ------------------
;;; ***  Family M  ***
;;; ------------------

(defmd m (family)
  (kids (c? (the-kids
             (mk-m1 :m1)
             (mk-m2 :m2)))) ;; :m1 and :m2 are kids of :m's family.
  :md-name :m)

;;; -----------------
;;; ***  TESTING  ***
;;; -----------------

(defun m-test ()

  (let* ((self (make-instance 'm))
         (m1 (fm-find-kid self :m1)))

    ;; Step 1
    (format *debug-io* "~%~%STEP 1~&")
    (setf (a m1) 2)
    ;; => C = 2
    ;; See observer for C !

    ;; Step 2
    (format *debug-io* "~%~%STEP 2 ~&")
    (setf (b m1) 3))
    ;; => C = 6
    ;; See observer for C !

  (values))

> 2) Related: can I change a slot specification in a model.  For example from `c-in' to `c?'.  I assume that I
can, but I would have to re-initialize the model somehow.  Correct? 

This one I'd like to leave for Kenny to answer ... Never did that during one run - I always reset cells via
#'cells-reset and the started over when I needed to do that.

> I am also very interested in the question posted just a few minutes ago.  I would like to build an automated
way of generating a GUI front end my cell models.

I tried to answer this in the other mail.

> 
> Thanks,
> 
> Mirko

Hope that helps.

Cheers
    Frank

Frank Goenninger | 17 Apr 2012 23:13

Re: can one make dependencies between models?

... Output of the short demo below:

(m-test)

M1: New value for slot a => 1.
M1: New value for slot b => 1.
M2: New value for slot c => 1.

STEP 1

M1: New value for slot a => 2.
M2: New value for slot c => 2.

STEP 2 

M1: New value for slot b => 3.
M2: New value for slot c => 6.

... cute, ha ?

;-)))

Frank

Am 17.04.2012 um 23:08 schrieb Frank Goenninger:

> Hi Mirko,
> 
> Am 17.04.2012 um 20:17 schrieb Mirko Vukovic:
> 
>> Hello,
>> 
>> I am doing very basic cell-stuff, much like the ones in the doc folder:  Not liking excel and its cousins, I
am implementing spread-sheet like calculations in cells.
>> 
>> My question:
>> 
>> 1) Can I build two models (model1, model2) and specify that a slot in model2 depends on changes in some
other slot in model1?
> 
> Sure:
> 
> (in-package #:cells)
> 
> ;;; ------------------
> ;;; ***  Model M1  ***
> ;;; ------------------
> 
> (defmd m1 ()
>  a
>  b
>  :a (c-in 1)
>  :b (c-in 1))
> 
> (defobserver a ((self m1))
>  (when new-value
>    (format *debug-io* "~%~S: New value for slot a => ~S."
>      self (a self))))
> 
> (defobserver b ((self m1))
>  (when new-value
>    (format *debug-io* "~%~S: New value for slot b => ~S."
>      self (b self))))
> 
> (defmacro mk-m1 (id)
>  `(make-instance 'm1
>     :fm-parent *parent*
>     :md-name ,id))
> 
> ;;; ------------------
> ;;; ***  Model M2  ***
> ;;; ------------------
> 
> (defmd m2 ()
>  (c (c? (let ((m1 (fm^ :m1)))   ;; -> fm^ searches for :m1 in the current family
>           (* (a m1) (b m1))))))
> 
> (defmacro mk-m2 (id)
>  `(make-instance 'm2
>     :fm-parent *parent*
>     :md-name ,id))
> 
> (defobserver c ((self m2))
>  (when new-value
>    (format *debug-io* "~%~S: New value for slot c => ~S."
>      self (c self))))
> 
> ;;; ------------------
> ;;; ***  Family M  ***
> ;;; ------------------
> 
> (defmd m (family)
>  (kids (c? (the-kids
>             (mk-m1 :m1)
>             (mk-m2 :m2)))) ;; :m1 and :m2 are kids of :m's family.
>  :md-name :m)
> 
> ;;; -----------------
> ;;; ***  TESTING  ***
> ;;; -----------------
> 
> (defun m-test ()
> 
>  (let* ((self (make-instance 'm))
>         (m1 (fm-find-kid self :m1)))
> 
>    ;; Step 1
>    (format *debug-io* "~%~%STEP 1~&")
>    (setf (a m1) 2)
>    ;; => C = 2
>    ;; See observer for C !
> 
>    ;; Step 2
>    (format *debug-io* "~%~%STEP 2 ~&")
>    (setf (b m1) 3))
>    ;; => C = 6
>    ;; See observer for C !
> 
>  (values))
> 
> 
>> 2) Related: can I change a slot specification in a model.  For example from `c-in' to `c?'.  I assume that I
can, but I would have to re-initialize the model somehow.  Correct? 
> 
> This one I'd like to leave for Kenny to answer ... Never did that during one run - I always reset cells via
#'cells-reset and the started over when I needed to do that.
> 
>> I am also very interested in the question posted just a few minutes ago.  I would like to build an automated
way of generating a GUI front end my cell models.
> 
> I tried to answer this in the other mail.
> 
>> 
>> Thanks,
>> 
>> Mirko
> 
> Hope that helps.
> 
> Cheers
>    Frank
> 

Mirko Vukovic | 18 Apr 2012 05:29
Picon

Re: can one make dependencies between models?

Thank you very much Frank, I think I got it.

A follow-up question.  With this technique, I have several models, and the data is flowing from one model to the next.  Nice.

But is there a suggested procedure to temporarily isolate the model, so that it can be tested by itself?  In other words, can one explicitly set values to cells whose initform defines them in terms of other model's slots.

I tried setf on a cell that was linked to another model.  It seems to work.

But, is its initform (c? (let ((m (fm^ :other-model))) (blah (slot m) ...))) still active?
How can I test that?  By forcing that model to recompute itself.  How do I do that?  I did not find an obvious candidate in the exported symbols.

Thanks again,

Mirko

On Tue, Apr 17, 2012 at 5:13 PM, Frank Goenninger <frgo <at> me.com> wrote:
... Output of the short demo below:

(m-test)

M1: New value for slot a => 1.
M1: New value for slot b => 1.
M2: New value for slot c => 1.

STEP 1

M1: New value for slot a => 2.
M2: New value for slot c => 2.

STEP 2

M1: New value for slot b => 3.
M2: New value for slot c => 6.

... cute, ha ?

;-)))

Frank

Am 17.04.2012 um 23:08 schrieb Frank Goenninger:

> Hi Mirko,
>
> Am 17.04.2012 um 20:17 schrieb Mirko Vukovic:
>
>> Hello,
>>
>> I am doing very basic cell-stuff, much like the ones in the doc folder:  Not liking excel and its cousins, I am implementing spread-sheet like calculations in cells.
>>
>> My question:
>>
>> 1) Can I build two models (model1, model2) and specify that a slot in model2 depends on changes in some other slot in model1?
>
> Sure:
>
> (in-package #:cells)
>
> ;;; ------------------
> ;;; ***  Model M1  ***
> ;;; ------------------
>
> (defmd m1 ()
>  a
>  b
>  :a (c-in 1)
>  :b (c-in 1))
>
> (defobserver a ((self m1))
>  (when new-value
>    (format *debug-io* "~%~S: New value for slot a => ~S."
>      self (a self))))
>
> (defobserver b ((self m1))
>  (when new-value
>    (format *debug-io* "~%~S: New value for slot b => ~S."
>      self (b self))))
>
> (defmacro mk-m1 (id)
>  `(make-instance 'm1
>     :fm-parent *parent*
>     :md-name ,id))
>
> ;;; ------------------
> ;;; ***  Model M2  ***
> ;;; ------------------
>
> (defmd m2 ()
>  (c (c? (let ((m1 (fm^ :m1)))   ;; -> fm^ searches for :m1 in the current family
>           (* (a m1) (b m1))))))
>
> (defmacro mk-m2 (id)
>  `(make-instance 'm2
>     :fm-parent *parent*
>     :md-name ,id))
>
> (defobserver c ((self m2))
>  (when new-value
>    (format *debug-io* "~%~S: New value for slot c => ~S."
>      self (c self))))
>
> ;;; ------------------
> ;;; ***  Family M  ***
> ;;; ------------------
>
> (defmd m (family)
>  (kids (c? (the-kids
>             (mk-m1 :m1)
>             (mk-m2 :m2)))) ;; :m1 and :m2 are kids of :m's family.
>  :md-name :m)
>
> ;;; -----------------
> ;;; ***  TESTING  ***
> ;;; -----------------
>
> (defun m-test ()
>
>  (let* ((self (make-instance 'm))
>         (m1 (fm-find-kid self :m1)))
>
>    ;; Step 1
>    (format *debug-io* "~%~%STEP 1~&")
>    (setf (a m1) 2)
>    ;; => C = 2
>    ;; See observer for C !
>
>    ;; Step 2
>    (format *debug-io* "~%~%STEP 2 ~&")
>    (setf (b m1) 3))
>    ;; => C = 6
>    ;; See observer for C !
>
>  (values))
>
>
>> 2) Related: can I change a slot specification in a model.  For example from `c-in' to `c?'.  I assume that I can, but I would have to re-initialize the model somehow.  Correct?
>
> This one I'd like to leave for Kenny to answer ... Never did that during one run - I always reset cells via #'cells-reset and the started over when I needed to do that.
>
>> I am also very interested in the question posted just a few minutes ago.  I would like to build an automated way of generating a GUI front end my cell models.
>
> I tried to answer this in the other mail.
>
>>
>> Thanks,
>>
>> Mirko
>
> Hope that helps.
>
> Cheers
>    Frank
>


<div>
<p>Thank you very much Frank, I think I got it.<br><br>A follow-up question.&nbsp; With this technique, I have several models, and the data is flowing from one model to the next.&nbsp; Nice.<br><br>But is there a suggested procedure to temporarily isolate the model, so that it can be tested by itself?&nbsp; In other words, can one explicitly set values to cells whose initform defines them in terms of other model's slots.<br><br>I tried setf on a cell that was linked to another model.&nbsp; It seems to work.<br><br>But, is its initform (c? (let ((m (fm^ :other-model))) (blah (slot m) ...))) still active? <br>How can I test that?&nbsp; By forcing that model to recompute itself.&nbsp; How do I do that?&nbsp; I did not find an obvious candidate in the exported symbols.<br><br>Thanks again,<br><br>Mirko<br><br></p>
<div class="gmail_quote">On Tue, Apr 17, 2012 at 5:13 PM, Frank Goenninger <span dir="ltr">&lt;<a href="mailto:frgo <at> me.com">frgo <at> me.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
... Output of the short demo below:<br><br>
(m-test)<br><br>
M1: New value for slot a =&gt; 1.<br>
M1: New value for slot b =&gt; 1.<br>
M2: New value for slot c =&gt; 1.<br><br>
STEP 1<br><br>
M1: New value for slot a =&gt; 2.<br>
M2: New value for slot c =&gt; 2.<br><br>
STEP 2<br><br>
M1: New value for slot b =&gt; 3.<br>
M2: New value for slot c =&gt; 6.<br><br>
... cute, ha ?<br><br>
;-)))<br><br>
Frank<br><br>
Am 17.04.2012 um 23:08 schrieb Frank Goenninger:<br><div class="HOEnZb"><div class="h5">
<br>
&gt; Hi Mirko,<br>
&gt;<br>
&gt; Am 17.04.2012 um 20:17 schrieb Mirko Vukovic:<br>
&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I am doing very basic cell-stuff, much like the ones in the doc folder: &nbsp;Not liking excel and its cousins, I am implementing spread-sheet like calculations in cells.<br>
&gt;&gt;<br>
&gt;&gt; My question:<br>
&gt;&gt;<br>
&gt;&gt; 1) Can I build two models (model1, model2) and specify that a slot in model2 depends on changes in some other slot in model1?<br>
&gt;<br>
&gt; Sure:<br>
&gt;<br>
&gt; (in-package #:cells)<br>
&gt;<br>
&gt; ;;; ------------------<br>
&gt; ;;; *** &nbsp;Model M1 &nbsp;***<br>
&gt; ;;; ------------------<br>
&gt;<br>
&gt; (defmd m1 ()<br>
&gt; &nbsp;a<br>
&gt; &nbsp;b<br>
&gt; &nbsp;:a (c-in 1)<br>
&gt; &nbsp;:b (c-in 1))<br>
&gt;<br>
&gt; (defobserver a ((self m1))<br>
&gt; &nbsp;(when new-value<br>
&gt; &nbsp; &nbsp;(format *debug-io* "~%~S: New value for slot a =&gt; ~S."<br>
&gt; &nbsp; &nbsp; &nbsp;self (a self))))<br>
&gt;<br>
&gt; (defobserver b ((self m1))<br>
&gt; &nbsp;(when new-value<br>
&gt; &nbsp; &nbsp;(format *debug-io* "~%~S: New value for slot b =&gt; ~S."<br>
&gt; &nbsp; &nbsp; &nbsp;self (b self))))<br>
&gt;<br>
&gt; (defmacro mk-m1 (id)<br>
&gt; &nbsp;`(make-instance 'm1<br>
&gt; &nbsp; &nbsp; :fm-parent *parent*≤br>
&gt; &nbsp; &nbsp; :md-name ,id))<br>
&gt;<br>
&gt; ;;; ------------------<br>
&gt; ;;; *** &nbsp;Model M2 &nbsp;***<br>
&gt; ;;; ------------------<br>
&gt;<br>
&gt; (defmd m2 ()<br>
&gt; &nbsp;(c (c? (let ((m1 (fm^ :m1))) &nbsp; ;; -&gt; fm^ searches for :m1 in the current family<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (* (a m1) (b m1))))))<br>
&gt;<br>
&gt; (defmacro mk-m2 (id)<br>
&gt; &nbsp;`(make-instance 'm2<br>
&gt; &nbsp; &nbsp; :fm-parent *parent*≤br>
&gt; &nbsp; &nbsp; :md-name ,id))<br>
&gt;<br>
&gt; (defobserver c ((self m2))<br>
&gt; &nbsp;(when new-value<br>
&gt; &nbsp; &nbsp;(format *debug-io* "~%~S: New value for slot c =&gt; ~S."<br>
&gt; &nbsp; &nbsp; &nbsp;self (c self))))<br>
&gt;<br>
&gt; ;;; ------------------<br>
&gt; ;;; *** &nbsp;Family M &nbsp;***<br>
&gt; ;;; ------------------<br>
&gt;<br>
&gt; (defmd m (family)<br>
&gt; &nbsp;(kids (c? (the-kids<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (mk-m1 :m1)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (mk-m2 :m2)))) ;; :m1 and :m2 are kids of :m's family.<br>
&gt; &nbsp;:md-name :m)<br>
&gt;<br>
&gt; ;;; -----------------<br>
&gt; ;;; *** &nbsp;TESTING &nbsp;***<br>
&gt; ;;; -----------------<br>
&gt;<br>
&gt; (defun m-test ()<br>
&gt;<br>
&gt; &nbsp;(let* ((self (make-instance 'm))<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; (m1 (fm-find-kid self :m1)))<br>
&gt;<br>
&gt; &nbsp; &nbsp;;; Step 1<br>
&gt; &nbsp; &nbsp;(format *debug-io* "~%~%STEP 1~&amp;")<br>
&gt; &nbsp; &nbsp;(setf (a m1) 2)<br>
&gt; &nbsp; &nbsp;;; =&gt; C = 2<br>
&gt; &nbsp; &nbsp;;; See observer for C !<br>
&gt;<br>
&gt; &nbsp; &nbsp;;; Step 2<br>
&gt; &nbsp; &nbsp;(format *debug-io* "~%~%STEP 2 ~&amp;")<br>
&gt; &nbsp; &nbsp;(setf (b m1) 3))<br>
&gt; &nbsp; &nbsp;;; =&gt; C = 6<br>
&gt; &nbsp; &nbsp;;; See observer for C !<br>
&gt;<br>
&gt; &nbsp;(values))<br>
&gt;<br>
&gt;<br>
&gt;&gt; 2) Related: can I change a slot specification in a model. &nbsp;For example from `c-in' to `c?'. &nbsp;I assume that I can, but I would have to re-initialize the model somehow. &nbsp;Correct?<br>
&gt;<br>
&gt; This one I'd like to leave for Kenny to answer ... Never did that during one run - I always reset cells via #'cells-reset and the started over when I needed to do that.<br>
&gt;<br>
&gt;&gt; I am also very interested in the question posted just a few minutes ago. &nbsp;I would like to build an automated way of generating a GUI front end my cell models.<br>
&gt;<br>
&gt; I tried to answer this in the other mail.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt;<br>
&gt;&gt; Mirko<br>
&gt;<br>
&gt; Hope that helps.<br>
&gt;<br>
&gt; Cheers<br>
&gt; &nbsp; &nbsp;Frank<br>
&gt;<br><br>
</div></div>
</blockquote>
</div>
<br>
</div>
Frank Goenninger | 18 Apr 2012 10:39

Re: can one make dependencies between models?

Am 18.04.2012 um 05:29 schrieb Mirko Vukovic:

> But is there a suggested procedure to temporarily isolate the model, so that it can be tested by itself?  In
other words, can one explicitly set values to cells whose initform defines them in terms of other model's slots.
> 
> I tried setf on a cell that was linked to another model.  It seems to work.

How exactly did you do the setf ?

> But, is its initform (c? (let ((m (fm^ :other-model))) (blah (slot m) ...))) still active? 

What does the inspection of your model and the cells slot reveal ?

> How can I test that?  By forcing that model to recompute itself.  How do I do that?  I did not find an obvious
candidate in the exported symbols.

Recalculation is simply forced by "reading" / accessing a cells slot... As soon as you say (c? (some-slot
model)) or even just do a (format ..."~s" (some-slot model)) this triggers a recompute cycle in cells - the
slot needs to be current to be correct so Cells triggers all dependencies...

> 
> Thanks again,
> 
> Mirko

Frank

> On Tue, Apr 17, 2012 at 5:13 PM, Frank Goenninger <frgo <at> me.com> wrote:
> ... Output of the short demo below:
> 
> (m-test)
> 
> M1: New value for slot a => 1.
> M1: New value for slot b => 1.
> M2: New value for slot c => 1.
> 
> STEP 1
> 
> M1: New value for slot a => 2.
> M2: New value for slot c => 2.
> 
> STEP 2
> 
> M1: New value for slot b => 3.
> M2: New value for slot c => 6.
> 
> ... cute, ha ?
> 
> ;-)))
> 
> Frank
> 
> Am 17.04.2012 um 23:08 schrieb Frank Goenninger:
> 
> > Hi Mirko,
> >
> > Am 17.04.2012 um 20:17 schrieb Mirko Vukovic:
> >
> >> Hello,
> >>
> >> I am doing very basic cell-stuff, much like the ones in the doc folder:  Not liking excel and its cousins, I
am implementing spread-sheet like calculations in cells.
> >>
> >> My question:
> >>
> >> 1) Can I build two models (model1, model2) and specify that a slot in model2 depends on changes in some
other slot in model1?
> >
> > Sure:
> >
> > (in-package #:cells)
> >
> > ;;; ------------------
> > ;;; ***  Model M1  ***
> > ;;; ------------------
> >
> > (defmd m1 ()
> >  a
> >  b
> >  :a (c-in 1)
> >  :b (c-in 1))
> >
> > (defobserver a ((self m1))
> >  (when new-value
> >    (format *debug-io* "~%~S: New value for slot a => ~S."
> >      self (a self))))
> >
> > (defobserver b ((self m1))
> >  (when new-value
> >    (format *debug-io* "~%~S: New value for slot b => ~S."
> >      self (b self))))
> >
> > (defmacro mk-m1 (id)
> >  `(make-instance 'm1
> >     :fm-parent *parent*
> >     :md-name ,id))
> >
> > ;;; ------------------
> > ;;; ***  Model M2  ***
> > ;;; ------------------
> >
> > (defmd m2 ()
> >  (c (c? (let ((m1 (fm^ :m1)))   ;; -> fm^ searches for :m1 in the current family
> >           (* (a m1) (b m1))))))
> >
> > (defmacro mk-m2 (id)
> >  `(make-instance 'm2
> >     :fm-parent *parent*
> >     :md-name ,id))
> >
> > (defobserver c ((self m2))
> >  (when new-value
> >    (format *debug-io* "~%~S: New value for slot c => ~S."
> >      self (c self))))
> >
> > ;;; ------------------
> > ;;; ***  Family M  ***
> > ;;; ------------------
> >
> > (defmd m (family)
> >  (kids (c? (the-kids
> >             (mk-m1 :m1)
> >             (mk-m2 :m2)))) ;; :m1 and :m2 are kids of :m's family.
> >  :md-name :m)
> >
> > ;;; -----------------
> > ;;; ***  TESTING  ***
> > ;;; -----------------
> >
> > (defun m-test ()
> >
> >  (let* ((self (make-instance 'm))
> >         (m1 (fm-find-kid self :m1)))
> >
> >    ;; Step 1
> >    (format *debug-io* "~%~%STEP 1~&")
> >    (setf (a m1) 2)
> >    ;; => C = 2
> >    ;; See observer for C !
> >
> >    ;; Step 2
> >    (format *debug-io* "~%~%STEP 2 ~&")
> >    (setf (b m1) 3))
> >    ;; => C = 6
> >    ;; See observer for C !
> >
> >  (values))
> >
> >
> >> 2) Related: can I change a slot specification in a model.  For example from `c-in' to `c?'.  I assume that I
can, but I would have to re-initialize the model somehow.  Correct?
> >
> > This one I'd like to leave for Kenny to answer ... Never did that during one run - I always reset cells via
#'cells-reset and the started over when I needed to do that.
> >
> >> I am also very interested in the question posted just a few minutes ago.  I would like to build an automated
way of generating a GUI front end my cell models.
> >
> > I tried to answer this in the other mail.
> >
> >>
> >> Thanks,
> >>
> >> Mirko
> >
> > Hope that helps.
> >
> > Cheers
> >    Frank
> >
> 
> 

Peter Hildebrandt | 18 Apr 2012 00:57
Picon

Re: can one make dependencies between models?

> I am also very interested in the question posted just a few minutes ago.  I
> would like to build an automated way of generating a GUI front end my cell
> models.

I used cells-gtk3 for exactly this purpose, i.e. linking the
position/text/color of graphic elements to the state of cells models.

Depending on your objectives, some of the more complex widgets might
be very helpful:
- a treeview that reflects a hierarchical object structure (supporting
drag and drop if I recall correctly)
- a listview (grid) that shows slots of models in a list (can even be editable)
- a canvas (based on cairo) that can be populated by visual primitives
(boxes, circles, lines, text fields) that mirror cells models (e.g.
start point of a line can be linked to the position of a box, and if
the user drags/drops the box, the line follows like a connector)

Let me know if you have further questions.  I wrote a fairly complex
application using cells/cells-gtk (including a simple physics
simulator using cells-ode and opengl), and I'm happy to dig up sample
code if needed.

Peter

>
> Thanks,
>
> Mirko
>
> _______________________________________________
> cells-devel site list
> cells-devel <at> common-lisp.net
> http://common-lisp.net/mailman/listinfo/cells-devel

_______________________________________________
cells-devel site list
cells-devel <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/cells-devel
Mirko Vukovic | 18 Apr 2012 05:32
Picon

Re: can one make dependencies between models?

Thanks Peter.

That activity is still in the future.  But from my own historical perspective, the very reason I switched to lisp several years ago was the desire for such self-GUI-fying models.  I had a blast lisping, but never got to this original goal :-)

On Tue, Apr 17, 2012 at 6:57 PM, Peter Hildebrandt <peter.hildebrandt <at> gmail.com> wrote:
> I am also very interested in the question posted just a few minutes ago.  I
> would like to build an automated way of generating a GUI front end my cell
> models.

I used cells-gtk3 for exactly this purpose, i.e. linking the
position/text/color of graphic elements to the state of cells models.

Depending on your objectives, some of the more complex widgets might
be very helpful:
- a treeview that reflects a hierarchical object structure (supporting
drag and drop if I recall correctly)
- a listview (grid) that shows slots of models in a list (can even be editable)
- a canvas (based on cairo) that can be populated by visual primitives
(boxes, circles, lines, text fields) that mirror cells models (e.g.
start point of a line can be linked to the position of a box, and if
the user drags/drops the box, the line follows like a connector)

Let me know if you have further questions.  I wrote a fairly complex
application using cells/cells-gtk (including a simple physics
simulator using cells-ode and opengl), and I'm happy to dig up sample
code if needed.

Peter


>
> Thanks,
>
> Mirko
>
> _______________________________________________
> cells-devel site list
> cells-devel <at> common-lisp.net
> http://common-lisp.net/mailman/listinfo/cells-devel

<div>
<p>Thanks Peter.<br><br>That activity is still in the future.&nbsp; But from my own historical perspective, the very reason I switched to lisp several years ago was the desire for such self-GUI-fying models.&nbsp; I had a blast lisping, but never got to this original goal :-)<br><br></p>
<div class="gmail_quote">On Tue, Apr 17, 2012 at 6:57 PM, Peter Hildebrandt <span dir="ltr">&lt;<a href="mailto:peter.hildebrandt <at> gmail.com">peter.hildebrandt <at> gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div class="im">&gt; I am also very interested in the question posted just a few minutes ago.&nbsp; I<br>
&gt; would like to build an automated way of generating a GUI front end my cell<br>
&gt; models.<br><br>
</div>I used cells-gtk3 for exactly this purpose, i.e. linking the<br>
position/text/color of graphic elements to the state of cells models.<br><br>
Depending on your objectives, some of the more complex widgets might<br>
be very helpful:<br>
- a treeview that reflects a hierarchical object structure (supporting<br>
drag and drop if I recall correctly)<br>
- a listview (grid) that shows slots of models in a list (can even be editable)<br>
- a canvas (based on cairo) that can be populated by visual primitives<br>
(boxes, circles, lines, text fields) that mirror cells models (e.g.<br>
start point of a line can be linked to the position of a box, and if<br>
the user drags/drops the box, the line follows like a connector)<br><br>
Let me know if you have further questions. &nbsp;I wrote a fairly complex<br>
application using cells/cells-gtk (including a simple physics<br>
simulator using cells-ode and opengl), and I'm happy to dig up sample<br>
code if needed.<br><br>
Peter<br><br><br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Mirko<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; cells-devel site list<br>
&gt; <a href="mailto:cells-devel <at> common-lisp.net">cells-devel <at> common-lisp.net</a><br>
&gt; <a href="http://common-lisp.net/mailman/listinfo/cells-devel" target="_blank">http://common-lisp.net/mailman/listinfo/cells-devel</a><br>
</blockquote>
</div>
<br>
</div>

Gmane