aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1269

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1269  Weblink Creation

12/10/2005 @ 06:36
by ktimaster

Anonymous



Aldweb, I have a simple question can I create a HTML Weblink in iziBasic to open up the default web browser to a specific page. If I cant, Would you know how to make one in Pascal.
Write to ktimaster   Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 1
--------
12/10/2005 @ 13:41
by aldweb

Anonymous

visitor
Hello Ktimaster,

I don't know!
Because I have never been in the need of such a feature so far, so I never took the time to know how to send a HTML weblink to a Palm web browser.

The point is to know how the browser is registered as managing the HTML URLs and where to search for this kind of information, how to pass it to Palm OS, etc... Again, sorry, I don't know. But I am eager to know! As soon as you will have figured the mechanism, please let me know

Cheers,
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 2
--------
12/10/2005 @ 16:38
by Ktimaster

Anonymous

visitor
OK I found some stuff to help... Unfortunatly it is in C rather then Pascal. I will include the example and mabey Aldweb can Help Decript it and help make an example for everyone. (And mabey implement it into a future version of iziBasic)
------------------------------------------
#include <PalmOS.h>
#include <WebBrowser.h>

WebBrowserCommand(false, 0 0sysAppLaunchCmdGoToURL, "www.aldweb.com", NULL)
Write to Ktimaster   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 3
--------
12/10/2005 @ 18:43
by aldweb

Anonymous

visitor
Indeed, my own search found the same documentation made by Palm here:
http://www.palmos.com/dev/support/docs/creatingwebenabledapps.pdf

The WebBrowserCommand() function is not an API call but a fully written function in C:
#include <PalmOS.h>
#include <WebBrowser.h>
Err WebBrowserCommand(Boolean subLaunch, UInt16 launchFlags, UInt16 command,
Char *parameterP, UInt32 *resultP)
{
UInt16 cardNo;
LocalID dbID;
DmSearchStateType searchState;
Err error;

if (resultP) *resultP = errNone;
error = DmGetNextDatabaseByTypeCreator(true, &searchState,
sysFileTApplication, WebBrowserCreator, true, &cardNo, &dbID);
if (error == errNone)
{
if (subLaunch)
{
SysAppLaunch(cardNo, dbID, launchFlags, command, parameterP, &result);
if (resultP) *resultP = result;
}
else
{
Char *newParamP = NULL;
if (parameterP)
{
newParamP= MemPtrNew( StrLen(parameterP) +1 );
if (newParamP == NULL) error = memErrNotEnoughSpace;
else
{
StrCopy(newParamP, parameterP);
MemPtrSetOwner(newParamP, 0); // The OS now owns this memory
}
}
if (error == errNone)
{
SysUIAppSwitch( cardNo, dbID, command, newParamP);
}
}
}
return error;
} //WebBrowserCommand


Note: this works only with the Web Browser 2.0 application, on Palm OS 5 only (as written in the documentation, link provided above).

The same thing will be much easier to write in iziBasic!
_WebBrowserCommand:
'Check OS version
V$­­=GETOSVER$­­
IF V$­­<"5.0" GOTO _WebError
'Search for Web Browser
B$­­=FINDFIRST$­­("appl","NF3P")
IF B$­­="" GOTO _WebError
RUN B$­­,"www.aldweb.com"
_WebError:
PRINT "Web Browser not found"
RETURN

I have not tested this small piece of code, but it should work.

Don't you believe that this is a great example, not to say a fantastic one, which demonstrates the easyness of using iziBasic!

Cheers,
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 4
--------
12/10/2005 @ 23:58
by ktimaster

Anonymous

visitor
diddnt work... I keep getting a stack overflow message when I run the compiled program... When you use the iziBasic 'RUN' command does it use the SysAppLaunch API. If it does this would explain the error I am getting.
Write to ktimaster   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 5
--------
13/10/2005 @ 01:01
by Ktimaster

Anonymous

visitor
Nevermind... It turns out blazer has some other issues. I found another way around it
Write to Ktimaster   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 6
--------
13/10/2005 @ 12:43
by aldweb

Anonymous

visitor
I tried it on my Tungsten C, and it did work very well with Web Browser as I said in my previous e-mail.
I don't have Blazer so I don't know how to deal with it, if it accepts an input parameter and what its CreatorID is. But if it does accept an input parameter like Web Browser does, there is no reason why it should not work.

How did you solve your issue at the end?

Cheers,
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 7
--------
13/10/2005 @ 17:24
by Ktimaster

Anonymous

visitor
The thing is with My Tungsten E|2 it Comes Bundled with A web Browser Called 'WEB'. it is in fact Blazer. in which you would use 'BLZ5' as the creator ID instead. Other then that it seems to work fine.

On a side note, I have used iziBasic to actually send an e-mail, and it WORKED!!!!!!!!!!!!
Write to Ktimaster   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 8
--------
15/10/2005 @ 15:56
by aldweb

Anonymous

visitor
Hello Ktimaster,

OK, only changing the creator ID was enough. There are not so many web browsers on the Palm market, so scanning for all possible types, launching the browser with a URL should easily be achieved from my source code example made for Web Browser.

Is it with Versamail that you sent the e-mail?
Please, send me the source code or share it here ... I'm lazy and don't really feel like searching for how to do... but I would love to have it to send some newsletter e-mails right from my Tungsten C

Cheers

@+
aldweb
Write to aldweb   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^