• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: My first web app... (still)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My first web app... (still)


  • Subject: Re: My first web app... (still)
  • From: Ken Anderson <email@hidden>
  • Date: Tue, 5 Jun 2007 08:50:15 -0400

Mac,

Since it seems you're doing a new fetch every time the main page is displayed, I cannot fathom a good reason why you're not seeing all the tags. Have you determined whether or not the fetch is actually returning all the expected objects? I would do a couple of things:

1) Make sure that the return from the tagEntries() method is actually what you're iterating over to display the tags
2) Turn on EOAdaptorDebugEnabled so that you can see how many rows your fetch is returning and compare that to the expected number


Ken

On Jun 5, 2007, at 1:14 AM, Mac Campbell wrote:

Hello all,

Maybe you can help me out with another question...

I am working on a blog app as my first app... I have 3 major outstanding issues the major one that I am most lost on is... my tag system does not increment the tag counts right away... the only way the tag area shows the correct number of tags (for newly added tags, in debug mode) is for me to stop and start the app (in Xcode newest / last version) and start it again, although added blog posts do appear in the blog posts list...

I have the WO Repetition that goes through my array of tagEntries displaying each unique tagEnumerator pertinent code below on the main page:

    public NSArray tagEntries()
    {

tagEnumerator = null;
tEntrys = null;
//EOEditingContext ec3 = new EOEditingContext();
BlogEntry blogEntrys = new BlogEntry();
EOFetchSpecification fs = EOFetchSpecification.fetchSpecificationNamed("tagsDescending", "Tags");
NSArray keypaths = new NSArray();
keypaths = keypaths.arrayByAddingObject("blogEntrys");
//keypaths = "blogEntrys";
fs.setPrefetchingRelationshipKeyPaths(keypaths);
NSArray tEntrys= new NSMutableArray(ec ().objectsWithFetchSpecification(fs));
return tEntrys;
}


After a new blog post is added (on the addPost page) the main page is called:

....
// commit the changes made to the objects in the editing context to the database
ec.saveChanges();


// refresh the page by fetching the page without recreating a new session
//Main nextPage = (Main)pageWithName("Main");
return pageWithName("Main");
}


The thing in WO Repitetion doing the actual count is "tagEnumerator.blogEntrys.@count"

Any ideas? It only shows an accurate count when you first start up the app...?

Thanks,

Mac
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >My first web app... (still) (From: Mac Campbell <email@hidden>)

  • Prev by Date: Re: Apache FOP and & in strings
  • Next by Date: Re: Making a WO app look pretty
  • Previous by thread: Re: My first web app... (still)
  • Next by thread: Re: My first web app... (still)
  • Index(es):
    • Date
    • Thread