You must do the following before calling SysUIAppSwitch():

urlBuff = MemPtrNew(StrLen(url)+1);
StrCopy(urlBuff, url);
MemPtrSetOwner(urlBuff, 0);
SysUIAppSwitch (cardNo, dbID, sysAppLaunchCmdGoToURL, (Ptr)urlBuff);

Regards

Bozidar


> hey everyone,
>
> has anybody tried out sending sysAppLaunchCmdGoToURL to launch
> clipper from an
> app?
>
> i followed the sample code posted on the knowledge base web page by doing:
>
>
> DmGetNextDatabaseByTypeCreator (true, &searchState, sysFileTApplication,
>                     sysFileCClipper, true, &cardNo, &dbID);
>
> SysUIAppSwitch (cardNo, dbID, sysAppLaunchCmdGoToURL, (Ptr)url);
>
> url is the url that i'm going to.
>
> the output is quite strange: on the first launch, the web page is
> correctly
> received, but the back arrow
> is also shown on the top, so i tap on it, it crashed with fatal error said
> invalid chunk ptr.
> after i dismiss this error msg, and launch it again, it gives a
> fatal error msg
> saying invalid chunk pointer.
>
> any ideas?
>
> thanks
>
> david
>
>
>
>
>

Reply via email to