DefaultDesktopStarter won't compile

i have this bug when compiling DefaultDesktopStarter

image

on Xojo 2021 2.1

what default desktop starter ?

I assume it’s yours on Github.

what OS ?

mac os big sur, sorry

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
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

i got this now

image

if i replace with 2032 oki

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

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)

There are some bugs on windows:
image

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

In WindowsPrefs.Remove:
image

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

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

image
Xojo does not create a resources folder if you dont incluede at least one resource, so SpecialFolder.Resources returns Nil

Theres LOTS of stuff not implemented for Windows or Linux

I said that when I posted the repo

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