Hi Tim, thanks for my stubbornness, I’m a little newbie.
1)In “Methods” I added a new module called: “GetOpenText”
2)The code that I pasted inside this new module is this:
dim fn As FolderItem
Dim sType as New FileType
sType.Name = “text/” + ext
sType.MacType = “TEXT”
sType.Extensions = ext
fn = GetOpenFolderItem(sType)
Return fn
- On the “Inspector Panel” I putted this properties to the new module:
Method Name: GetOpenText
Parameters: ext As String
Scope: Public.
So I created a Window, and inside of It i made an action Button, with this code:
’ Set up and called like this:
dim f As FolderItem = GetOpenText(“csv”)
if f = nil then exit sub
dim c As new sbCSV
c.FileName = f
’ Accessing the filename will automatically load the CSV file.
’ The defaults are:
’ Delimiter = ,
’ TextDelimiter = "
’ Decimal = .
’
’ If you want to change these then do so BEFORE setting the folderitem. Like this:
dim c As new sbCSV
c.Delimiter = “;”
c.TextDelimiter = “'”
c.FileName = f
So when I run the program, it shows me that error:
This item does not exist
dim f As FolderItem = GetOpenText(“csv”)
Cant find a type with this name
dim c As new sbCSV
Cant find a type with this name
dim c As new sbCSV
What I’m doing wrong, Am I forgetting something?