The Daily Click ::. Forums ::. Klik Coding Help ::. Kinda stumped handling multiple entries for a calendar object.
 

Post Reply  Post Oekaki 
 

Posted By Message

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
17th April, 2012 at 17/04/2012 07:41:03 -

This isn't so much of a "How do I do it" as a "What's the best possible method" type of question.
Effectively, I'm trying to make a scheduling application with a calendar object and INI++.
I've got it working so that it stores all the necessary appointment data and saves it to an INI by using the first 8 characters of the date/time stamp the calender object produces. Essentially, pick a date, fill in the appointment data, and it's all saved to an INI. When the app loads, it checks all dates in the INI associated with appointment data and sets those dates to bold. Clicking on a bold date loads all appointment data for that day.

That's awesome if there's only one appointment a day, but how would I handle parsing more than one set of appointment data a day? I know I'd be dealing with timestamps to separate appointments set same day, but how would the app know when to stop looking for appointment data? Should it be assumed there can only be up to two sets of appointment data per day, or is there an easier way to store X-number of sets on the same day and retrieve them separately?

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
17th April, 2012 at 17/04/2012 14:53:52 -

This is where the string tokenizer object would work brilliantly.

You can store lots of data inside a single string using this object.

For example using your calendar object and ini:

[groupname]

datecode=Mr L. Jones - 10:30#Miss H. Subayaer - 12:15#Mr B. Gates - 14:55


In this instance i am using the # as a delimiter. You can then modify your loading code to parse the string through the string tokenizer to split up the appointments.

Does that make sense?

 
n/a
   

Post Reply



 



Advertisement

Worth A Click