Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
Tinderbox Users >> Tinderbox applications >> Meal Planner

Message started by Steve Scott on May 30th, 2013, 5:35pm

Title: Meal Planner
Post by Steve Scott on May 30th, 2013, 5:35pm

Hi Tinderbox Community,

I just received my license today!  I thought in order to learn the program, I would jump right in and create a meal planner.  As I am brand new to the application, I would love any input before jumping in.  I was thinking about the following:

* create a prototype called "menu item" with the following attributes: cuisine, time (prep+cook), url, total cost, serving size

* create a prototype called "ingredient" with the following attributes: quantity, in stock (checkbox), store

* as children of the menu items, I would have a list of ingredients and a list of directions.  For the list of directions, is there a way to add "step 1, step 2 to each sibling?

* create a container called Cuisine with children such as BBQ, Italian, Mexican, etc.

* create a agent for different stores based on if something is checked

* create containers for different days of the week. . . I would drag an alias of the food for each day into the appropriate day of the week.

* create a container for past weeks for inspiration

* create a container for future weeks. . . I double recipes and I would put an alias of a menu item on a future date.  Maybe it would be colored blue to indicate that it is in the freezer.

Once I have it all laid out I'm sure I'll have a ton of questions.  In the meantime, if you have any suggestions, I would love to hear them.  

I know there are lots of existing tools out there, but I thought this would be a good way to learn the program and to plan more efficiently.


Title: Re: Meal Planner
Post by Mark Anderson on May 31st, 2013, 8:38am

If the directions are all siblings - i.e. not mixed with other prototypes/notes then the first directions note (the first child of the menu item) will have a $SiblingOrder value of 1. Thus the directions prototype could use a $DisplayExpression:

"Step "+$SiblingOrder+": "+$Name"

So if the first direction had the title ($Name) of 'Soak beans in water', it would show as 'Step 1: Soak beans in water'.

If each ingredient has an ingredient-prototyped note of its own, it doesn't need to be a copy/alias child of a menu item.  Instead the latter could have an $Ingredients Set or List**. The container of the ingredient notes would populate its $Ingredients with the titles of all its children:

$Ingredients = collect(children,$Name);

The pop-up auto-lists in key attribute boxes show all existing values. As at least one note now holds all those values, when adding $Ingredients in the menu item notes all available ingredients will be listed.

** An ingredient might be used twice, e.g. coriander in the main stock and later as a chopped garnish. You might thus want to list the ingredient twice, which is possible in a List attribute but not a Set.

With my cook's head on, I think you've actually chosen a topic with lots of edge cases that makes a complete system quite hard. But it's good for learning - even if not that usable at the end. On the way you'll learn a god few core techniques and things that do and don't work. IOW, even if the project looks like not ending as you'd expected, I'd keep going for now as it's a good learning vehicle.

Title: Re: Meal Planner
Post by Mark Bernstein on Jun 6th, 2013, 10:35am

This all makes lots of sense, especially for getting the hang of Tinderbox.

If we were in earnest, I think it would be good to know more about the goal here.  You're building a lot of infrastructure right off the bat: do you need all of it?  Sometimes, it's best to see whether you actually need all these agents. But here, part of the point is to build the agents!  So plunge right in.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.