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
10 Likes
Thanks Norman,
Just downloaded to see what I can use in the future. There is one line of code needing change.
In Preferences module FontandColorTheme class asXML method the line
Strings.append MakeEntry( nameOf(Members.CodeEditorFont), str(CodeEditorFont ) )
should be
Strings.append MakeEntry( nameOf(Members.CodeEditorFont), CodeEditorFont )
Ah Str on a string wont hurt it
its as if Str( string ) is coded as
if input_parameter isa string
return input_parameter
end if
Using Xojo 2022 r1.1 on MacOS Catalina I get an error when I try to run. Says “Parameter “value” expects type String, but this is type Int32”
thats exactly may set up and I dont
I guess the Alberta air is different than the Ontario air. This problem is way above my pay grade.
No idea as in an empty project this complies & runs
Dim s As String = "123"
Dim s1 As String = Str(s)
nevertheless I have made that tiny change and committed it so the repository is updated
Also doesn’t run in windows.

You have double 0 at the end of the string you build which is reassembled differently in the split. You’ll need to drop the additional 0 from the write and the last entry of the split from the read.
Not really sure why you are string building with 0’s when you can go via a wstring which does this for you.
All this in WriteStringArray:
Dim value As String
For i As Integer = 0 To arr.Ubound
If i > 0 Then
value = value + ChrB(0)
End If
value = value + arr(i)
Next
value = value + ChrB(0) + ChrB(0)
Dim mbValue As memoryblock = value
reg.Value(key) = mbValue
can be replaced with
Dim value As String
For Each s As String In arr()
value = value + CType(s, WString)
Next s
reg.Value(key) = CType(value, MemoryBlock)
then don’t forget to drop the last entry of the split on the read.
Here’s a perfect opportunity to submit fixes to something useful to a lot of people
Fork repo
Make fixes
Commit them
Submit pull request and I’ll merge your changes
2 Likes