FolderItem errors

I’m trying to make an App property for a folderitem.

I created the property with the following
Name: myFolder
Type: FolderItem
Default: SpecialFolder.Documents.Child(“My Folder”)
scope: private

but when I try to run, I get an error that FolderItem requires more arguments than it was passed.

The property clearly shows it being recognized as
myFolder as FolderItem = SpecialFolder.Documents.Child(“My Folder”)

And if I use that line as is in a regular method, it has no problem, but put it in a property and Xojo has a conniption.

I tried changing the scope to public or protected and made no difference.

Am I not allowed to use FolderItem in a property?

Remove the default value
You can set it to be the result of a method call (which is what SpecialFolder.Document.Child is)

OR make it a read only computed property
Create a new computed property
empty out any code in the SET
In the GET put the following

return  SpecialFolder.Documents.Child("My Folder")

That Worked!

So can regular properties only handle static values then?
And not returned values?

Regular property default values can not be initialized with a function call result
It has to be a literal or constant

Workaround for that: call a function in the Constructor, and assign the returned value to the property.

I ended up just leaving it as a regular property with a blank value, then assigning it in the apps open event.