[Cuis-dev] Code completion

Hilaire Fernandes hfern at free.fr
Wed Dec 28 12:39:25 PST 2022


Le 28/12/2022 à 21:08, Hernán Wilkinson via Cuis-dev a écrit :
> I do not understand why I do not get the same result:
> image.png

Strangely removing the empty line give the expected completion 
(segment:to:) because with the spanish locale the completion is done on 
the moth class DrGeoSketch (DrGeoFigure for French)

That's odd.


>     From my eyes, so far I have the same behavior in the
>     DrGSmalltalkSketchEditor and the Workspace.
>
> It is not exactly the same. If the snapshot you sent the selectors it 
> shows for the variable t are the ones of DrGeoSketch, in the workspace 
> it would show you the selectors of SmallInteger

But it is when you have undeclared variable, whose state is preserved 
after execution of the code, right?

With DrGeo Smalltalk sketch, the code comes with all variables declared, 
the resulting sketch is not mean to modified afterward with code. But it 
could change may be.

>>      To make DrGSmalltalkSketchEditor you should implement the
>>     message #is: like this:
>>     is: aSymbol
>>     aSymbol == #providesBindings or: [ super is: aSymbol ]
>>
>>      And then implement the messages it is expecting for an object
>>     that provides bindings like #hasBindingOf:, etc.
>>      I would make the model of DrGSmalltalkSketchEditor to be an
>>     instance of Workspace, that way the code completion will behave
>>     as in the workspace that is what you are trying to accomplish.
>
>     I don't understand what is a binding, not sure it is needed either.
>
> A binding is like a relationship, it relates the name of a variable 
> with its value...

Is it when you are not declaring the variables in the Workspace?

Thanks

-- 

GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221228/ac838ea8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 87982 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221228/ac838ea8/attachment-0001.png>


More information about the Cuis-dev mailing list