The error message like this - "Error creating form: Failed to set data for..." appears on IDE CodeGear Delphi 2007 startup.
This situation occurs due to lack of access rights.
A simple and obvious half-measure is to run IDE CodeGear Delphi 2007 with administrator rights.
For example - check "Run this program as an administrator" in the "Compatibility" tab in Properties menu.
Monkeypatch to remove "UserWarning: pkg_resources is deprecated as an API" in Python
Anyone who meets similar only annoying "UserWarning: pkg_resources is deprecated as an API",
can solve it using the next commands in Windows Command Prompt or Windows Powershell:
can solve it using the next commands in Windows Command Prompt or Windows Powershell:
uninstall setuptools
pip uninstall setuptools
reinstall the version which don't have these deprecated warnings.
pip install setuptools==66.1.1
or
pip install setuptools==69.0.2
Delphi gives when starting "Socket error # 10038 Socket operation on non-socket"
"Socket error # 10038 Socket operation on non-socket" is a wide-spread error.
Next messages are "Access violation at address 205B90EA in module 'coreide270.bpl'. Read of address 00000000,", "Access violation at address 5005F8F4 in module 'rt1270.bpl. Read of address 00000000."
This erroneous behavior was noticed in Delphi RAD Studio 10.4 (10.4.1, 10.4.2).
Confirmed to work in Delphi 11.0 as well, with the obvious adjusts for version:
One can try these steps to fix Delphi 10.4:
If one get these errors when starting up Delphi RAD Studio, one will have to do these operations every time one reinstall, add "Additional Options", etc.
Next messages are "Access violation at address 205B90EA in module 'coreide270.bpl'. Read of address 00000000,", "Access violation at address 5005F8F4 in module 'rt1270.bpl. Read of address 00000000."
This erroneous behavior was noticed in Delphi RAD Studio 10.4 (10.4.1, 10.4.2).
Confirmed to work in Delphi 11.0 as well, with the obvious adjusts for version:
One can try these steps to fix Delphi 10.4:
- Shut the Delphi IDE down.
- Run Regedit.
- Go to the branch
HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\21.0\KnownIDE Packages - Find the value with name
$(BDS)\Bin\LivePreview270.bpland change the data from"Embarcadero FireUI Live Preview Package"to"_Embarcadero FireUI Live Preview Package"just adding one or two underscores in the beginning. Other symbols, for instance, I tried to put "#" will not fit, the erroneous behavior will not be fixed. - Restart the Delphi IDE.
HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0\Known IDE Packages and
value name $(BDS)\Bin\LivePreview280.bpl, value data to change is Embarcadero FireUI Live Preview Package
If one get these errors when starting up Delphi RAD Studio, one will have to do these operations every time one reinstall, add "Additional Options", etc.
PostMessage vs. SendMessage
What is the difference between PostMessage and SendMessage?
PostMessage is asynchronous, sends a message in the message queue associated with the thread and returns without waiting for the thread to process that messaage.SendMessage is synchronous, calls the window procedure for the specified window and does not return until the window procedure has processed the message.
For loop using an enumeration Example from Learning Embarcadero Delphi
Educational Example is from "Learning Embarcadero Delphi" - Free unaffiliated eBook created from Stack Overflow contributors.
The example is on RIP Tutorial - For loop using an enumeration
The code example will not be compiled in Embarcadero Delphi, gives out two error messages, one of them is:
"[dcc32 Error] EnumLoop.dpr(14): E2430 for-in statement cannot operate on collection type 'TWeekdays'"
The error explanation from docwiki Embarcadero
The example was tested in CodeGear Delphi 2007, Embarcadero Delphi 10.4.2 Sydney, Embarcadero Delphi 11.3 Alexandria
The example is on RIP Tutorial - For loop using an enumeration
The code example will not be compiled in Embarcadero Delphi, gives out two error messages, one of them is:
"[dcc32 Error] EnumLoop.dpr(14): E2430 for-in statement cannot operate on collection type 'TWeekdays'"
program EnumLoop;
uses
TypInfo;
type
TWeekdays = (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday);
var
wd : TWeekdays;
begin
for wd in TWeekdays do
WriteLn(GetEnumName(TypeInfo(TWeekdays), Ord(wd)));
end.
The error explanation from docwiki Embarcadero
E2430 for-in statement cannot operate on collection type '%s' (Delphi) Go Up to Error and Warning Messages (Delphi) A for-in statement can only operate on the following collection types: Primitive types that the compiler recognizes, such as arrays, sets or strings Types that implement IEnumerable Types that implement the GetEnumerator pattern as documented in the Delphi Language Guide Ensure that the specified type meets these requirements.To make the example to work, replace with this line:
for wd := Low(TWeekdays) to High(TWeekdays) do
The example was tested in CodeGear Delphi 2007, Embarcadero Delphi 10.4.2 Sydney, Embarcadero Delphi 11.3 Alexandria
Subscribe to:
Posts (Atom)





