Platforms to show: All Mac Windows Linux Cross-Platform
folderitem.isBundleMBS as boolean
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether the folderitem points to a bundle.
Notes:
Returns true if the folderitem points to a directory which is a bundle/package.
For example an application package (.app).
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Whether the folderitem points to a bundle.
Notes:
Returns true if the folderitem points to a directory which is a bundle/package.
For example an application package (.app).
Some examples which use this method:
folderitem.LaunchServicesApplicationForItemMBS(role as integer) as folderitem
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Return the application used to open an item.
Example:
Notes:
Consults the binding tables to return the application that would be used to open the folderitem if it were double-clicked in the Finder. This application will be the user-specified override if appropriate or the default otherwise. If no application is known to LaunchServices suitable for opening this item, nil (kLSApplicationNotFoundErr) will be returned.
Constants you can use for the role parameter:
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Return the application used to open an item.
Example:
dim f as FolderItem
f=GetFolderItem("itunes.tiff")
MsgBox f.LaunchServicesApplicationForItemMBS(-1).name
Consults the binding tables to return the application that would be used to open the folderitem if it were double-clicked in the Finder. This application will be the user-specified override if appropriate or the default otherwise. If no application is known to LaunchServices suitable for opening this item, nil (kLSApplicationNotFoundErr) will be returned.
Constants you can use for the role parameter:
| kLSRolesNone | = 1 | no claim is made about support for this type/scheme |
| kLSRolesViewer | = 2 | claim to be able to view this type/scheme |
| kLSRolesEditor | = 4 | claim to be able to edit this type/scheme |
| kLSRolesAll | = -1 | claim to do it all |
folderitem.LaunchServicesApplicationsForItemMBS(role as integer) as LaunchServicesApplicationListMBS
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServicesCF), class folderitem, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns a list of folderitems to applications that offer the requested role(s) for the input item.
Example:
Notes:
Requires Mac OS X 10.3.
If the folderitem is a file reference, it is treated as a document, and applications are selected based on the document's type information. Otherwise, applications are selected based on the folderitem's scheme.
Role:
The role(s) which must intersect with the role provided by an application for the specified item in order for the application to be included in the result. Pass kLSRolesAll if any role is acceptable.
Constants you can use for the role parameter:
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServicesCF), class folderitem, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Returns a list of folderitems to applications that offer the requested role(s) for the input item.
Example:
dim l as LaunchServicesApplicationListMBS
dim f as FolderItem
f=GetFolderItem("text file")
l=f.LaunchServicesApplicationsForItemMBS(4)
if l<>nil then
MsgBox str(l.Count)
MsgBox l.Item(0).AbsolutePath
end if
Requires Mac OS X 10.3.
If the folderitem is a file reference, it is treated as a document, and applications are selected based on the document's type information. Otherwise, applications are selected based on the folderitem's scheme.
Role:
The role(s) which must intersect with the role provided by an application for the specified item in order for the application to be included in the result. Pass kLSRolesAll if any role is acceptable.
Constants you can use for the role parameter:
| kLSRolesNone | = 1 | no claim is made about support for this type/scheme |
| kLSRolesViewer | = 2 | claim to be able to view this type/scheme |
| kLSRolesEditor | = 4 | claim to be able to edit this type/scheme |
| kLSRolesAll | = -1 | claim to do it all |
folderitem.LaunchServicesCanApplicationAcceptItemMBS(TargetApp as folderitem, role as integer, flags as integer) as boolean
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Determine whether an item can accept another item.
Example:
Notes:
Returns whether TargetApp can accept this folderitem as in a drag and drop operation. If role is other than kLSRolesAll then make sure TargetApp claims to fulfill the requested role.
Constants you can use for the role parameter:
Values for the flags:
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Determine whether an item can accept another item.
Example:
dim appl,item as FolderItem
appl=LaunchServicesApplicationForInfoMBS("","","rb",-1)
item=GetFolderItem("file.rb")
MsgBox appl.Name
if item.LaunchServicesCanApplicationAcceptItemMBS(appl,-1,1) then
MsgBox "accept"
else
MsgBox "not accepted"
end if
Returns whether TargetApp can accept this folderitem as in a drag and drop operation. If role is other than kLSRolesAll then make sure TargetApp claims to fulfill the requested role.
Constants you can use for the role parameter:
| kLSRolesNone | = 1 | no claim is made about support for this type/scheme |
| kLSRolesViewer | = 2 | claim to be able to view this type/scheme |
| kLSRolesEditor | = 4 | claim to be able to edit this type/scheme |
| kLSRolesAll | = -1 | claim to do it all |
Values for the flags:
| kLSAcceptDefault | = 1 | |
| kLSAcceptAllowLoginUI | = 2 | show UI to log in if necessary |
folderitem.LaunchServicesDisplayNameMBS as string
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Get the display name for a folderitem.
Notes: Return a copy of the display name for a folderitem. Takes into consideration whether this item has a hidden extension or not.
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Get the display name for a folderitem.
Notes: Return a copy of the display name for a folderitem. Takes into consideration whether this item has a hidden extension or not.
folderitem.LaunchServicesItemInfoMBS(WhichInfo as integer) as LaunchServicesItemInfoMBS
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Return information about an item.
Example:
Notes:
Returns as much or as little information as requested about the folderitem. Some information is available in a thread-safe manner, some is not.
Possible values you can combine for the WhichInfo parameter:
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Return information about an item.
Example:
dim l as LaunchServicesItemInfoMBS
dim f as FolderItem
f=SpecialFolder.Applications.Child("Mail.app")
l=f.LaunchServicesItemInfoMBS(-1)
if l.IsApplication then // True for mail.app
MsgBox "is Application"
end if
if l.IsContainer then // True for mail.app
MsgBox "is Container"
end if
if l.IsPackage then // True for mail.app
MsgBox "is Package"
end if
Returns as much or as little information as requested about the folderitem. Some information is available in a thread-safe manner, some is not.
Possible values you can combine for the WhichInfo parameter:
| kLSRequestExtension | = &h01 | Requests the item’s filename extension. |
| kLSRequestTypeCreator | = &h02 | Requests the item’s file type and creator signature. |
| kLSRequestBasicFlagsOnly | = &h04 | Requests all item-information flags that are not application-specific: that is, all except IsNativeApp, IsClassicApp, AppPrefersNative, AppPrefersClassic and AppIsScriptable. |
| kLSRequestAppTypeFlags | = &h08 | Requests all application-specific item-information flags: that is, IsNativeApp, IsClassicApp, AppPrefersNative, AppPrefersClassic and AppIsScriptable. |
| kLSRequestAllFlags | = &h10 | Requests all item-information flags. |
| kLSRequestIconAndKind | = &h20 | Not used. |
| kLSRequestExtensionFlagsOnly | = &h40 | Requests only the kLSItemInfoExtensionIsHidden item-information flag. |
| kLSRequestAllInfo | = -1 |
Some examples which use this method:
folderitem.LaunchServicesKindStringMBS as string
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Get the kind string for an item.
Notes: Returns the kind string as used in the Finder and elsewhere for the given folderitem.
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Get the kind string for an item.
Notes: Returns the kind string as used in the Finder and elsewhere for the given folderitem.
folderitem.LaunchServicesOpenMBS as folderitem
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Launches the given item.
Notes: Returns the file or folder which was launched, e.g. the application for a file.
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServices), class folderitem, Console safe, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: Launches the given item.
Notes: Returns the file or folder which was launched, e.g. the application for a file.
folderitem.LaunchServicesRegisterMBS(update as boolean) as integer
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServicesCF), class folderitem, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: If the specified folderitem refers to an application or other bundle claiming to handle documents or URLs, add the bundle's document and URL claims to the Launch Services database.
Notes:
Requires Mac OS X 10.3.
Update: When false, LaunchServicesRegisterMBS does not register the item if it has already been registered and the current modification date of the item has not changed from when it was last registered. When true, the item's registered info is updated, even if the modification has not changed.
Returns an error code:
An OSStatus value: noErr (0) - Success kLSNoRegistrationInfoErr (-10824) - The item does not contain info requiring registration kLSDataErr (-10817) - The item's property list info is malformed.
Returns -1 if the function is not available.
method, Launch Services, MBS REALbasic MacOSX Plugin (LaunchServicesCF), class folderitem, Console safe, Plugin version: 3.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: If the specified folderitem refers to an application or other bundle claiming to handle documents or URLs, add the bundle's document and URL claims to the Launch Services database.
Notes:
Requires Mac OS X 10.3.
Update: When false, LaunchServicesRegisterMBS does not register the item if it has already been registered and the current modification date of the item has not changed from when it was last registered. When true, the item's registered info is updated, even if the modification has not changed.
Returns an error code:
An OSStatus value: noErr (0) - Success kLSNoRegistrationInfoErr (-10824) - The item does not contain info requiring registration kLSDataErr (-10817) - The item's property list info is malformed.
Returns -1 if the function is not available.
The items on this page are in the following plugins: MBS REALbasic MacOSX Plugin.
Links
MBS Realbasic PDF Plugins - Pfarrgemeinde Ministranten Nickenich