Product |
Resource Manager |
Manufacturer |
Standard Satellite Forms component |
Website |
|
Source code provided |
Yes |
Platform |
PalmOS |
Sample project(s) |
Resource, View It! |
Keywords |
resource |
NOTE: This extension is not supported on PalmOS 5 devices.
The Resource Manager extension gives the developer full access to the Palm OS(R) resources and their databases.
Parameters
mode:
1 - Read-only
2 - Write-only
4 - Leave database open after application closes (4 Does not seem to work)
8 - Don't let anyone else open this database
16 - Show records marked private
All other modes are combinations of the above (sums of the above numbers).
Info_to_Return:
0 - Return resource ID
1 - Return local resource ID
See the Palm Developer Knowledgebase entry on the Resource Manager for more information on how to use resources.
Scripts API
The following methods are accessible from the scripting language. Note that these are all public methods except for the About() method.
Usage: [Name of method]
Example of usage: RM_OpenDatabase (Name, Card_No, mode)
About()
Private method that shows the extension's about box.
RM_AttachCurrentResource()
Attach current resource to database. Returns 0 if successfull and an error manager number if it fails.
RM_CloseDatabase()
Closes the current database. Returns 0 if successfull and an error manager number if it fails.
RM_DetachResource()
Detaches resource and stores current pointer. Returns 0 if successfull and an error manager number if it fails.
RM_DetachedResToCurRes()
Moves the detached resource to the current resource.
RM_FindResource(string, integer)
Finds the current resource by resource Type and ID. Example of usage: RM_Find(ResType, ResourceID).
RM_FindResourceByIndex(string, integer)
Searches for the resource by type and index number. Example of usage: RM_FindResourceByIndex(ResType, ResourceIndex).
RM_GetLastErrorNumber()
Returns the last error manager number returned.
RM_GetResource(string, integer)
Grabs the resource using type and ID. Example of usage: RM_GetResource(ResType, ResourceID).
RM_GetResourceByIndex(integer)
Grabs resource by its index alone. Example of usage: RM_GetResourceByIndex(ResourceIndex).
RM_Get1Resource(string, integer)
Grabs the resource from the most currently opened database. Example of usage: RM_Get1Resource(ResType, ResourceID).
RM_LockRes()
Locks the current resource in memory. Use in conjunction with RM_UnlockRes().
RM_NewResource(string, integer, integer)
Add new resource to the open database. Example of usage: RM_NewResource(ResType, ResourceID, Size).
RM_NumResource()
Returns the number of resources in the current database.
RM_OpenDatabase( string, integer, integer )
Open the resource database. Example of usage: RM_OpenDatabase(Name, Card_No, mode).
RM_OpenDBNoOverlay( string, integer, integer )
Open the database with no modifications to the overlay. Same as RM_OpenDatabase. OS 3.5 only.
RM_PassResPtr()
Returns a pointer to the memory chunk of a locked resource.
RM_ReleaseResource()
Releases current resource. Returns 0 if successfull and an error manager number if it fails.
RM_RemoveResource(integer)
Removes the current resource from the current database. Example of usage: RM_RemoveResource(ResourceIndex). Returns 0 if this method is successful and an error manager number if it fails.
RM_ResizeResource(integer)
Resizes the current resource. Example of usage: RM_ResizeResource(Size).
RM_ResourceInfo(integer, integer )
Returns information about the resource. Example of usage: ResourceValue = RM_ResourceInfo(ResourceIndex, Info_to_Return).
RM_ResTypeInfo(integer)
Gets the resource type. Example of usage: RM_ResTypeInfo(ResourceIndex).
RM_SearchResource(string, integer)
Searches for a resource by type and local ID. Example of usage: RM_SearchResource(ResType, ResourceID).
RM_SetResourceInfo()
Sets the resource info for the current resource. Returns 0 if successfull and an error manager number if it fails.
RM_UnlockRes()
Unlocks the current resource. Use only after using RM_LockRes.
DocID: 10146 DocDate: 2005-07-18