Using PDF for showing p.mapper help from tool links

View: New views
3 Messages — Rating Filter:   Alert me  

Using PDF for showing p.mapper help from tool links

by dgambin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have made a user guide for working with p.mapper. It is in PDF format.

I wanted to use an URL with path to this PDF document when a user clicks
on Help link from tool links, instead of opening p.mapper help window
(help.phtml).

I have modified this part:

{linkid:'help', name:'Help', run:'PM.Dlg.openHelp', imgsrc:'help-w.png'}

to

{linkid:'help', name:'Help',
run:'window.open(\'http://mydomain.com/mydocuments/userguide.pdf\')',
imgsrc:'help-w.png'}


And this is working but with errors such as this in FF:

Error: uncaught exception: [Exception... "Cannot convert WrappedNative to
function"  nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)"
location: "JS frame ::
javascript:window.open('http://mydomain.com/mydocuments/userguide.pdf')()
:: <TOP_LEVEL> :: line 1"  data: no]

and this in IE:

Message: No such interface supported

Is it possible to somehow avoid these errors?


thanks very much


regards, dejan
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
pmapper-users mailing list
pmapper-users@...
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Re: Using PDF for showing p.mapper help from tool links

by Armin Burger-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

you cannot pass variables via the functions defined for 'run'.
Instead, create a function like

function myHelpOpen() {
   window.open('http://mydomain.com/mydocuments/userguide.pdf');
}

and define this as
...
 run: 'myHelpOpen'


On Wed, Sep 30, 2009 at 11:32 AM,  <Dejan.Gambin@...> wrote:

> Hi,
>
> I have made a user guide for working with p.mapper. It is in PDF format.
>
> I wanted to use an URL with path to this PDF document when a user clicks
> on Help link from tool links, instead of opening p.mapper help window
> (help.phtml).
>
> I have modified this part:
>
> {linkid:'help', name:'Help', run:'PM.Dlg.openHelp', imgsrc:'help-w.png'}
>
> to
>
> {linkid:'help', name:'Help',
> run:'window.open(\'http://mydomain.com/mydocuments/userguide.pdf\')',
> imgsrc:'help-w.png'}
>
>
> And this is working but with errors such as this in FF:
>
> Error: uncaught exception: [Exception... "Cannot convert WrappedNative to
> function"  nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)"
> location: "JS frame ::
> javascript:window.open('http://mydomain.com/mydocuments/userguide.pdf')()
> :: <TOP_LEVEL> :: line 1"  data: no]
>
> and this in IE:
>
> Message: No such interface supported
>
> Is it possible to somehow avoid these errors?
>
>
> thanks very much
>
>
> regards, dejan
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@...
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
pmapper-users mailing list
pmapper-users@...
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Re: Using PDF for showing p.mapper help from tool links

by dgambin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Great thanks, it works like a charm

regards, dejan

Armin Burger <armin.burger@...> wrote on 30.09.2009 13:50:06:

> you cannot pass variables via the functions defined for 'run'.
> Instead, create a function like
>
> function myHelpOpen() {
>    window.open('http://mydomain.com/mydocuments/userguide.pdf');
> }
>
> and define this as
> ...
>  run: 'myHelpOpen'
>
>
> On Wed, Sep 30, 2009 at 11:32 AM,  <Dejan.Gambin@...> wrote:
> > Hi,
> >
> > I have made a user guide for working with p.mapper. It is in PDF
format.
> >
> > I wanted to use an URL with path to this PDF document when a user
clicks
> > on Help link from tool links, instead of opening p.mapper help window
> > (help.phtml).
> >
> > I have modified this part:
> >
> > {linkid:'help', name:'Help', run:'PM.Dlg.openHelp',
imgsrc:'help-w.png'}

> >
> > to
> >
> > {linkid:'help', name:'Help',
> > run:'window.open(\'http://mydomain.com/mydocuments/userguide.pdf\')',
> > imgsrc:'help-w.png'}
> >
> >
> > And this is working but with errors such as this in FF:
> >
> > Error: uncaught exception: [Exception... "Cannot convert WrappedNative
to
> > function"  nsresult: "0x8057000d
(NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)"
> > location: "JS frame ::
> >
javascript:window.open('http://mydomain.com/mydocuments/userguide.pdf')()

> > :: <TOP_LEVEL> :: line 1"  data: no]
> >
> > and this in IE:
> >
> > Message: No such interface supported
> >
> > Is it possible to somehow avoid these errors?
> >
> >
> > thanks very much
> >
> >
> > regards, dejan
> >
>
------------------------------------------------------------------------------
> > Come build with us! The BlackBerry® Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart
your
> > developing skills, take BlackBerry mobile applications to market and
stay
> > ahead of the curve. Join us from November 9-12, 2009. Register
now!
> > http://p.sf.net/sfu/devconf
> > _______________________________________________
> > pmapper-users mailing list
> > pmapper-users@...
> > https://lists.sourceforge.net/lists/listinfo/pmapper-users
> >
>
>
------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and
stay
> ahead of the curve. Join us from November 9-12, 2009. Register
now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@...
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
pmapper-users mailing list
pmapper-users@...
https://lists.sourceforge.net/lists/listinfo/pmapper-users