Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6759875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:00:11+00:00 2026-05-26T14:00:11+00:00

I am using Tapku calendar on my project .In the method for selecting a

  • 0

I am using Tapku calendar on my project .In the method for selecting a date

i showed another view on the view.Here is my code

- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)date {

    self.dataController=[[TimeCardDataController alloc] init];
    self.dataController.managedObjectContext=[self context];
    [self.dataController initWithTimeCards];

    NSDate *weekStartDay=[date weekFirstDate];
    NSDate *weekEndDay=[date weekLastDate];
    self.billdailyValuePositiveArray= [self.dataController getTimeCardWithStartData:date endDate:date timeCardType:TIMECARD_STATUS_BILLABLE];   
    self.billweeklyValueNegetiveArray= [self.dataController getTimeCardWithStartData:weekStartDay endDate:weekEndDay timeCardType:TIMECARD_STATUS_NONBILLABLE];
    self.billweeklyValuePositiveArray= [self.dataController getTimeCardWithStartData:weekStartDay endDate:weekEndDay timeCardType:TIMECARD_STATUS_BILLABLE];
    self.billdailyValueNegetiveArray= [self.dataController getTimeCardWithStartData:date endDate:date timeCardType:TIMECARD_STATUS_NONBILLABLE];

    self.syncweeklyValuePositiveArray=[self.dataController getTimeCardWithStartData:weekStartDay endDate:weekEndDay timeCardType:TIMECARD_STATUS_SYNCED];
    self.syncweeklyValueNegetiveArray=[self.dataController getTimeCardWithStartData:weekStartDay endDate:weekEndDay timeCardType:TIMECARD_STATUS_NOTSYNCED];
    self.syncdailyValuePositiveArray= [self.dataController getTimeCardWithStartData:date endDate:date timeCardType:TIMECARD_STATUS_SYNCED];
    self.syncdailyValueNegetiveArray= [self.dataController getTimeCardWithStartData:date endDate:date timeCardType:TIMECARD_STATUS_NOTSYNCED];

    self.postweeklyValuePositiveArray= [self.dataController getTimeCardWithStartData:weekStartDay endDate:weekEndDay timeCardType:TIMECARD_STATUS_POSTED];
    self.postweeklyValueNegetiveArray= [self.dataController getTimeCardWithStartData:weekStartDay endDate:weekEndDay timeCardType:TIMECARD_STATUS_NOTPOSTED];
    self.postdailyValuePositiveArray= [self.dataController getTimeCardWithStartData:date endDate:date timeCardType:TIMECARD_STATUS_POSTED];
    self.postdailyValueNegetiveArray= [self.dataController getTimeCardWithStartData:date endDate:date timeCardType:TIMECARD_STATUS_NOTPOSTED];


    [self toggleCalendar];

    [self doOn:date];

}

the do on method shows another view. But after clicking a date it shows the view .But after that the system shows EXC_BAD_ACCESS.Any ideas.. I am trying but cant find the error . Please i need help

