Forum > Editor

Lazarus 0.9.6 - LAZARUSRESOURCES Identifier not found

<< < (2/2)

Mikenoworth:
--------------------------------------------------------------------------------------------------------------------
object Form1: TForm1
  Caption = 'Script Engine Test Application'
  ClientHeight = 466
  ClientWidth = 572
  OnCreate = Form1Create
  PixelsPerInch = 96
  HorzScrollBar.Page = 571
  VertScrollBar.Page = 465
  Left = 534
  Height = 466
  Top = 320
  Width = 572
  object Label1: TLabel
    Caption = 'Total Amount of Variables'
    Color = clNone
    Left = 392
    Height = 12
    Top = 24
    Width = 127
  end
  object Label2: TLabel
    Caption = 'Variable'
    Color = clNone
    Height = 18
    Top = 10
    Width = 44
  end
  object Label3: TLabel
    Caption = 'Value'
    Color = clNone
    Left = 160
    Height = 20
    Top = 8
    Width = 32
  end
  object Label4: TLabel
    BorderSpacing.OnChange = nil
    Caption = 'Instruction'
    Color = clNone
    Height = 16
    Top = 56
    Width = 63
  end
  object ComboBox1: TComboBox
    MaxLength = 0
    OnChange = ComboBox1Change
    TabOrder = 0
    Text = 'ComboBox1'
    Height = 21
    Top = 27
    Width = 152
  end
  object Edit1: TEdit
    BorderSpacing.OnChange = nil
    TabOrder = 1
    Text = 'Edit1'
    Left = 160
    Height = 22
    Top = 26
    Width = 146
  end
  object ComboBox2: TComboBox
    BorderSpacing.OnChange = nil
    MaxLength = 0
    TabOrder = 2
    Text = 'ComboBox2'
    Height = 21
    Top = 72
    Width = 152
  end
  object Edit3: TEdit
    BorderSpacing.OnChange = nil
    TabOrder = 3
    Text = 'Edit3'
    Height = 22
    Top = 440
    Width = 496
  end
  object Button2: TButton
    BorderSpacing.OnChange = nil
    Caption = 'Clear'
    TabOrder = 4
    Left = 520
    Height = 18
    Top = 440
    Width = 35
  end
  object GroupBox1: TGroupBox
    BorderSpacing.OnChange = nil
    Caption = 'Instruction Syntax'
    ClientHeight = 30
    ClientWidth = 406
    ParentColor = True
    TabOrder = 5
    Left = 158
    Height = 48
    Top = 56
    Width = 410
    object Label5: TLabel
      BorderSpacing.OnChange = nil
      Caption = 'Syntax Display Panel'
      Color = clNone
      Left = 8
      Height = 16
      Top = 8
      Width = 358
    end
  end
  object Memo1: TMemo
    BorderSpacing.OnChange = nil
    Lines.Strings = (
      'Memo1'
    )
    TabOrder = 6
    Height = 320
    Top = 112
    Width = 570
  end
end

--------------------------------------------------------------------------------------------------------------------

  { TForm1 }

  TForm1 = class(TForm)
    Button2: TButton;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Edit1: TEdit;
    Edit3: TEdit;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Memo1: TMemo;
    procedure ComboBox1Change(Sender: TObject);
    procedure Form1Create(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

--------------------------------------------------------------------------------------------------------------------

Hm. I don't see anything wrong with it, but I don't know exactly what should be there and what shouldn't.

Anybody have any ideas?

Mikenoworth:
FIXED - :D

I had done this:

-----------------------------------------------------------------------------------
  for temp_loop := 0 to TScript.instruction_count() do
  begin
    tmp_ins := TScript.get_instruction(temp_loop);
    if tmp_ins <> nil then
      with tmp_ins^ do
        ComboBox2.Items.Add(get_id);
 
  // MAIN SCRIPT CONSOLE INPUT
  edit3.Text := '';

end;

initialization

  {$I Unit1.lrs}

end.

-----------------------------------------------------------------------------------

when it should have been this:

-----------------------------------------------------------------------------------
  for temp_loop := 0 to TScript.instruction_count() do
  begin
    tmp_ins := TScript.get_instruction(temp_loop);
    if tmp_ins <> nil then
      with tmp_ins^ do
        ComboBox2.Items.Add(get_id);
  end;                                                  // <-- cause of all my pain
  // MAIN SCRIPT CONSOLE INPUT
  edit3.Text := '';

end;

initialization

  {$I Unit1.lrs}

end.

-----------------------------------------------------------------------------------

With a problem so simplistic and occurable, neither lazarus or fpc
could rule that an END was missing. Even with an 'initialization' inside
the block, neither knew what the hell to make of it. Hey, fpc + Lazarus for life,
but that was damned annoying to stumble upon, AND to realize what the
real problem was.

Navigation

[0] Message Index

[*] Previous page

Go to full version