Forum > IDE/CodeTools

Change default type for code completion

<< < (2/2)

Okoba:
It seems you did not understand my question.
I know how to define a new type. I want to change CodeTools to complete the code with my custom type not the default 'string'.

Thaddy:
If codetools is well written it should do that automatically.

Note I never used codetools (consciously)

winni:
Hi!

Yes a little bit of doc for the CodeTools is necessary.

In my case if you try "automagic" to define a float it is allways extended.
I never uses extended and for 64 Bit it is not defined - it is just a double.

I want to set my CodeTool definition for a float to a single or a double.

Until now: No answers. Nowhere.

Winni

PascalDragon:

--- Quote from: Thaddy on April 20, 2020, 07:31:38 pm ---If codetools is well written it should do that automatically.

Note I never used codetools (consciously)

--- End quote ---

This has nothing to do with well written. If the codetools see the following:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---a := 'whatever';
What do you think should it use as type for a? It does not know about any custom types. What to do if there are multiple type aliases? No, it will use the safest one, which is - if the string contains no characters that require WideChar - a String (otherwise a UnicodeString). This is correct in both $H+ and $H-.

Navigation

[0] Message Index

[*] Previous page

Go to full version