Results 1 to 7 of 7

Thread: Form Error

  1. #1
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Form Error

    Code:
    Line 432: [Hint] (10376:1): Variable 'OLDMS' never used in script C:\Program Files\Scar\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
    Line 32: [Error] (12299:13): Unknown identifier 'PARENT' in script
    parent is used in the memo part but no error...

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    var
      frmDesign : TForm;
      Memo1 : TMemo;
      OpenDialog1 : TOpenDialog;
     
    procedure form;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 696;
    frmDesign.Height := 480;
    frmDesign.Caption := 'Loader';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := false;
    frmDesign.PixelsPerInch := 96;
    Memo1 := TMemo.Create(frmDesign);
    Memo1.Parent := frmDesign;
    Memo1.Left := 112;
    Memo1.Top := 160;
    Memo1.Width := 433;
    Memo1.Height := 241;
    Memo1.Lines.Add('Memo1');
    Memo1.TabOrder := 8;
    OpenDialog1 := TOpenDialog.Create(frmDesign);
    OpenDialog1.Parent := frmDesign;
    OpenDialog1.Title := 'd';
    OpenDialog1.Left := 336;
    OpenDialog1.Top := 32;
    end;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    function ShowFormModal: Boolean;
    begin
      Result:= False;
      //good thing about showmodal is that it can return value
      if(frmDesign.ShowModal = mrOk)then
        Result:= True;
    end;

    function SafeShowFormModal: Boolean;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      result:= ThreadSafeCall('ShowFormModal', v);
    end;
     
    begin
    SafeInitForm;
    SafeShowFormModal
     FreeForm(frmDesign);
    end.
    I do visit every 2-6 months

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    dont put .parent and .left and .top for the opendialog(because its a nonvisible component so it has no place to be and doesnt need a parent. + u need that proc to be initform if ur threadsafecall is 'initform'...so

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    var
      frmDesign : TForm;
      Memo1 : TMemo;
      OpenDialog1 : TOpenDialog;

    procedure initform;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 696;
    frmDesign.Height := 480;
    frmDesign.Caption := 'Loader';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := false;
    frmDesign.PixelsPerInch := 96;
    Memo1 := TMemo.Create(frmDesign);
    Memo1.Parent := frmDesign;
    Memo1.Left := 112;
    Memo1.Top := 160;
    Memo1.Width := 433;
    Memo1.Height := 241;
    Memo1.Lines.Add('Memo1');
    Memo1.TabOrder := 8;
    OpenDialog1 := TOpenDialog.Create(frmDesign);
    OpenDialog1.Title := 'd';
    end;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    function ShowFormModal: Boolean;
    begin
      Result:= False;
      //good thing about showmodal is that it can return value
      if(frmDesign.ShowModal = mrOk)then
        Result:= True;
    end;

    function SafeShowFormModal: Boolean;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      result:= ThreadSafeCall('ShowFormModal', v);
    end;

    begin
    SafeInitForm;
    SafeShowFormModal
     FreeForm(frmDesign);
    end.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    EDIT1: Dam Dan beat me Lol well still, listen to him
    EDIT2: Also you called the Procedure form. It should be initform unless you want to change it to threadsafecall(initform);

    The hint is not an error. It means that this has been made with an old version of SCAR/SRL.

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    var
      frmDesign : TForm;
      Memo1 : TMemo;
      OpenDialog1 : TOpenDialog;

    procedure initform;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 696;
    frmDesign.Height := 480;
    frmDesign.Caption := 'Loader';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := false;
    frmDesign.PixelsPerInch := 96;
    Memo1 := TMemo.Create(frmDesign);
    Memo1.Parent := frmDesign;
    Memo1.Left := 112;
    Memo1.Top := 160;
    Memo1.Width := 433;
    Memo1.Height := 241;
    Memo1.Lines.Add('Memo1');
    Memo1.TabOrder := 8;
    OpenDialog1 := TOpenDialog.Create(frmDesign);
    OpenDialog1.Title := 'd';
    end;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    function ShowFormModal: Boolean;
    begin
      Result:= False;
      //good thing about showmodal is that it can return value
      if(frmDesign.ShowModal = mrOk)then
        Result:= True;
    end;

    function SafeShowFormModal: Boolean;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      result:= ThreadSafeCall('ShowFormModal', v);
    end;

    begin
    SafeInitForm;
    SafeShowFormModal
     FreeForm(frmDesign);
    end.

    That is the working version. the open dialog box has a fixed size so you don't need that to be called. It does not even need a parent. I hope that helps you. :P Thanks,

    ~Kyle~

  4. #4
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    O thanks much. Now all i need help with is my Php problems
    I do visit every 2-6 months

  5. #5
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    And what problems might you be having with PHP?

  6. #6
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I made a thread on it.
    I do visit every 2-6 months

  7. #7
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, I will look at it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Form Error
    By ZaSz in forum OSR Help
    Replies: 7
    Last Post: 04-09-2008, 02:57 AM
  2. Form Error Help Plz
    By Bonfield in forum OSR Help
    Replies: 5
    Last Post: 07-25-2007, 02:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •