# Congratulations

**URL:** <https://forum.xojo.com/t/congratulations/17630>\
**Category:** General\
**Created:** [July 1, 2014, 3:18pm UTC](https://forum.xojo.com/t/congratulations/17630 "2014-07-01T15:18:27Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:28am UTC](https://forum.xojo.com/t/congratulations/17630/41 "2014-07-03T03:28:04Z")

</div>

Need space on that mug. 😛

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [July 3, 2014, 3:33am UTC](https://forum.xojo.com/t/congratulations/17630/42 "2014-07-03T03:33:44Z")

</div>

Or just at the bottom of the mug inside:

```auto
refill()
```

So when you drink all the coffee you can remember to get more!

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:39am UTC](https://forum.xojo.com/t/congratulations/17630/43 "2014-07-03T03:39:06Z")

</div>

> [@107306:@Tim Parnell](#):
>
> Or just…

The fun part is showing some Xojo syntax. A pure refill() can be anything, from Pascal to C#

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:44am UTC](https://forum.xojo.com/t/congratulations/17630/44 "2014-07-03T03:44:39Z")

</div>

Found a bug: 🙂

`Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.CoffeePot)
Dim bv As new Beverage(BevType.Coffee)
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
While me.developing()
  If mug.almostEmpty() Then // 0 - 10% left
    mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
  else
    me.drink(mug)
  End
  If pot.empty() Then
    bv = new Beverage(BevType.Coffee)
    pot.prepare(bv)
  End
Wend`

---

<div class="post-metadata">

**Author:** ![John\_Scanlan](https://forum.xojo.com/user_avatar/forum.xojo.com/john_scanlan/32/472_2.png) [@John\_Scanlan](https://forum.xojo.com/u/John_Scanlan)\
**Post date:** [July 3, 2014, 3:45am UTC](https://forum.xojo.com/t/congratulations/17630/45 "2014-07-03T03:45:31Z")

</div>

You guys really don’t have enough to do.

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [July 3, 2014, 3:46am UTC](https://forum.xojo.com/t/congratulations/17630/46 "2014-07-03T03:46:46Z")

</div>

You still left the tea option out!!

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:47am UTC](https://forum.xojo.com/t/congratulations/17630/47 "2014-07-03T03:47:04Z")

</div>

I have, to sleep. Almost 1:00 AM.

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:47am UTC](https://forum.xojo.com/t/congratulations/17630/48 "2014-07-03T03:47:27Z")

</div>

> [@107312:@Richard Summers](#):
>
> You still left the tea option out!!

Just one minute!

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [July 3, 2014, 3:47am UTC](https://forum.xojo.com/t/congratulations/17630/49 "2014-07-03T03:47:56Z")

</div>

I don’t care about the time - I want my tea option!!!

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:48am UTC](https://forum.xojo.com/t/congratulations/17630/50 "2014-07-03T03:48:09Z")

</div>

```auto
Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.TeaPot)
Dim bv As new Beverage(BevType.Tea)
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
While me.developing()
  If mug.almostEmpty() Then // 0 - 10% left
    mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
  else
    me.drink(mug)
  End
  If pot.empty() Then
    bv = new Beverage(BevType.Tea)
    pot.prepare(bv)
  End
Wend
```

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [July 3, 2014, 3:50am UTC](https://forum.xojo.com/t/congratulations/17630/51 "2014-07-03T03:50:29Z")

</div>

What about if I don’t feel like tea, but want a cup of hot chocolate???

---

<div class="post-metadata">

**Author:** ![Bob\_Coleman](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@Bob\_Coleman](https://forum.xojo.com/u/Bob_Coleman)\
**Post date:** [July 3, 2014, 3:51am UTC](https://forum.xojo.com/t/congratulations/17630/52 "2014-07-03T03:51:39Z")

</div>

Then add it to the type.

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [July 3, 2014, 3:52am UTC](https://forum.xojo.com/t/congratulations/17630/53 "2014-07-03T03:52:46Z")

</div>

Could you add the possibility to dunk a biscuit???

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:55am UTC](https://forum.xojo.com/t/congratulations/17630/54 "2014-07-03T03:55:17Z")

</div>

You already played with MacOSLib, you are ready to implement “biscuit dunkers” by yourself.

---

<div class="post-metadata">

**Author:** ![Bob\_Coleman](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@Bob\_Coleman](https://forum.xojo.com/u/Bob_Coleman)\
**Post date:** [July 3, 2014, 3:56am UTC](https://forum.xojo.com/t/congratulations/17630/55 "2014-07-03T03:56:32Z")

</div>

> [@107322:@Richard Summers](#):
>
> Could you add the possibility to dunk a biscuit???

The source is about as open as you can get. Go to it.

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 3:57am UTC](https://forum.xojo.com/t/congratulations/17630/56 "2014-07-03T03:57:48Z")

</div>

Bye people, have a good night. 😉 (or whatever in your time zone)

---

<div class="post-metadata">

**Author:** ![Dana\_Brown](https://forum.xojo.com/user_avatar/forum.xojo.com/dana_brown/32/15210_2.png) [@Dana\_Brown](https://forum.xojo.com/u/Dana_Brown)\
**Post date:** [July 3, 2014, 12:20pm UTC](https://forum.xojo.com/t/congratulations/17630/57 "2014-07-03T12:20:13Z")

</div>

[quote=107317:@Rick Araujo]`
Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.TeaPot)
Dim bv As new Beverage(BevType.Tea)
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
While me.developing()
  If mug.almostEmpty() Then // 0 - 10% left
    mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
  else
    me.drink(mug)
  End
  If pot.empty() Then
    bv = new Beverage(BevType.Tea)
    pot.prepare(bv)
  End
Wend
`[/quote]  
I’m pretty sure I can’t fit all of this on a mug - maybe a Travel mug 🙂

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [July 3, 2014, 12:40pm UTC](https://forum.xojo.com/t/congratulations/17630/58 "2014-07-03T12:40:21Z")

</div>

I still want biscuit dunking capabilities built into that code!

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [July 3, 2014, 12:50pm UTC](https://forum.xojo.com/t/congratulations/17630/59 "2014-07-03T12:50:19Z")

</div>

Hey! Why the preference for the Tea version? That’s the exclusive Rich’s version (ask $10 extra bucks from him for the Tea series).

This version reduces coffee wasting at end. 🙂

```auto
Dim mug As new DrinkContainer(DrinkContainerType.Mug)
Dim pot As new PotContainer(PotType.CoffeePot)
Dim bv As new Beverage(BevType.Coffee) // Let's get some COFFEE!
pot.prepare(bv)
mug.fill(pot.serveBeverage(mug.capacity))
me.drink(mug)                 
While me.developing() // Xojo time!
  If pot.empty() Then
    bv = new Beverage(BevType.Coffee)
    pot.prepare(bv)
  End
  If mug.almostEmpty() Then // 0 - 10% left
    mug.fill(pot.serveBeverage(mug.capacity-mug.beverageLeft))
  else
    me.drink(mug)
  End
Wend // Snack time?
```

\*Note for a Tea version just change the words Coffee and COFFEE by Tea and TEA. 😛

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [July 3, 2014, 1:16pm UTC](https://forum.xojo.com/t/congratulations/17630/60 "2014-07-03T13:16:17Z")

</div>

And the biscuits???

[Previous page](https://forum.xojo.com/t/congratulations/17630.md?page=2)

[Next page](https://forum.xojo.com/t/congratulations/17630.md?page=4)
