da-baranov / SciDe

Sciter component for Delphi
76 stars 26 forks source link

Delphi XE7 #9

Open shamrock-pl opened 8 years ago

shamrock-pl commented 8 years ago

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?

Mikanoshi commented 8 years ago

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

aolko commented 8 years ago

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'
Mikanoshi commented 8 years ago

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

aolko commented 8 years ago

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

Mikanoshi commented 8 years ago

It's magic :)

1

aolko commented 8 years ago

yeah right

Mikanoshi commented 8 years ago

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

aolko commented 8 years ago

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));
Mikanoshi commented 8 years ago

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.

aolko commented 8 years ago
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'
Mikanoshi commented 8 years ago

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

aolko commented 8 years ago

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

synnefo commented 8 years ago

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

aolko commented 8 years ago

told you

Mikanoshi commented 8 years ago

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 commented 8 years ago

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

waleson commented 7 years ago

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

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

murrto commented 4 years ago
  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 👌
Mikanoshi commented 4 years ago

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