Jump to content

Privileged Instruction


valramosr

Recommended Posts

Hello, I have an application. When I call the frame it presents the error:

 

Privileged Instruction

 

Below my code:

var
  Nd : TUniTreeNode;
  Ts : TUniTabSheet;
  FrC : TUniFrameClass;
  Fr : TUniFrame;
  FClassName, iconfile, Path: string;
  index: Integer;
begin

  Nd := NavTree.Selected;
  if Nd.Count = 0 then
  begin
    Ts := Nd.Data;
    if not Assigned(Ts) then
    begin
      Ts := TUniTabSheet.Create(Self);
      Ts.PageControl := UniPageControl1;

      Ts.Closable := True;
      Ts.OnClose := TabSheetClose;
      Ts.Tag := NativeInt(Nd);
      Ts.Caption := Nd.Text;
      Ts.ImageIndex := Nd.ImageIndex;

      if Nd.Text = 'Cadastro de Fornecedor' then
         FrC := TUniFrameClass(TFrameFornecedor);
      if Nd.Text = 'Cadastro de Prefeitura' then
         FrC := TUniFrameClass(TfrmPrefeitura);

      Fr := FrC.Create(Self);
      Fr.Align := alClient;
      Fr.Parent := Ts;

      Nd.Data := Ts;
    end;
    UniPageControl1.ActivePage := Ts;
  end;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...