[Cuis-dev] Why this method extract does not work?

Hernán Wilkinson hernan.wilkinson at 10pines.com
Sat Nov 22 06:30:31 PST 2025


Hi Hilaire,
 the extract method has some limitations. Joel will start working on some
of them as part of his thesis :-)
 One of those limitations is when you have an assignment to a variable and
the variable definition is not part of the code you selected to extract.
 In the example you sent, you have vars a and b that are assigned in the
code you want to extract but their definitions are not in the selection.
 (there is another problem in your example and that is that you selected
part of a cascade message, that is also not supported)
 So, to make it work is to put that code inside a block like this:
 ....
 [ | a b |
 a := molecule speed ...
 b := molecule speed ...
 molecule speed: a*director - ... ] value.
 molecule position: ...

 Doing so you have the definition of a and b in the same scope as the
assignment.
 Verify if the change works (it should :-) )
 Once you are sure it is working, select what is inside the block and do an
extract method of that.
 It should end being something like this:

 [ self doSomething... ] value.
 molecule position: ....

 Once you have that, you can remove the block:
 ...
 self doSomething.
 molecule position:...

 Anyway, sorry about that limitation ... we are working to make it work :-)

Cheers!
Hernan.



On Sat, Nov 22, 2025 at 6:13 AM Hilaire Fernandes via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi,
>
> -- http://mamot.fr/@drgeo
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251122/5e59db11/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5hKmH9KMugDooTGV.png
Type: image/png
Size: 74340 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251122/5e59db11/attachment-0001.png>


More information about the Cuis-dev mailing list