FROM : Martin
DATE : Thu Feb 07 11:12:02 2008
Now it's getting weird!
Let me recall the problem, the following code does *not* work:
- (void)downloadStateDidChanged:(NSNotification *)notification {
PSEnclosure *enclosure = [notification object];
PSEntry *entry = enclosure.entry;
NSLog(@"%@", entry.feed);
}
While I was looking for a workaround, I found that the following code
does work:
- (void)downloadStateDidChanged:(NSNotification *)notification {
PSEnclosure *enclosure = [notification object];
PSEntry *entry = enclosure.entry;
PSEntry *iDontUseThisVariable = [[PSClient applicationClient]
entryWithIdentifier:[entry identifier]];
NSLog(@"%@", entry.feed);
}
So calling the entryWithIdentifier method does some internal stuff so
that our entry automagically gets its feed back! To remove the
compiler warning about the unused warning, simple ignore the object
returned by the method by just calling "[[PSClient applicationClient]
entryWithIdentifier:[entry identifier]];".
I guess I should fill a bug report for this.
-Martin.
Le 6 févr. 08 à 19:09, Martin a écrit :
> Hi,
>
> My Cocoa app subscribes to several RSS feeds using the PubSub
> framework. I'd like to handle the downloading of enclosures. To do
> so, I observe the PSEnclosureDownloadStateDidChangeNotification:
>
> [[NSNotificationCenter defaultCenter] addObserver:self
> selector:@selector(downloadStateDidChanged:)
> name:PSEnclosureDownloadStateDidChangeNotification object:nil];
>
> The downloadStateDidChanged will be called for any enclosure of any
> entry of any feed that my application is subscribed to. So in the
> implementation of downloadStateDidChanged, I'd like to know which
> entry of which feed I'm dealing with. So I do something like this :
>
> - (void)downloadStateDidChanged:(NSNotification *)notification {
> PSEnclosure *enclosure = [notification object];
> PSEntry *entry = enclosure.entry;
> NSLog(@"%@", entry);
> }
>
> But I'm having the following error message :
> [WARNING] Couldn't find PSFeed of PSEntry['My Entry Title' 1]
> (FeedCore=PubSub::FeedCore[Feeds #1] 0x177950, PSClient=(null))
>
> Am I doing something wrong?
>
> Thanks,
> -Martin.
>
DATE : Thu Feb 07 11:12:02 2008
Now it's getting weird!
Let me recall the problem, the following code does *not* work:
- (void)downloadStateDidChanged:(NSNotification *)notification {
PSEnclosure *enclosure = [notification object];
PSEntry *entry = enclosure.entry;
NSLog(@"%@", entry.feed);
}
While I was looking for a workaround, I found that the following code
does work:
- (void)downloadStateDidChanged:(NSNotification *)notification {
PSEnclosure *enclosure = [notification object];
PSEntry *entry = enclosure.entry;
PSEntry *iDontUseThisVariable = [[PSClient applicationClient]
entryWithIdentifier:[entry identifier]];
NSLog(@"%@", entry.feed);
}
So calling the entryWithIdentifier method does some internal stuff so
that our entry automagically gets its feed back! To remove the
compiler warning about the unused warning, simple ignore the object
returned by the method by just calling "[[PSClient applicationClient]
entryWithIdentifier:[entry identifier]];".
I guess I should fill a bug report for this.
-Martin.
Le 6 févr. 08 à 19:09, Martin a écrit :
> Hi,
>
> My Cocoa app subscribes to several RSS feeds using the PubSub
> framework. I'd like to handle the downloading of enclosures. To do
> so, I observe the PSEnclosureDownloadStateDidChangeNotification:
>
> [[NSNotificationCenter defaultCenter] addObserver:self
> selector:@selector(downloadStateDidChanged:)
> name:PSEnclosureDownloadStateDidChangeNotification object:nil];
>
> The downloadStateDidChanged will be called for any enclosure of any
> entry of any feed that my application is subscribed to. So in the
> implementation of downloadStateDidChanged, I'd like to know which
> entry of which feed I'm dealing with. So I do something like this :
>
> - (void)downloadStateDidChanged:(NSNotification *)notification {
> PSEnclosure *enclosure = [notification object];
> PSEntry *entry = enclosure.entry;
> NSLog(@"%@", entry);
> }
>
> But I'm having the following error message :
> [WARNING] Couldn't find PSFeed of PSEntry['My Entry Title' 1]
> (FeedCore=PubSub::FeedCore[Feeds #1] 0x177950, PSClient=(null))
>
> Am I doing something wrong?
>
> Thanks,
> -Martin.
>
| Related mails | Author | Date |
|---|---|---|
| Martin | Feb 6, 19:09 | |
| Martin | Feb 7, 09:42 | |
| Martin | Feb 7, 11:12 |






Cocoa mail archive

