SciDe icon indicating copy to clipboard operation
SciDe copied to clipboard

Delphi XE7

Open shamrock-pl opened this issue 9 years ago • 19 comments

Hello, da-baranov! A bug with the installation of Delphi HE7 still not fixed? When installing get the error [dcc32 Error] Sciter.pas (2137): E2010 Incompatible types: 'PUINT' and 'Cardinal' in line "OleCheck (pLang.ConvertStringFromUnicode (pdwMode, enc, PWideChar (sHtml), pcSrcSize, nil, pcDstSize) ); "! How to install your component?

shamrock-pl avatar Jan 23 '16 12:01 shamrock-pl

Works on Delphi 10 32- and 64-bit with Sciter 3.3.1.7: https://github.com/Mikanoshi/SciDe

Mikanoshi avatar Feb 26 '16 00:02 Mikanoshi

Nope, it doesn't

[dcc32 Warning] SciterApi.pas(1133): W1000 Symbol 'StrNew' is deprecated: 'Moved to the AnsiStrings unit'
[dcc32 Hint] SciterApi.pas(1410): H2077 Value assigned to 'S2V' never used
[dcc32 Warning] SciterNative.pas(335): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Warning] SciterNative.pas(364): W1000 Symbol 'StrDispose' is deprecated: 'Moved to the AnsiStrings unit'
[dcc32 Warning] SciterNative.pas(377): W1000 Symbol 'StrDispose' is deprecated: 'Moved to the AnsiStrings unit'
[dcc32 Warning] SciterNative.pas(386): W1000 Symbol 'StrDispose' is deprecated: 'Moved to the AnsiStrings unit'
[dcc32 Warning] SciterNative.pas(415): W1000 Symbol 'StrNew' is deprecated: 'Moved to the AnsiStrings unit'
[dcc32 Warning] SciterNative.pas(428): W1000 Symbol 'StrNew' is deprecated: 'Moved to the AnsiStrings unit'
[dcc32 Warning] SciterNative.pas(452): W1000 Symbol 'StrNew' is deprecated: 'Moved to the AnsiStrings unit'
[dcc32 Warning] SciterNative.pas(642): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Warning] SciterNative.pas(660): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Warning] SciterNative.pas(686): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Warning] SciterNative.pas(693): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Warning] SciterNative.pas(712): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Warning] SciterNative.pas(725): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Warning] SciterNative.pas(741): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Warning] SciterNative.pas(801): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Warning] SciterOle.pas(107): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Warning] SciterOle.pas(485): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Warning] SciterOle.pas(509): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Warning] SciterOle.pas(537): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Warning] SciterOle.pas(635): W1057 Implicit string cast from 'AnsiString' to 'WideString'
[dcc32 Hint] Sciter.pas(1390): H2164 Variable 'pbHandled' is declared but never used in 'TSciter.CreateWnd'
[dcc32 Warning] Sciter.pas(2067): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Error] Sciter.pas(2134): E2010 Incompatible types: 'PUINT' and 'Cardinal'
[dcc32 Error] Sciter.pas(2137): E2010 Incompatible types: 'PUINT' and 'Cardinal'
[dcc32 Fatal Error] SciDe.dpk(35): F2063 Could not compile used unit 'Sciter.pas'

aolko avatar Jun 14 '16 12:06 aolko

Yes, it does. 3.3.2.6 + Delphi 10 32/64-bit. And I just commited some changes.

Mikanoshi avatar Jun 14 '16 12:06 Mikanoshi

hmm oh, what's this then?

[dcc32 Hint] Sciter.pas(1390): H2164 Variable 'pbHandled' is declared but never used in 'TSciter.CreateWnd'
[dcc32 Warning] Sciter.pas(2069): W1058 Implicit string cast with potential data loss from 'WideString' to 'AnsiString'
[dcc32 Error] Sciter.pas(2136): E2010 Incompatible types: 'PUINT' and 'Cardinal'
[dcc32 Error] Sciter.pas(2139): E2010 Incompatible types: 'PUINT' and 'Cardinal'
[dcc32 Fatal Error] SciDe.dpk(35): F2063 Could not compile used unit 'Sciter.pas'

Delphi 10.1 btw

aolko avatar Jun 14 '16 12:06 aolko

It's magic :)

1

Mikanoshi avatar Jun 14 '16 12:06 Mikanoshi

yeah right

aolko avatar Jun 14 '16 12:06 aolko

So what? It's working fine for me. ActiveX.SYSUINT must be OS specific or something. I'm on 10 64-bit.

Mikanoshi avatar Jun 14 '16 13:06 Mikanoshi

same here, win10 x64, faulty lines are

    OleCheck(pLang.ConvertStringFromUnicode(pdwMode, enc, PWideChar(sHtml), pcSrcSize, nil, pcDstSize));
    OleCheck(pLang.ConvertStringFromUnicode(pdwMode, enc, PWideChar(sHtml), pcSrcSize, pRet, pcDstSize));

aolko avatar Jun 14 '16 13:06 aolko

Obviously) Must be because of pcSrcSize and pcDstSize an their ActiveX.SYSUINT type. Try changing it to something else, e.g. to LongWord, to make sure it's them.

Mikanoshi avatar Jun 14 '16 13:06 Mikanoshi

pcSrcSize: LongWord;
pcDstSize: LongWord;
[dcc32 Error] Sciter.pas(2136): E2010 Incompatible types: 'PUINT' and 'Cardinal'
[dcc32 Error] Sciter.pas(2139): E2010 Incompatible types: 'PUINT' and 'Cardinal'

aolko avatar Jun 14 '16 15:06 aolko

IMultiLanguage interface: https://msdn.microsoft.com/en-us/library/aa741009(v=vs.85).aspx

pSrcStr and pDstStr should be pointers to UINT, Windows.PUINT = ^Cardinal

Mikanoshi avatar Jun 14 '16 15:06 Mikanoshi

i think no matter what is the type it continues to throw these errors

aolko avatar Jun 14 '16 16:06 aolko

D10.1 Berlin -> same error XE5 and Seattle -> OK

synnefo avatar Jul 18 '16 07:07 synnefo

told you

aolko avatar Jul 18 '16 07:07 aolko

You're so helpless))) I'll have to update to 10.1 to fix this I guess.

Edit: Well, you are out of luck, my version of SciDe compiles perfectly on 10.1

P.S. And how to disable floating form designer completely in 10.1? I want a standalone form! Bummer.

Mikanoshi avatar Jul 18 '16 07:07 Mikanoshi

Error appears only if compiling SciDe package (I just use SciDe source files in my project, that's why I didn't have it). Here's a fix, I removed local MLang, Delphi has it's own bindings in Winapi.MLang: https://github.com/Mikanoshi/SciDe/commit/fd7c98b4c4004923cd44c1137e97a69bdd3108fb#diff-7d2a15a69b3c0d5662c830b86de88295R937

Mikanoshi avatar Jul 19 '16 19:07 Mikanoshi

I changed pcSrcSize TO Puint(pcSrcSize) ,error disapeared.

But who can tell me , it is the proper way to fix this bug?

waleson avatar Aug 30 '17 08:08 waleson

  1. Change MLang to WinAPI.MLang in the uses
  2. In the procedure TSciter.SaveToFile change:
    • type of pcSrcSize and pcDstSize from ActiveX.SYSUINT to SYSUINT
    • erroneous lines correct as follows: OleCheck(pLang.ConvertStringFromUnicode(pdwMode, enc, PWideChar(sHtml), @pcSrcSize, nil, pcDstSize));
  3. I also had to correct PChar cast to PAnsiChar in the SciDeDemo unit 👌

murrto avatar Mar 25 '20 16:03 murrto

All of that was done years ago :) https://github.com/Mikanoshi/SciDe/blob/master/source/Sciter.pas

Mikanoshi avatar Mar 25 '20 16:03 Mikanoshi