Einzelnen Beitrag anzeigen

Benutzerbild von Sir Rufo
Sir Rufo

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

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