# DefaultDesktopStarter won't compile

**URL:** <https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599>\
**Category:** General Programming\
**Created:** [9 July 2022 00:01 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599 "2022-07-09T00:01:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalu](https://ifnotnil.com/user_avatar/ifnotnil.com/dalu/32/1776_2.png) [@dalu](https://ifnotnil.com/u/dalu)\
**Post date:** [9 July 2022 00:01 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/1 "2022-07-09T00:01:11Z")

</div>

i have this bug when compiling DefaultDesktopStarter

![image](https://ifnotnil.com/uploads/default/original/2X/c/cd6def2f63cb4627d0008bc07a5ab752487cdb7b.png)

---

<div class="post-metadata">

**Author:** ![dalu](https://ifnotnil.com/user_avatar/ifnotnil.com/dalu/32/1776_2.png) [@dalu](https://ifnotnil.com/u/dalu)\
**Post date:** [9 July 2022 01:09 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/2 "2022-07-09T01:09:52Z")

</div>

on Xojo 2021 2.1

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [9 July 2022 04:00 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/3 "2022-07-09T04:00:10Z")

</div>

what default desktop starter ?

---

<div class="post-metadata">

**Author:** ![jmadren](https://ifnotnil.com/user_avatar/ifnotnil.com/jmadren/32/65_2.png) [@jmadren](https://ifnotnil.com/u/jmadren)\
**Post date:** [9 July 2022 11:56 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/4 "2022-07-09T11:56:59Z")

</div>

> [@npalardy](#):
>
> what default desktop starter ?

I assume it’s [yours](https://ifnotnil.com/t/updated-and-new-repos/2588) on Github.

---

<div class="post-metadata">

**Author:** ![dalu](https://ifnotnil.com/user_avatar/ifnotnil.com/dalu/32/1776_2.png) [@dalu](https://ifnotnil.com/u/dalu)\
**Post date:** [9 July 2022 13:40 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/5 "2022-07-09T13:40:32Z")

</div>

> **[GitHub - npalardy/DefaultDesktopStarter: a default starter app with TONS of...](https://github.com/npalardy/DefaultDesktopStarter)**
>
> a default starter app with TONS of useful stuff in it - GitHub - npalardy/DefaultDesktopStarter: a default starter app with TONS of useful stuff in it

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [9 July 2022 14:39 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/6 "2022-07-09T14:39:16Z")

</div>

what OS ?

---

<div class="post-metadata">

**Author:** ![dalu](https://ifnotnil.com/user_avatar/ifnotnil.com/dalu/32/1776_2.png) [@dalu](https://ifnotnil.com/u/dalu)\
**Post date:** [9 July 2022 14:40 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/7 "2022-07-09T14:40:00Z")

</div>

mac os big sur, sorry

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [10 July 2022 04:14 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/8 "2022-07-10T04:14:31Z")

</div>

OK so it Compiles & Runs (otherwise you’d never see that dialog)  
Its failing a unit test in the Preferences module

Try this

1. open the Preferences module
2. select RunUnitTests
3. change lines 32 - 44 to

```auto
If True Then
  Dim key As String = "testDate"
  Dim initial As date = New Date(2033, 01, 02, 03, 04, 05, 06)
  m_PrefsImplementation.WriteDate(key, initial )
  Dim result As Date = m_PrefsImplementation.ReadDate(key)
  // object comparison so have to compare total sedons or something else
  debug.Assert result.TotalSeconds = initial.TotalSeconds, CurrentMethodName + " " + key + " did not match wrote " + initial.SQLDateTime + " got " + result.SQLDateTime
  If m_PrefsImplementation.HasKey(key) Then
    m_PrefsImplementation.Remove(key)
  Else
    Break
  End If
End If

```

and run again

---

<div class="post-metadata">

**Author:** ![dalu](https://ifnotnil.com/user_avatar/ifnotnil.com/dalu/32/1776_2.png) [@dalu](https://ifnotnil.com/u/dalu)\
**Post date:** [10 July 2022 14:44 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/9 "2022-07-10T14:44:08Z")

</div>

i got this now

![image](https://ifnotnil.com/uploads/default/original/2X/1/160a0b4effb76e10486773df238cc9ef4fb0f308.png)

---

<div class="post-metadata">

**Author:** ![dalu](https://ifnotnil.com/user_avatar/ifnotnil.com/dalu/32/1776_2.png) [@dalu](https://ifnotnil.com/u/dalu)\
**Post date:** [10 July 2022 14:47 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/10 "2022-07-10T14:47:29Z")

</div>

if i replace with 2032 oki

```auto
If True Then
  Dim key As String = "testDate"
  Dim initial As date = New Date(2032, 01, 02, 03, 04, 05, 06)
  m_PrefsImplementation.WriteDate(key, initial )
  Dim result As Date = m_PrefsImplementation.ReadDate(key)
  // object comparison so have to compare total sedons or something else
  debug.Assert result.TotalSeconds = initial.TotalSeconds, CurrentMethodName + " " + key + " did not match wrote " + initial.SQLDateTime + " got " + result.SQLDateTime
  If m_PrefsImplementation.HasKey(key) Then
    m_PrefsImplementation.Remove(key)
  Else
    Break
  End If
End If

```

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [10 July 2022 15:40 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/11 "2022-07-10T15:40:17Z")

</div>

What the heck is magical about 2033  
That code literally just creates a date then saves it to and reads it back to be sure what it wrote it what it reads  
It almost looks like a roller date for the OLD date class (notice it WRITES 2033 but READS 2032)

---

<div class="post-metadata">

**Author:** ![ivan](https://ifnotnil.com/letter_avatar_proxy/v4/letter/i/df788c/32.png) [@ivan](https://ifnotnil.com/u/ivan)\
**Post date:** [10 July 2022 16:37 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/12 "2022-07-10T16:37:39Z")

</div>

There are some bugs on windows:  
 ![image](https://ifnotnil.com/uploads/default/original/2X/6/6d824c4cceb7f571323f2fec239e756ce7f378d4.png)

Did you forget to remove the ending marker befor the split?

In WindowsPrefs.Remove:  
 ![image](https://ifnotnil.com/uploads/default/original/2X/e/e678ab3b3b8446fc781b97f8f53d6b1ab44efffa.png)

```auto
Dim key As String = "FOOBAR"
debug.Assert m_PrefsImplementation.HasKey(key) = False, CurrentMethodName + "found " + key + " but should not have"
End If

```

That should be testing **False**?

![image](https://ifnotnil.com/uploads/default/original/2X/8/8aea7680c246495148a1c35e715411e0e61062b4.png)

Should be  
`reg.Delete(key)`  
Instead of  
`Dim b As Boolean = reg.Value(key).BooleanValue`

![image](https://ifnotnil.com/uploads/default/original/2X/f/f379e861cc0a515492ba691fc6cb82d6bf0c24dc.png)  
Xojo does not create a resources folder if you dont incluede at least one resource, so SpecialFolder.Resources returns Nil

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [10 July 2022 21:01 UTC](https://ifnotnil.com/t/defaultdesktopstarter-wont-compile/2599/13 "2022-07-10T21:01:41Z")

</div>

Theres LOTS of stuff not implemented for Windows or Linux

I said that when I posted the repo

> [@Updated and new repos](https://ifnotnil.com/t/updated-and-new-repos/2588):
>
> Updated the bevel button replacement as I had a bug reported (first one in 3 years) And posted a new repo - a “default starter for desktop projects” it contains a TON of code accumulated from forum posts and such over the years It IS highly Mac centric but additions are welcome

In other words  
create a new fork  
make your changes in your fork  
commit them  
and create pull request and I’ll get a notice to pull your changes into my repo

if you have fixes I’m all for incorporating them
