Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

ResourceForkMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Files MBS MacClassic Plugin 13.0 Yes No No Yes, macOS only No
Function: This class is for reading/writing resource forks on Mac.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rsrc")
dim r as ResourceForkMBS = ResourceForkMBS.Create(f)

r.AddResource "Hello World", "TEXT", 128, "just a test"
Notes:
It is a replacement for ResourceFork class in Real Studio which has been removed for Cocoa and Console targets in Real Studio version 2012r2.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Feedback, Comments & Corrections

  • 11 properties
  • 15 methods
    • method AddResource(Data as Memoryblock, ResourceType as String, ID as Integer, Name as String)
    • method AddResource(Data as String, ResourceType as String, ID as Integer, Name as String)
    • method Close
    • method Constructor
    • method GetIndResource(ResourceType as String, index as Integer) As String
    • method GetNamedResource(ResourceType as String, Name as String) As String
    • method GetResource(ResourceType as String, ID as Integer) As String
    • method GetResourceMemory(ResourceType as String, ID as Integer) As Memoryblock
    • method RemoveResource(ResourceType as String, ID as Integer)
    • method ResourceCount(ResourceType as String) as Integer
    • method ResourceID(ResourceType as String, index as Integer) as Integer
    • method ResourceName(ResourceType as String, index as Integer) As String
    • method ResourceSizeOnDisk(ResourceType as String, ID as Integer) as Integer
    • method ResourceType(index as Integer) As String
    • method UniqueID(ResourceType as String) as Integer
  • 2 shared methods
    • shared method Create(file as folderitem, UseDataFork as boolean = false) as ResourceForkMBS
    • shared method Open(file as folderitem, Write as boolean, UseDataFork as boolean = false) as ResourceForkMBS

This class has no sub classes.

Some examples which use this class:


The items on this page are in the following plugins: MBS MacClassic Plugin.


ResolutionMBS   -   ResStreamMBS




Links
MBS Xojo Chart Plugins