I’m trying to convert code in "Designing a Recent Items Submenu, By Charles Yeomans " to what I use.
There is an older version of StrComp using this code:
Protected Function Equals(f as FolderItem, g as FolderItem) as Boolean
If f <> nil and g <> nil then
#if targetMacOS
Return (f.MacVRefNum = g.MacVRefNum) and (f.NativePath = g.NativePath) and (f.name = g.name)
#endif
#if targetWin32
Return StrComp(f.NativePath = g.NativePath, 0)
#endif
Else
Return false
End if
End Function
I want to convert it to simply:
Protected Function Equals(f as FolderItem, g as FolderItem) as Boolean
If f <> nil and g <> nil then
'#if targetMacOS
'Return (f.MacVRefNum = g.MacVRefNum) and (f.NativePath = g.NativePath) and (f.name = g.name)
'#endif
'#if targetWin32
Return StrComp(f.NativePath = g.NativePath, 0)
'#endif
Else
Return false
End if
End Function
but I get on error on StrComp of [quote]RecentItemsManager.Equals, line 6. Not enough arguments: missing String value for parameter “a”[/quote]
As far as I can tell everything is correct.
Can someone explain what is going on?