[Cuis-dev] Code completion

Hernán Wilkinson hernan.wilkinson at 10pines.com
Wed Dec 28 16:48:53 PST 2022


>
>
> 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.
>
The problem is in the SHParserST80 that does not parse the code, with and
without the line, the same way, I do not know why.
If you look at allRanges after executing in #computeEntries the following
line:

allRanges := self parse: source in: contextClass and: specificModel.

you will see different results, that is why.

>
>
>> 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?
>
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.
>
ah ok.


>  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?
>
right, when not declaring a variable, the workspace declares it
automatically and keeps its value.
You can disable that in the workspace unselecting the option "automatically
create variable declaration"
[image: image.png]


> Thanks
> --
>
> GNU Dr. Geohttp://drgeo.euhttp://blog.drgeo.eu
>
> --
> 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/20221228/7819a69e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 105913 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221228/7819a69e/attachment-0001.png>


More information about the Cuis-dev mailing list