alexshendi has quit [Read error: Connection reset by peer]
dtornabene has quit [Remote host closed the connection]
rick42 has quit [Ping timeout: 256 seconds]
karswell_ has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
mtsd has joined #picolisp
aw- has joined #picolisp
dtornabene has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
dtornabene has quit [Remote host closed the connection]
orivej has joined #picolisp
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer>
Oops, wrong key
<sriram_>
Hi Regenaxer, I did not get a chance to clarify this yesterday (forgive my asking again, but I still do not understand)
<sriram_>
In constructor for undo button in lib/form.l
<sriram_>
I mentioned that I saw this (=: home undo This)
<Regenaxer>
Hi sriram_!
<sriram_>
now (:= ...) is the same as (put This ....)
<sriram_>
is it not?
<Regenaxer>
ok, yes, saw this question. Sorry I forgot
<Regenaxer>
yes, (put This ...
<Regenaxer>
unquoted
<Regenaxer>
except the last arg
<sriram_>
the undo button is created in the form
<sriram_>
so the constructor is called right away
<Regenaxer>
right
<sriram_>
so then it seems like a circular ref to this : (put This home undo This)
<Regenaxer>
this button is stored in the form under the 'undo' property
<sriram_>
i mean to This
<Regenaxer>
no, just the form points to This
<sriram_>
oh the first This is the form
<sriram_>
and the second This is the button
<Regenaxer>
(: home undo) is the button then
<Regenaxer>
eg. the redo button does (set> (: home undo)
<sriram_>
yes that I was wondering about that as another question :)
<sriram_>
set> takes two args
<Regenaxer>
These two buttons send messages to each other
<Regenaxer>
yes
<sriram_>
(set> (:home undo) )
<sriram_>
would set the undo button to nil?
<sriram_>
NIL
<sriram_>
(dm set> (Val Dn) (=: todo Val) )
<Regenaxer>
yes, but this is not there, right?
<sriram_>
only todoButton has a set> method
<sriram_>
and if Val is not supplied, as in (set> (: home undo))
<sriram_>
then Val is set to NIL?
<Regenaxer>
yes, we have (set> (: home redo))
<Regenaxer>
yep
<Regenaxer>
omitted args are always NIL
<sriram_>
yes...I explained to myself that it worked that way...so that part is clear
<sriram_>
its just the (:= home undo This)
<Regenaxer>
no
<sriram_>
from what you say its like (put (: home undo) This)
<Regenaxer>
We must send the set> message here
<Regenaxer>
set> sets the contents of that component, the value
<Regenaxer>
(set> (: home undo) NIL) would be the equivalent
<sriram_>
yes ...(set> (:home redo) ) wil set the Val property of the redo button to NIL
<sriram_>
is it not?
<sriram_>
because the set> property of the parent todo button will be invoked
<Regenaxer>
(put (: home undo) This) is not meaningful
<Regenaxer>
(put (: home undo) 'foo This) would
<Regenaxer>
(put (: home undo) This) uses the object This as a property key
<sriram_>
ah so it is (put (: home) undo This)
<sriram_>
where : home refers to the form
<Regenaxer>
well, (put (: home) 'undo This)
<Regenaxer>
yes
<Regenaxer>
(put (: home) 'undo This) is the same as (=: home undo This)
<sriram_>
I think thats where I was getting confused
<Regenaxer>
:)
<sriram_>
The : is described as "Fetches a value any from the properties of a symbol, or from a list, by applying the get algorithm to This and the following arguments"
<sriram_>
so : apply get to This
<sriram_>
but somehow it thinks that This is the form and not the This later on (i.e the button)
<Regenaxer>
yes, (: home undo) is the same as (get This 'home 'und)
<Regenaxer>
(get This 'home 'undo)
<sriram_>
so we have (put (get This 'home) 'undo This)
<Regenaxer>
(=: home undo foo bar 7) is (put (get This 'home 'foo) 'bar 7)
<sriram_>
The home property of the button points to the form?\
<Regenaxer>
no, (put (get This 'home 'undo 'foo) 'bar 7)
<sriram_>
?
<Regenaxer>
*each* gui component has a 'home' property
<sriram_>
that points to the form
<sriram_>
ok so I understand it now
<Regenaxer>
yes
<sriram_>
by accessing the form and setting the 'undo property of the form to point back to the button
<sriram_>
another double link similar to before
<Regenaxer>
So (=: home undo foo bar 7) = (put (get This 'home 'undo 'foo) 'bar 7) = (put This 'home 'undo 'foo 'bar 7)
<sriram_>
your last example is interesting
mtsd has quit [Quit: Leaving]
<sriram_>
why does (:= home undo foo bar 7) not become (put (get This 'home 'undo 'foo 'bar) 7 )