Jump to content

Usar uniFrame com Mobile!


Fábio Matte

Recommended Posts

É possivel usar o Uniframe dentro de um projeto mobile?

 

Se sim, alguém tem um exemplo de como chamar um uniframe dentro de um mobile.

 

Pois eu tentei chamar um uniFrame da mesma forma que chamo em Aplicação Web e deu a seguinte mensagem:

"OC4.setTitle is not a function"

 

 

Código usando para Chamar o uniFrame

Criei no Private o seguinte:

  private
    { Private declarations }
    FFrameName: string;
    FCurrentFrame: TUniFrame;
    procedure InsertFrame(AName, ATitle: string; MeuIDFrame : Integer; IDIcone: Integer);

E criei a procedure assim:

procedure TfrmLoginM.InsertFrame(AName, ATitle: string; MeuIDFrame : Integer; IDIcone:Integer);
var
  Path: string;
begin
  try
      if FFrameName = AName then
        Begin
          Exit;
        End
      else
      Begin
        FFrameName := AName;
      End;

      Path := UniServerModule.StartPath + 'Versao\';
      pgGERAL.TabIndex := MeuIDFrame;
      FreeAndNil(FCurrentFrame);
  except
    on E : Exception do
      begin
       sa.Info('ERRO NO ID FRAME...: '+MeuIDFrame.ToString);
       Abort;
      end;
  end;



  Try
    if AName <> 'TfrmLogimM' then
    begin
      FCurrentFrame               := TUniFrameClass(FindClass('T' + AName)).Create(Self);
      FCurrentFrame.Align         := alClient;
      FCurrentFrame.Parent        := tsAbastecimento;
      tsAbastecimento.Caption     := ATitle;
      tsAbastecimento.ImageIndex  := IDIcone;
    end;
  except
    on E : Exception do
      begin
        sa.Warning('Atenção de Exceção! 002',E.Message+' - Classe: '+e.ClassName,
          procedure(const ButtonClicked: TAButton)
            begin

            end);
         Abort;
      end;
  end;

end;

Chamei o uniFrame:

  InsertFrame('frmTesteM' , 'ABASTECIMENTO', 2,0);

Mas está apresentando o erro em destaque acima

 

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...