Design time

have a compact framework application I am trying to convert from Delphi for .netCF
when going to the designer get this error

"Type of field self.components not found - are you missing an assembly reference?"
has any one any idea what causes it and how to overcome it ??

regards Ian

Please, explain in details what exactly are you trying to do. It seems that you either use CF-incompatible code or your projects is referencing non-CF System.dll

So far, I see that you want to use Oxygene language in your project. So, you might like to read about CF support by Oxygene. From it, you can see that it has some restrictions in design and deployment support.

Also, please check our Data Abstract CF sample which can be a good base to rely on while using DA with CF.

ok heres the design.pas code for a simple form

namespace CFTest;

interface

uses
System.Drawing,
System.Collections,
System.Windows.Forms,
System.ComponentModel;

type
Form1 = partial class
{$REGION Windows Form Designer generated fields}
private
var components: System.ComponentModel.Container := nil;
method InitializeComponent;
{$ENDREGION}
end;

implementation

{$REGION Windows Form Designer generated code}
method Form1.InitializeComponent;
var
resources: System.Resources.ResourceManager := new System.Resources.ResourceManager(typeof(Form1));
begin
//
// MainForm
//
self.ClientSize := new System.Drawing.Size(292, 273);
self.Icon := (resources.GetObject(’$this.Icon’) as System.Drawing.Icon);
self.Size := new System.Drawing.Size(300,300);
self.Name := ‘Form1’;
self.Text := ‘Form1’;
end;
{$ENDREGION}

end.

upon right click
view designer

get the following message
Unsupported code in InitializeComponent method: Unsupported expression or unknown identifier (self.ClientSize)

this happens on all forms for the first self._____

very annoying as the visual designer never opens.
project compiles and runs OK

regards Ian

The article about CF support(Elements Docs) says:

The Delphi Prism compiler provides support for the Compact Framework, although there are no designer features included due to limitations in Visual Studio. Some of the CF support (like forms designer and deployment) in Visual Studio is limited to use by C# and VB.NET only, so there is no way Delphi Prism could possibly integrate in that.