Slava,
Let's start with an X window on the stack:
( scratchpad ) root children first
----------
T{ window f ~dpy~ 2097166 }
( scratchpad )
Now let's make a window manager child object and set it's delegate:
( scratchpad ) <child>
----------
T{ window f ~dpy~ 2097166 }
T{ child f }
( scratchpad ) swap
----------
T{ child f }
T{ window f ~dpy~ 2097166 }
( scratchpad ) set-delegate
----------
T{ child ~window~ }
( scratchpad )
(I'm using a set-delegate with the alternate effect there)
So, I have a 'move' generic word:
GENERIC# move 1 ( object position -- object )
with a method defined for windows:
M: window move ( window pos -- window )
>r dup raw r> first2 XMoveWindow drop ;
Notice what happens when I call move on the child:
( scratchpad ) { 5 5 }
----------
T{ child ~window~ }
{ 5 5 }
( scratchpad ) move
----------
T{ window f ~dpy~ 2097166 }
( scratchpad )
Of course, if I manually execute the body of the method, it's OK:
( scratchpad ) { 5 5 }
----------
T{ child ~window~ }
{ 5 5 }
( scratchpad ) >r dup raw r> first2 XMoveWindow drop
----------
T{ child ~window~ }
( scratchpad )
I've tested 3 different GENERIC# words and they all behave this way.
Ed
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk