Xojo and nil arrays

Xojo can return arrays from method calls like

Function foo() as String()

Now what happens if you leave such a function without a return statement ?
Xojo will happily return a NIL array – not one that has no members but one that IS NIL

For instance, if you create the function as

Function foo() as string()
End Function

and then call it later like

dim arr() as string = foo
break

The debugger will show you that arr is NIL; not a valid array with no elements (some Xojo documentation conflates these two things but they are NOT the same)

If your code was

dim arr() as string = foo
arr.append
Read the rest

Whee !!!!!!!

In the last 2 years I’ve taken up golf more seriously than ever before. Like so many others I’ve played an occasional game here and there for many years but there have been very long stretches between where I played none at all.

Two years ago my wife got me a membership at a local course & I decided that in order to make it worth while I had to play at least 20 times.… Read the rest

Screen madness

Well I’ve narrowed my issue down to DISPLAY SLEEP

If I set my monitors to NEVER sleep and only run the screen saver than my monitor madness doesnt happen

So something about letting them sleep screws thing sup to the point when I log back in it can take up to 10 minutes for me to get them, back under control

Xattrs

Lord I hate these things

So here’s a little droplet, in AppleScript, to remove them

Yes I thought about writing it in something else
But the AppleScript is 213 K and just about everything else would be quite a bit larger

Some, many megabytes

The ENTIRE text is as follows


-- This droplet processes files dropped onto the applet 
on open these_items
  repeat with i from 1 to the count of these_items
    set this_item to item i of these_items
    set the item_info to info for this_item
    if folder of the item_info is true then
      process_folder(this_item)
    else
      try
        set this_extension to the name extension of item_info
      on error
        set this_extension to ""
      end try
      try
        set this_filetype to the file type of item_info
      on error
        set this_filetype to ""
      end try
      try
        set this_typeID to the type identifier of item_info
      on error
        set this_typeID to ""
      end try
      if (folder of the item_info is false) and (package folder of the item_info is false) and (alias of the item_info is false) then
        process_file(this_item)
      end if
    end if
  end repeat
end open

-- this sub-routine processes folders 
on process_folder(this_folder)
  set these_items to list folder this_folder without invisibles
  repeat with i from 1 to the count of these_items
    set this_item to alias ((this_folder as Unicode text) & (item i of these_items))
    set the item_info to info for this_item
    if folder of the item_info is true then
      process_folder(this_item)
    else
      try
        set this_extension to the name extension of item_info
      on error
        set this_extension to ""
      end try
      try
        set this_filetype to the file type of item_info
      on error
        set this_filetype to ""
      end try
      try
        set this_typeID to the type identifier of item_info
      on error
        set this_typeID to ""
      end try
      if (folder of the item_info is false) and (package folder of the item_info is false) and (alias of the item_info is false) then
        process_file(this_item)
      end if
    end if
  end repeat
end process_folder

-- this sub-routine processes files 
on process_file(this_item)
  -- NOTE that during execution, the variable this_item contains a file reference in alias format to the item passed into this sub-routine
  -- FILE PROCESSING STATEMENTS GO HERE
  set thePathToFile to POSIX path of this_item
  log thePathToFile
  
  set theresult to do shell script "/usr/bin/xattr \"" & thePathToFile & "\"" as text
  --  log theresult
  
  set theParagraphs to paragraphs of theresult
  repeat with i from 1 to length of theParagraphs
    set theCurrentListItem to item i of theParagraphs
    -- Process the current list item
    -- log " line" & (i as text) & " = [" & theCurrentListItem & "]"
    
    do shell script "/usr/bin/xattr -d " & theCurrentListItem & " \"" & thePathToFile & "\""
    
  end repeat
  
end process_file


One year on

When we started 2023 Xojo had
– 2013 open bug reports
– 25516 closed bug reports
– 4203 archived bug reports
– 11.62 average daily # of new reports
and the fist public case # I could find was 71329

As of Jan 1, 2024 there are
– 2280 open bug reports (an increase of 267 – up 13%)
– 26686 closed bug reports (an increase of 1170 – up 4%)
– 4284 archived bug reports (an increase of 81 – up 2%)
– 11.05 average daily # of new reports
and the fist public case # I could find was 75266 (up 3937 – up 5%)

With each release through the year more reports and bugs were filed than fixed meaning Xojo slowly fell further & further behind fixing issues.… Read the rest

C# on the mac

Well there’s a bummer

MS is ceasing development of VS on macOS

Too bad

And some would have you believe that this is the end of C# on macOS.

Not true
Unlike other proprietary tools that have a single IDE & compiler from one company C# has alternatives that can read & write VS projects and compile them on the Mac.… Read the rest

One year later

A little over a year ago Xojo switched to using a new issue tracker
IMHO this was a good move.

Not only does it seem to be more capable it lets them quit spending time on something they can buy and just use the heck out of. It lets them focus on their core product rather than ancillary things like bug trackers.… Read the rest

Enum Extender updated

In the increasingly badly named Enum Extender project I’ve added a way to take a bunch of text defining properties and make it possible to paste into the IDE

see this conversation for why

Now a bunch of text like

Public setting_Username As String
Public setting_Password As String
Public setting_PortNumber As Integer
Public setting_HostName As String
Public setting_MaxConnections As Integer

can be put into Enum Extender and it will set the correct pastable data onto the clipboard

See the new Property Paster window in the project

*NB : at this time the app does not accept

Public Property setting_Username As String

the PROPERTY word is NOT actually correct

An update soon will fix this