AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Immer Ärger mit ARC

Ein Thema von Ookami · begonnen am 24. Okt 2014 · letzter Beitrag vom 30. Okt 2014
Antwort Antwort
Benutzerbild von Ookami
Ookami

Registriert seit: 20. Nov 2009
Ort: Baden Württemberg
77 Beiträge
 
Delphi 2009 Architect
 
#1

AW: Immer Ärger mit ARC

  Alt 24. Okt 2014, 21:10
Und noch mal an alle,

ich habe das Testprojekt nochmal frisch aufgesetzt. Das Interface ist dasselbe wie oben, wurde aber nicht verwendet.

Code:
program AppThree;

uses
  System.StartUpCopy,
  FMX.MobilePreview,
  FMX.Forms,
  HeaderFooterTemplate in 'HeaderFooterTemplate.pas' {View},
  MBInterface in '..\TryAppTwo\MBInterface.pas';

{$R *.res}

Procedure Main;
Var      View : TView;
Begin
     Application.CreateForm(TView, View);
     Application.RealCreateForms;

     try
        Application.Run;
     finally
     end;
End;


begin
     Application.Initialize;
     Main;
end.
Code:
unit HeaderFooterTemplate;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls,
  MBInterface;

type
  TView = class(TForm)
    Header: TToolBar;
    Footer: TToolBar;
    HeaderLabel: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
    Procedure SetHelloWorld (Value : String);
  end;

var
  View: TView;

implementation

{$R *.fmx}

Procedure TView.SetHelloWorld (Value : String);
Begin

End;

ohne "Application.RealCreateForms; " geht es, mit, geht es nicht mehr, der Bildschirm bleibt schwarz. Dabei habe ich aber den gesamten Businescode weggelassen.
Zu den Interface-Einbindungen, geschweige den Einbindungen für den Presenter / Model bin ich gar nicht gekommen.

Funktioniert das denn bei Apps für Android so anders?
Rethorisch: Auf was muss ich mich den dann noch bei IOs / MacOSx einlassen?
Wolfgang
Grüße und Danke
Wolfgang
  Mit Zitat antworten Zitat
Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#2

AW: Immer Ärger mit ARC

  Alt 24. Okt 2014, 21:16
ohne "Application.RealCreateForms; " geht es, mit, geht es nicht mehr, der Bildschirm bleibt schwarz.

Funktioniert das denn bei Apps für Android so anders?
Rethorisch: Auf was muss ich mich den dann noch bei IOs / MacOSx einlassen?
Ja, die Mobile-Platformen sind da anders (hatte ich nicht mehr so auf dem Schirm) und eigentlich sollte man dort auch auf die entsprechenden Ereignisse reagieren
Delphi-Quellcode:
  // registrieren
  if TPlatformServices.Current.SupportsPlatformService( IFMXApplicationEventService, FApplicationEventService )
  then
    begin
      FApplicationEventService.SetApplicationEventHandler( Self.ApplicationEventHandler );
    end;

// Handler
function TMain_Form.ApplicationEventHandler( AAppEvent: TApplicationEvent; AContext: TObject ): Boolean;
begin
  case AAppEvent of
    TApplicationEvent.FinishedLaunching:
      TApp.Log( '[AppEvent] FinishedLaunching' );
    TApplicationEvent.BecameActive:
      TApp.Log( '[AppEvent] BecameActive' );
    TApplicationEvent.WillBecomeInactive:
      TApp.Log( '[AppEvent] WillBecomeInactive' );
    TApplicationEvent.EnteredBackground:
      TApp.Log( '[AppEvent] EnteredBackground' );
    TApplicationEvent.WillBecomeForeground:
      TApp.Log( '[AppEvent] WillBecomeForeground' );
    TApplicationEvent.WillTerminate:
      TApp.Log( '[AppEvent] WillTerminate' );
    TApplicationEvent.LowMemory:
      TApp.Log( '[AppEvent] LowMemory' );
    TApplicationEvent.TimeChange:
      TApp.Log( '[AppEvent] TimeChange' );
    TApplicationEvent.OpenURL:
      TApp.Log( '[AppEvent] OpenURL' );
  end;
  Result := True;
end;
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz