AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Cross-Platform-Entwicklung [UILocalNotification] Wie auf Inhalt zugreifen ?
Thema durchsuchen
Ansicht
Themen-Optionen

[UILocalNotification] Wie auf Inhalt zugreifen ?

Ein Thema von RWarnecke · begonnen am 19. Okt 2013 · letzter Beitrag vom 21. Okt 2013
Antwort Antwort
Seite 1 von 2  1 2      
Benutzerbild von RWarnecke
RWarnecke

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

[UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 22:19
Hallo zusammen,

wie kann ich auf den Inhalt einer Variable vom Typ UILocalNotification zugreifen ?
Rolf Warnecke
App4Mission
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.137 Beiträge
 
Delphi 12 Athens
 
#2

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 22:44
Hat diese Klasse/Interface denn keine Property/Methoden?

https://developer.apple.com/library/...Reference.html
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat
Benutzerbild von RWarnecke
RWarnecke

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

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 23:02
Hat diese Klasse/Interface denn keine Property/Methoden?
Doch hat Sie, aber alle Versuche die ich bis jetzt unternommen habe, brachten mir nur Access Violations. Deshalb meine allgemeine Frage, wie ich auf den Inhalt von UILocalNotification zugreife.
Rolf Warnecke
App4Mission
  Mit Zitat antworten Zitat
daywalker9

Registriert seit: 1. Jan 2010
Ort: Leer
594 Beiträge
 
Delphi XE3 Professional
 
#4

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 23:12
Zeig doch mal deinen Code.
Lars
  Mit Zitat antworten Zitat
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
daywalker9

Registriert seit: 1. Jan 2010
Ort: Leer
594 Beiträge
 
Delphi XE3 Professional
 
#6

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 23:32
Wenn deine Variable vom Typ UILocalNotification ist, brauchst Du nicht per Init/Wrap deine Variable erneut auf diesen Typen casten.
Du kannst einfach von FNotification die Felder abgreifen
Lars
  Mit Zitat antworten Zitat
Benutzerbild von RWarnecke
RWarnecke

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

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 23:33
Wenn deine Variable vom Typ UILocalNotification ist, brauchst Du nicht per Init/Wrap deine Variable erneut auf diesen Typen casten.
Du kannst einfach von FNotification die Felder abgreifen
Siehe mein Edit 1, selbst das funktioniert nicht.
Rolf Warnecke
App4Mission
  Mit Zitat antworten Zitat
daywalker9

Registriert seit: 1. Jan 2010
Ort: Leer
594 Beiträge
 
Delphi XE3 Professional
 
#8

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 19. Okt 2013, 23:50
Dann ist bei dir was anderes im argen. Wie sieht denn den andere Code aus? Wann wird FNotification gesetzt?
Lars
  Mit Zitat antworten Zitat
Benutzerbild von RWarnecke
RWarnecke

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

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 20. Okt 2013, 01:03
FNotification wird wie in diesem Beispiel(der 2. Beitrag) gesetzt.
Rolf Warnecke
App4Mission
  Mit Zitat antworten Zitat
Benutzerbild von RWarnecke
RWarnecke

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

AW: [UILocalNotification] Wie auf Inhalt zugreifen ?

  Alt 21. Okt 2013, 04:26
Hat niemand eine Idee, warum ich nicht auf den Inhalt von FNotification zugreifen kann ?
Rolf Warnecke
App4Mission
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


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 11:52 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz