fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Property or indexer '__Usual.Value' cannot be assigned to -- it is read only

Property or indexer '__Usual.Value' cannot be assigned to -- it is read only 2 years 7 months ago #595

  ArneOrtlinghaus's Avatar Topic Author ArneOrtlinghaus Offline Posts: 126
The following statement with an untyped variable gives the error above
function ControlSetNullValue (oControl , oDB )
..
oControl:Value := false

It seems that the access Value has a special meaning for usuals. Unfortunately it gives conflicts with the control class of the GUI classes.

Please Log in or Create an account to join the conversation.

Property or indexer '__Usual.Value' cannot be assigned to -- it is read only 2 years 7 months ago #599

  Chris's Avatar Chris Offline Posts: 1163
Hi Arne,

That was fixed about a week ago :-)

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Property or indexer '__Usual.Value' cannot be assigned to -- it is read only 2 years 7 months ago #606

  robert's Avatar robert Away Posts: 994
Arne,
The problem here was that the Usual structure also has a (read only) Value property.
This property returns the contents of the Usual (as an object).

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Property or indexer '__Usual.Value' cannot be assigned to -- it is read only 2 years 7 months ago #608

  Frank Maraite's Avatar Frank Maraite Offline Posts: 173
The fastest fix is
function ControlSetNullValue (guiControl AS Control , db AS ??? ) AS VOID

guiControl:Value := false

I would do this immediatly after reporting the bug, you know.

Please Log in or Create an account to join the conversation.

Property or indexer '__Usual.Value' cannot be assigned to -- it is read only 2 years 7 months ago #609

  ArneOrtlinghaus's Avatar Topic Author ArneOrtlinghaus Offline Posts: 126
Hi Frank,
thank you for the idea.
Unfortunately there are many untyped functions existing and I cannot change them in a simple way. Often the functions are called with different parameters and with different number of parameters, and this not hardcoded to be able to find compiling, but also in macros at customer sites.

Please Log in or Create an account to join the conversation.

Property or indexer '__Usual.Value' cannot be assigned to -- it is read only 2 years 7 months ago #611

  Frank Maraite's Avatar Frank Maraite Offline Posts: 173
just start doing it whenever you stumble over an issue like this. And of course whenever you see an untyped function/method. Even the longest way starts with the first step.
Permanent refactoring things like this takes an important amount of time in my work since the early 90ies.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1