Filetypes

  1. 2 weeks ago

    Dave S

    Oct 11 San Diego, California USA

    why are these so freaking confusing?
    I had a filetype that worked back in Xojo2014
    then somewhere along the line the IDE dialog for entering Filetypes changed..... and now what I had no longer works

    I want to be able to select a XOJO VCP project file ... however this no longer works (file remains grayed out)

    • Display Name : Xojo VCP Project
    • Description : <blank>
    • UTI Identifier : com.sisemore.projectname
    • Conforms to : <blank>
    • Extensions : .xojo_project;.rbvcp
    • Mime Type : <blank>
    • OS Types : <blank>
    • UTI Type : Imported

    Note : removing the periods in Extensions did nothing

    when you import one from some other application (the other app defines it - in this case the one for Xojo project & realbasic projects) you need to mimic the information that other application has

    However you might need 2 entries because the IDE defines 2 UTIs (different extensions)

    1) UTI = com.xojo.project.legacytextproject
    extension = .rbvcp
    OStype = RBVC
    conforms to = public.plain-text, com.xojo.project

    2) UTI = com.xojo.project.text
    extension = .xojo_project
    OStype = RBVC
    conforms to = public.plain-text, com.xojo.project

  2. Norman P

    Oct 11 Xojo Inc

    If its imported you should import the correct UTI - not one you invent

    you ONLY invent a new name when you EXPORT one

  3. Dave S

    Oct 11 San Diego, California USA

    I'm sorry Norman, but I have no idea what you just said.....
    The information I entered above, was what I saw in the NEW Filetype dialog..... which means Xojo CREATED it from the original project file.... *I* created the original Filetype in a much earlier version (when life was "simple")

    Please indicate what the correct information should be, as the LR is rather vague

  4. Norman P

    Oct 11 Xojo Inc Answer

    when you import one from some other application (the other app defines it - in this case the one for Xojo project & realbasic projects) you need to mimic the information that other application has

    However you might need 2 entries because the IDE defines 2 UTIs (different extensions)

    1) UTI = com.xojo.project.legacytextproject
    extension = .rbvcp
    OStype = RBVC
    conforms to = public.plain-text, com.xojo.project

    2) UTI = com.xojo.project.text
    extension = .xojo_project
    OStype = RBVC
    conforms to = public.plain-text, com.xojo.project

  5. Dave S

    Oct 11 San Diego, California USA

    Still have no idea how you came up with most of that.... but it did work.. Thank you

  6. Norman P

    Oct 11 Xojo Inc

    A quick HOW TO :P

    if you want to IMPORT one from another app it definitely helps to have the other app available (its kind of required in a lot of cases)
    You CAN open its plist if you definitely need to and peek at the plists Exported Type UTI's in Xcodes plist editor
    And since you can use find to find text in any of the fields in the UTI you can search for the extension, name, etc

    Apple has a list of common ones on their web site
    https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html

    And once you get things set up you can use mdls <filename> to see IF you have things set up right
    Or to examine the attributes of the file to see what known UTI it conforms to etc
    For instance, on my machine, the IDE project file gives the following and you can see that the "kMDItemContentType" tells you what UTI and "kMDItemContentTypeTree " the content hierarchy it is in
    - yes the IDE is still a rbvcp project since it would require a pile of unnecessary svn moves etc to change it for no real benefit -

    server:~ npalardy$ mdls IDE.rbvcp 
    _kMDItemOwnerUserID            = 501
    kMDItemContentCreationDate     = 2017-10-12 01:13:25 +0000
    kMDItemContentModificationDate = 2017-10-12 01:13:25 +0000
    kMDItemContentType             = "com.realsoftware.realstudio.plain-text-project"
    kMDItemContentTypeTree         = (
        "com.realsoftware.realstudio.plain-text-project",
        "public.plain-text",
        "public.text",
        "public.data",
        "public.item",
        "public.content"
    )
    kMDItemDateAdded               = 2017-10-12 01:13:25 +0000
    kMDItemDisplayName             = "IDE.rbvcp"
    kMDItemFSContentChangeDate     = 2017-10-12 01:13:25 +0000
    kMDItemFSCreationDate          = 2017-10-12 01:13:25 +0000
    kMDItemFSCreatorCode           = ""
    kMDItemFSFinderFlags           = 0
    kMDItemFSHasCustomIcon         = (null)
    kMDItemFSInvisible             = 0
    kMDItemFSIsExtensionHidden     = 0
    kMDItemFSIsStationery          = (null)
    kMDItemFSLabel                 = 0
    kMDItemFSName                  = "IDE.rbvcp"
    kMDItemFSNodeCount             = (null)
    kMDItemFSOwnerGroupID          = 20
    kMDItemFSOwnerUserID           = 501
    kMDItemFSSize                  = 140670
    kMDItemFSTypeCode              = ""
    kMDItemKind                    = "REAL Studio Project"
    kMDItemLogicalSize             = 140670
    kMDItemPhysicalSize            = 143360
    

    mdls is a handy UTI debugging tool along with lsregister

or Sign Up to reply!