IDE Delphi XE3 Errors in structure - delphi-xe3

I'm migrating a project from Delphi 7 to Delphi XE3. It works correctly, however in the structure panel, it shows a list of errors:
TStringField does not contain a member named AsString
TClientDataSet does not contain a member named CreateDataSet
TList does not contain a member named Add
TToolBar does not contain a member named SetFocus
Undeclared identifier Refresh
Undeclared identifier Handle
TClientDataSet does not contain a member named Post
TPanel does not contain a member named Visible
string does not contain a member named length
string does not contain a member named IndexOf

Related

New Show instance for existing type

I have wrapper type for NonEmptyList of my custom type Cell:
instance Show Cell where
show = ...
type CellsRow = NonEmptyList Cell
I trying to create Show instance for Cells as well with:
instance Show CellsRow where
show = foldMap show
But it raises Orphan instance found for .... I can resolve it by making CellsRow newtype, but can I use both Show instance and simple type CellsRow = NonEmptyList Cell?
No, you cannot declare multiple instances for the same type. This is on purpose, otherwise there would be ambiguity in instance resolution.
The error refers to a subset of this - what is called "orphan" instances. These are such instances that neither the class definition nor the type definition are in the same module. In PureScript you can only declare instances either in the same module as the type or in the same module as the class.

Flutter "argument type not assignable" Error with two identical types

Flutter shows me this error, but the two types are identical.
[CartItem it's just a simple model; there was a conflict since another widget had the same name but I resolved it using "as" in the import statement]
The argument type List<CartItems> (where CartItem is defined in /Users/marco/Documenti Locali/shop_app/lib/providers/cart.dart)' can't be assigned to the parameter type List<CartItems> (where CartItem is defined in /Users/marco/Documenti Locali/shop_app/lib/providers/cart.dart)'.dartargument_type_not_assignable
list.dart(56, 16): List is defined in /Users/marco/flutter/bin/cache/pkg/sky_engine/lib/core/list.dart
cart.dart(3, 7): CartItem is defined in /Users/marco/Documenti Locali/shop_app/lib/providers/cart.dart
list.dart(56, 16): List is defined in /Users/marco/flutter/bin/cache/pkg/sky_engine/lib/core/list.dart
cart.dart(3, 7): CartItem is defined in /Users/marco/Documenti Locali/shop_app/lib/providers/cart.dart
Peek Problem (⌥F8)
No quick fixes available
It was a double slash in the import statement that generated this strange error.
you should use the library prefix in the usage too so if your namespace is
import 'package:app/xxxx/shop_app/lib/providers/cart.dart as shop_cart;
you should specify it in the generic List as well such as;
List shopCarts = etc...;
Check your import statement at the top of file even if you mistyped a directory folder name as 'Caps or Small' you can get this error.

"Extraneous Property" and "Parser Mismatched Metadata" errors in the Facebook debug validator

I am working on refactoring of one older page and I have problem with Facebook debug validator.
Extraneous Property
Objects of this type do not allow properties named 'twitter:card'.
Extraneous Property
Objects of this type do not allow properties named 'twitter:title'.
Extraneous Property
Objects of this type do not allow properties named 'twitter:description'.
Parser Mismatched Metadata
The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input properties that were not seen in the parsed result: 'twitter:card, twitter:title, twitter:description'
Should these tags has any importance? Or how I can repair it?

Unable to resolve error "target of assigner call has no associated assigner command" in Eiffel

In Eiffel Studio, I have been trying to access the fields of an object of a class I have defined from another class. However, it keeps giving errors that I am not able to understand and solve. The following is a snippet of example code:
Class where object is being created:
class
TEST1
feature
object: TEST2
-- object of type TEST2
function(val: INTEGER)
-- Assign
do
object.value:=val
end
end
Class whose object is being created:
class
TEST2
feature
value: INTEGER
end
The error messages are as follows:
Error code: VBAC(2)
Error: target of assigner call has no associated assigner command.
What to do: add an assigner mark to the declaration of the target feature or use a dot form of a call.
Class: TEST1
Feature: function
Line: 10
do
-> object.value:=val
end
and
Error code: VEVI
Error: variable is not properly set.
What to do: ensure the variable is properly set by the correspondig setter instruction.
Class: TEST1
Source class: ANY
Feature: default_create
Attribute(s): object
Line: 331
do
-> end
It seems that there is some problem with the assignment statement. However, I haven't been able to understand what is wrong.
The classes have been defined in different files under the same cluster of the same project. I am new to Eiffel, so I don't know if this could be the problem.
Thank you.
In Eiffel, every attributes are considerate as Read-Only. This remove the need to create getters like you do in other languages like Java. To assign a value to an attribute using the ":=" syntaxe, you will need an assigner. Here an example:
class
TEST2
feature
value:INTEGER assign set_value
set_value(a_value:INTEGER)
do
value := a_value
end
end
Then, you will be able to use the line:
object.value:=val
For the second error, by default, EiffelStudio is what we call Void Safe. This is a mecanism that ensure that an attribute that is not considerated as "detachable" will never be Void (similar to NULL in other languages). By default, every class have the default constructor called "default_create" and this constructor does not do anything. What you have to do, is creating you own constructor in the {TEST1} class that instanciate every attribute inside it. Here is an example:
class
TEST1
create
make
feature
make
do
create object
end
object: TEST2
-- object of type TEST2
function(val: INTEGER)
-- Assign
do
object.value:=val
end
end
In the preceding example, I created a method call make, specify that the method is the constructor and in this method, I make sure that the object attribute is correctly instanciate.

Type of A field is its Class Name. What is this called in C#?

I new to C#, Sometime I see C# code like this
public class ClassName
{
ClassName field;
}
It mean the field type the same as Class name. WHat this mean and called in C# ?
It is a reference to an instance of the type itself. E.g. An element in a linked list could reference the next element or if the type was a WebPage, it could have a reference to another WebPage.