Einzelnen Beitrag anzeigen

Benutzerbild von RWarnecke
RWarnecke

Registriert seit: 31. Dez 2004
Ort: Stuttgart
4.408 Beiträge
 
Delphi XE8 Enterprise
 
#5

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 23:17
Delphi-Quellcode:
  if Assigned(FNotification) then
  begin
    TUILocalNotification.Init(FNotification, tmpNotificationP);
    tmpDictionary := TUILocalNotification.Wrap(tmpNotificationP).userInfo; // Access Violation
  end;
Delphi-Quellcode:
var
  tmpKeyArray: NSArray;
  tmpNotificationP: Pointer;
begin
  M_1.Lines.Add(RemoteNotifications.DeviceToken);
  if Assigned(FNotification) then
  begin
    TUILocalNotification.Init(FNotification, tmpNotificationP);
    M_1.Lines.Add('OnLaunchNotification : ' + #13#10 + TUILocalNotification.Wrap(tmpNotificationP).userInfo.description.UTF8String); // Access Violation
  end;
end;
Die Variable FNotification ist vom Typ UILocalNotification.

Edit 1:
Selbst eine einfache Zeile wie diese hier bringt eine Access Violation :
Delphi-Quellcode:
var
  UserInfo: NSDictionary;
begin
  if Assigned(FNotification) then
  begin
    UserInfo := FNotification.userInfo;
  end;
end;
Rolf Warnecke
App4Mission

Geändert von RWarnecke (19. Okt 2013 um 23:32 Uhr)
  Mit Zitat antworten Zitat