View Full Version : Palm - handle isilo doc launching
prion
06-19-2004, 06:24 AM
I am working on an isilo document launcher kind of app for use on palm os, using the following function :
//-------------------------------------------
// The launchiSiloFileByName function
//-------------------------------------------
#define kiSiloAppCreator 'Silo'
#define kiSiloDocCreator 'SilX'
#define kiSiloDataBaseType 'SDoc'
void launchiSiloFileByName(char *databaseName)
{
Err error = errNone;
DmSearchStateType searchState;
UInt16 appCard, movieCard;
LocalID appID, movieID;
Boolean firstTime;
SysAppLaunchCmdOpenDBType *launchInfo;
// find the iSilo application
error = DmGetNextDatabaseByTypeCreator(true, &searchState,
sysFileTApplication, kiSiloAppCreator, true,
&appCard, &appID);
if (errNone != error) return;
// find the Kinoma movie with the requested name
firstTime = true;
while (true) {
char thisName[128];
error = DmGetNextDatabaseByTypeCreator(firstTime, &searchState,
kiSiloDataBaseType, kiSiloDocCreator, false,
&movieCard, &movieID);
if (errNone != error) return;
error = DmDatabaseInfo(movieCard, movieID, thisName, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
if (errNone != error) return;
if (0 == StrCaselessCompare(databaseName, thisName))
break;
firstTime = false;
}
// launch the application with the selected database
launchInfo = (SysAppLaunchCmdOpenDBType *)
MemPtrNew(sizeof(SysAppLaunchCmdOpenDBType));
if (NULL == launchInfo) return;
MemPtrSetOwner((MemPtr)launchInfo, 0); // SysUIAppSwitch will dispose
launchInfo->cardNo = movieCard;
launchInfo->dbID = movieID;
error = SysUIAppSwitch(appCard, appID, sysAppLaunchCmdOpenDB, launchInfo);
if (errNone != error) return;
}
It works very well for documents in RAM, but palm os doesn't have any function that handles launching pdb's from an expansion card.
Kinoma explains in a technote (http://www.kinoma.com/technote01.html, second part) how to do this with kinoma player for palm os. However, they have defined a sysAppLaunchCmdCustomBase in the player to handle this type of launching.
=> Does such a function exist in iSilo? If so, is it publicly available ? If not, would it be possible to write it ?
Thanks for your consideration,
P
iSilo
06-19-2004, 10:38 AM
The capability to launch iSilo to open a document from a VFS volume does not yet exist, but is under consideration for a future version.
dserrano
08-06-2004, 09:27 AM
Hi, the last post clearly states there's no support to launch a document from a VFS store, but I'd like to know if there's support for the SysAppLaunchCmdOpenDBType to open a specific pdb document. In essence all I want to know is if I can launch iSilo from my application directly to a specific document in full screen. Is something like that achievable ?
Thanks,
Daniel Serrano
iSilo
08-06-2004, 10:12 AM
iSilo supports sysAppLaunchCmdOpenDB for opening a document located in the internal storage memory.
prion
08-24-2004, 04:25 AM
Any news on wether this function (launching documents from VFS) will make it into a future iSilo version ? An ETA ?
Montalvo
08-24-2004, 10:52 AM
I can do it!
(This is an alternative way to do it *without* writting a special program for that).
I use LauncherX. Launcher X can create individual entries for each iSilo document located in a particular folder into the SD/MMC card.
1. In LauncherX, create a new category.
2. Go into LauncherX preferences and specify iSilo as your DOC reader, also checkmark [v]iSilo (one line below on the screen).
** My iSilo app lives on the SD card also, so it's the same if it is on RAM or in FLASH or in SD.
3. On the same screen, press on the "Memory Card" button. This let's you specify the "Document Search Paths" that LauncherX will use to get the documents. I storage all my iSilo docs in "/Palm/Programs/iSilo/", so this is the path that I added to this list.
**To put your iSilo docs into the card, you can use "iSiloX: Destination - HotSync - Path". Into iSiloX, go to DESTINATION, then press on HOTSYNC, then select your HOTSYNC USER, then check on PATH, and specify the path where your iSilo docs will be. For example you can use:
macaco://palm/programs/isilo/
[!] Note the double slash after the hotsync_username (for this example, "macaco"). This means "on the first available card". You can specify the name of the card if you want it. Check on the help of iSiloX.
4. After that, LauncherX will "scan" the paths specified, and all your iSilo documents will appear as icons. You can customize this more: change the settings of the new tab (category) and set it as "List view" with "Use 1 app column", to get the following configuration:
http://tupalmx.com/media/20040824_001.jpg
** Did you see the small blue icon to the right of the iSilo icon? That means this document is located on the SD/MMC card.
Please note that if you have a lot of documents, all those documents will appear as icons. I suggest you to move to another category (you can set it as hidden in LauncherX) all those documents that you DONT read so often... or to use a special folder on your SD card to just those special-and-everyday docs, and just specify this path (as noted in step 3).
I hope this tip work for you as good as it works for me!
iSilo is a GREAT reader doc, my favorite since many years, and the only one that I always recommend to my readers and customers. LauncherX is the creation (should I say "legacy"?) of Bozidar Benc, who past away recently in a car accident... and the combination of both programs, working as a team, is just one of those sparks of genuine genius... at least for me.
- - -
For a lot of tutorials of iSilo and iSiloX, visit http://tupalmx.com
TuPalMX is a source of tips and information for spanish-speaking PalmOS users, since 2002. Recently, PalmOne includes us into their "Solutions Guide". Just use the small QuickSearch form (BusquedaRapida), and use "isilo" or "isilox" as your keywords.
iSilo
09-06-2004, 02:52 PM
Version 4.15, which has just entered the beta1 (http://forum.isilo.com/showthread.php?t=626) test stage, adds support for a launch code for having iSilo start and open a file located on VFS media. Following is the definition of the new launch code and the parameter block to pass:
#define iSiloAppLaunchCmdOpenVFS sysAppLaunchCmdCustomBase // 0x8000
typedef struct
{
UInt16 uStructSize; // sizeof(iSiloAppLaunchCmdOpenVFSType)
UInt16 uVolRefNum; // Volume reference number
Char szPath[256]; // Max 255 chars plus zero-terminator
} iSiloAppLaunchCmdOpenVFSType;
aschechtman
09-21-2004, 05:26 PM
A add-in launcher application for iSilo documents could be very useful for publishers. Here are features I think would be important in a stand-alone app:
Free-standing .prc file that could be installed simultaneously with iSilo.prc and iSilodocument.pdb
Ability to associate a customized icon with a specific iSilo document and have this compiled into a single .prc file
Ability to find and launch specified iSilo doc regardless of location on PDA (main memory or expansion card)
Bonus: PPC version available too.
It seems like this should be a simple program to develop but I'm no programmer. If anyone has developed something that can do this or feels they could, I'd be interested in hearing from them.
Regards,
Andrew Schechtman, M.D.
aschechtman@meistermed.com
jeremielariviere
09-22-2004, 10:59 AM
A add-in launcher application for iSilo documents could be very useful for publishers.
<snip>
Regards,
Andrew Schechtman, M.D.
aschechtman@meistermed.com
LauncherX can launch iSilo documents, you can go to Preferences, check iSilo; if you store them on a memory card, and add the folder where you store documents on the memory card.
Any iSilo document in memory will show up, and will be launched if clicked on.
Jeremie
aschechtman
09-22-2004, 11:16 AM
Thanks for the suggestion to use a standard launcher but using an off-the-shelf launcher program has a number of drawbacks:
1. Too much overhead for one simple task
- added expense for every iSilo user who wants to do this
- added installation hassles and troubleshooting for a complicated launcher app
- many users (espec. newbies) would be confused by all the extra functions available and would give up rather than figure it out.
- memory requirements larger than a single-function iSilo launcher
2. Inability to create a customized icon
An optimal solution would involve a low-profile, simple, single-function launcher that is invisible to the end-user after installing the .prc.
Andrew
prion
11-03-2004, 10:39 AM
Thank you very much, iSilo development team, for adding this function !
I have played around with the code. I am somewhat new to palm os programming, limited C / C++ experience... so I am having a little trouble. The function works, but is very erratic. Probably something to do with my code. The function launches iSilo correctly, but doesn't always load the document, i.e. it stays on the document list from time to time. I have attached code segments I am using. I would be very gratefull if you could help out in debugging.
//-------------------------------------------
// The launchiSiloFromVFS function
//-------------------------------------------
void launchiSiloFromVFS(UInt16 uVolRefNum, char *szPath)
{
Err error = errNone;
DmSearchStateType searchState;
UInt16 appCard;
LocalID appID;
iSiloAppLaunchCmdOpenVFSType *launchInfo;
UInt16 uStructSize; // sizeof(iSiloAppLaunchCmdOpenVFSType)
// find the Kinoma Player application
error = DmGetNextDatabaseByTypeCreator(true, &searchState,
sysFileTApplication, kiSiloAppCreator, true,
&appCard, &appID);
if (errNone != error) return;
// launch the application with the selected database
launchInfo = (iSiloAppLaunchCmdOpenVFSType *)
MemPtrNew(sizeof(iSiloAppLaunchCmdOpenVFSType));
uStructSize = sizeof(launchInfo);
if (NULL == launchInfo) return;
MemPtrSetOwner((MemPtr)launchInfo, 0); // SysUIAppSwitch will dispose
launchInfo->uVolRefNum = uVolRefNum;
StrCopy(launchInfo->szPath, szPath);
error = SysUIAppSwitch(appCard, appID, iSiloAppLaunchCmdOpenVFS,
launchInfo);
if (errNone != error) return;
}
PilotMain :
UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) {
EventType event;
Err err = 0;
UInt32 vfsMgrVersion;
Boolean handled = false;
switch (cmd) {
case sysAppLaunchCmdNormalLaunch:
err = FtrGet(sysFileCVFSMgr, vfsFtrIDVersion, &vfsMgrVersion);
if(err){
// VFS Manager not installed
break;
} else {
// everything OK
UInt16 uVolRefNum;
UInt32 volIterator = vfsIteratorStart;
while (volIterator != vfsIteratorStop) {
err = VFSVolumeEnumerate(&uVolRefNum, &volIterator);
if (err == errNone)
{
launchiSiloFromVFS(uVolRefNum, "/Palm/Programs/iSilo/asdf.pdb");
break;
}
else {
break;
}
}
}
handled = true;
break;
do {
UInt16 MenuError;
EvtGetEvent(&event, evtWaitForever);
if (! SysHandleEvent(&event))
if (! MenuHandleEvent(0, &event, &MenuError))
if (! AppHandleEvent(&event))
FrmDispatchEvent(&event);
} while (event.eType != appStopEvent);
break;
default:
break;
}
iSilo
11-03-2004, 01:37 PM
You have the following, which sets a local variable in your function: uStructSize = sizeof(launchInfo);
You should be setting the corresponding field in the structure: launchInfo->uStructSize = sizeof(launchInfo);
prion
11-04-2004, 10:58 AM
Thank you for the quick response ! It works fine now.
btw, it's launchInfo->uStructSize = sizeof(iSiloAppLaunchCmdOpenVFSType);
TGARRAX
10-25-2005, 05:58 AM
Hi!
Im trying to call isilo Doc in my Hb++ app, but my function does not ready, only it had called the Main iSilo.
Does Someone know about it?
'------------------------------------------------------------
'
'The main Function
'------------------------
Private Function LaunchIsiloDocFromVFS (byval vfs as VFSVolume,byref szPathName as String) as Boolean
Const kIsiloAppCreator as String="SilX"
Const kIsiloDataBaseType as string="SDoc"
Const sysAppLaunchCmdCustomBase as Long =&H8000
Dim diIsilo as new DatabaseInfo
Dim diIsiloDoc as new StreamFile
Dim bFound as boolean
Dim Params as new StreamMemory
'looking for Kinoma player
if diIsilo.FindFirstByTypeCreator("appl",kIsiloAppCreator) then
'Player found, now launching the movie on the given volume
'write parameters
Write Params,vfs.Reference,szPathName
'Launch the movie
diIsilo.Shell True,sysAppLaunchCmdCustomBase,Params
Else
'player not found
LaunchIsiloDocFromVFS=False
End if
End Function
'-----------------------------------
'calling The function
'------------------------------------
Private Sub Button1_Click()
Dim v as new VFSVolume
LaunchIsiloDocFromVFS v,"/PALM/Launcher/iSiloManual.pdb"
End Sub
rgmcclay
06-23-2006, 09:33 AM
Is it possible to sublaunch iText and have control return to the calling program? I know I can use SysUIAppSwitch to launch it, but I'm looking at using iText for embedding documentation and its important that the user be returned to his exact position within the calling program. Alternately, is there a toolkit for iSilo that allows embedding styled documents into an application (or does anyone know of such a toolkit).
Thanks.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.