Here is the code for the methods above:::::::

 -(NSMutableArray *) getTimeCardWithStartData:(NSDate *) startDate endDate:(NSDate *)endDate timeCardType:(NSString *) timeCardType
{
    NSMutableArray* timeCardArray=[[NSMutableArray alloc] init];

    NSMutableArray *categoryTimeCardArray=[[NSMutableArray alloc] init] ;
    if ([timeCardType isEqualToString:TIMECARD_STATUS_BILLABLE]) 
    {
        categoryTimeCardArray=[self fetchedTimeCardWithStartDate:startDate endDate:endDate fetchedCategoryTimeCard:self.fetchedBillableTimeCards];

    }
    else if([timeCardType isEqualToString:TIMECARD_STATUS_NONBILLABLE])
    {
        categoryTimeCardArray=[self fetchedTimeCardWithStartDate:startDate endDate:endDate fetchedCategoryTimeCard:self.fetchedNonBillableTimeCards];

    }
    else if ([timeCardType isEqualToString:TIMECARD_STATUS_POSTED]) 
    {
        categoryTimeCardArray=[self fetchedTimeCardWithStartDate:startDate endDate:endDate fetchedCategoryTimeCard:self.fetchedPostedTimeCards];

    }
    else if([timeCardType isEqualToString:TIMECARD_STATUS_NOTPOSTED])
    {
        categoryTimeCardArray=[self fetchedTimeCardWithStartDate:startDate endDate:endDate fetchedCategoryTimeCard:self.fetchedNotPostedTimeCards];

    }
    else if([timeCardType isEqualToString:TIMECARD_STATUS_SYNCED])
    {
        categoryTimeCardArray=[self fetchedTimeCardWithStartDate:startDate endDate:endDate fetchedCategoryTimeCard:fetchedSyncedTimeCards];

    }

    else if ([timeCardType isEqualToString:TIMECARD_STATUS_NOTSYNCED])
    {
        categoryTimeCardArray=[self fetchedTimeCardWithStartDate:startDate endDate:endDate fetchedCategoryTimeCard:fetchedNotSyncedTimeCards];

    }





    return categoryTimeCardArray;


}               

This is the initWithTimeCards method

    -(void) initWithTimeCards
{
    [self fetchAllTimeCard];
    fetchedTimecards=[[NSArray alloc] init];
    fetchedBillableTimeCards=[[NSArray alloc] init];
    fetchedBillableTimeCards=[[NSArray alloc] init];
    self.fetchedNonBillableTimeCards =[[NSArray alloc] init];
    self.fetchedPostedTimeCards=[[NSArray alloc] init];
    self.fetchedNotPostedTimeCards=[[NSArray alloc] init];
    fetchedSyncedTimeCards=[[NSArray alloc] init];
    fetchedNotSyncedTimeCards=[[NSArray alloc] init];



    self.fetchedNonBillableTimeCards =[self   fetchTimceCardWithBillStatus:TIMECARD_BILL_STATUS_NONBILLABLE];
    self.fetchedPostedTimeCards=[self fetchTimceCardWithPostStatus:TIMECARD_BILL_STATUS_POSTED];
    self.fetchedNotPostedTimeCards=[self fetchTimceCardWithPostStatus:TIMECARD_BILL_STATUS_NOTPOSTED];
    fetchedSyncedTimeCards=[self fetchTimceCardWithSyncStatus:TIMECARD_BILL_STATUS_SYNCED];
    fetchedNotSyncedTimeCards=[self fetchTimceCardWithSyncStatus:TIMECARD_BILL_STATUS_NOTSYNCED];



}

`

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:00:11+00:00Added an answer on May 26, 2026 at 2:00 pm

    Try enabling NSZombies to see which object that’s being over-released (that’s likely to be your issue).

    See How do I set up NSZombieEnabled in Xcode 4? for instructions on how to enable it.

    EDIT: Also, make sure to check the -initWithTimeCards and -getTimeCardWithStartData:endDate:timeCardType methods to see if you’re over-releasing something in there.

    EDIT 2: The issue is probably that some of your arrays isn’t retained properly in memory. Try changing fetchedSyncedTimeCards to self.fetchedSyncedTimeCards and do the same with fetchedNotSyncedTimeCards. You’re probably returning an autoreleased object in -fetchTimceCardWithSyncStatus and not retaining it afterwards, causing your program to invoke methods on an object that is no longer allocated.

    But even if it works, you should really read up on memory management and make sure your code doesn’t leak everywhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
I am using core data to store objects for my project.There is a date
Using JDeveloper , I started developing a set of web pages for a project
I'd like to use the Tapku library to add a calander date picker control
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Iam newbie with this calendar sort of thing...Please suggest me if possible. Iam using
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
I need to add an image at the top of the default calendar view
Using the classic code snippet: if (x & (x-1)) == 0 If the answer
Using ruby(1.8.7) , rails(2.3.8) , rspec(1.3.1) and rspec-rails(1.3.3) how do I test a method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.