[Cuis-dev] Code completion

Hilaire Fernandes hfern at free.fr
Wed Dec 28 11:29:22 PST 2022


Hi Hernán,

Le 28/12/2022 à 14:33, Hernán Wilkinson a écrit :
>  I tried this example in a DrGeo image and it works as I mentioned, 
> but I see why the code completion is not working as you expected.
>  The class DrGSmalltalkSketchEditor does not behave as a workspace, 
> therefore when parsing the code, it is expecting the method name 
> pattern that it does not have. If you put a halt in the method 
> #computeMessageEntriesIn:ofTempVarNamed: of that class, you will see 
> that it never halts.

Observe that this method is executed when completion is done over a 
variable. The completion is narrowed to the class I want.

completion on variable

 From my eyes, so far I have the same behavior in the 
DrGSmalltalkSketchEditor and the Workspace.

>  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.

Thanks

Hilaire

-- 
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/7bda14a2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture d??cran de 2022-12-28 20-05-50.png
Type: image/png
Size: 14945 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221228/7bda14a2/attachment.png>


More information about the Cuis-dev mailing list