Page 1 of 1

RPREVIEW ERROR ON TWO PAGES

Posted: Fri Jan 25, 2008 11:35 pm
by Silvio
Dear Antonio,

When I use MDI window I cannot see the menu of Rpreview : why ?

And when I select two pages and then press the exit button the rpreview
function make errors :

this is the error :

Code: Select all


Application
===========
   Path and name: C:\WORK\PRG\Maga32\Maga32.Exe (32 bits)
   Size: 3,610,112 bytes
   Time from start: 0 hours 0 mins 38 secs 
   Error occurred at: 30/01/2008, 00:32:24
   Error description: Error BASE/1004  Class: 'NIL' has no exported method: NWIDTH
   Args:
     [   1] = U   

Stack Calls
===========
Called from:  => NWIDTH(0)
   Called from: RPREVIEW.PRG => TPREVIEW:PAINTMETA(645)
   Called from: RPREVIEW.PRG => (b)TPREVIEW:ACTIVATE(161)
   Called from: WINDOW.PRG => TMDICHILD:RESIZE(0)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: MDICHILD.PRG => TMDICHILD:HANDLEEVENT(0)
   Called from: WINDOW.PRG => _FWH(0)
   Called from:  => SENDMESSAGE(0)
   Called from: WINDOW.PRG => (b)TWINDOW:TWINDOW(0)
   Called from:  => TMDICLIENT:SENDMSG(0)
   Called from: MDICLIEN.PRG => TMDICLIENT:CHILDCLOSE(0)
   Called from: MDICHILD.PRG => TMDICHILD:END(0)
   Called from: RPREVIEW.PRG => (b)TPREVIEW:BUILDBUTTONBAR(314)
   Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)
   Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
   Called from: BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0)
   Called from: WINDOW.PRG => _FWH(0)
   Called from:  => SYSREFRESH(0)
   Called from: MSGRUN.PRG => STOPUNTIL(0)
   Called from: RPREVIEW.PRG => TPREVIEW:ACTIVATE(164)
   Called from: RPREVIEW.PRG => RPREVIEW(1440)
   Called from: PRINTER.PRG => (b)TPRINTER:TPRINTER(250)
   Called from:  => TPRINTER:PREVIEW(0)
   Called from: PRINTER.PRG => PRINTEND(962)

Can U help me Pls

Posted: Sat Jan 26, 2008 11:20 pm
by Antonio Linares
Silvio,

When a main MDI window is used, the preview is created inside a MDICHILD window. We don't set a menu to the preview child window, as it will replace the main pulldown menu (as MDICHILD windows can't have a menu inside them). You can easily modify source\classes\rpreview.prg in case that you want to set the MDICHILD menu.

This sample is working fine. Please test it and check if you can reproduce the error that you mention, thanks:

Code: Select all

#include "FiveWin.ch" 

function Main() 

   local oWnd 

   DEFINE WINDOW oWnd TITLE "Test" MDI ;
      MENU BuildMenu()

   ACTIVATE WINDOW oWnd 

return nil 

function BuildMenu()

   local oMenu
   
   MENU oMenu
      MENUITEM "Test"
      MENU
         MENUITEM "Preview" ACTION Preview()
      ENDMENU   
      oMenu:AddMdi()
   ENDMENU
   
return oMenu   

function Preview()

   local oPrn
   
   PRINTER oPrn Preview
      PAGE
         oPrn:Say( 2, 2, "Test" )
      ENDPAGE
      PAGE
         oPrn:Say( 2, 2, "Test" )
      ENDPAGE
   ENDPRINTER
   
return nil         

Posted: Sun Jan 27, 2008 1:30 am
by Silvio
Antonio,
your sample run well

I use the same prev32.dll

but on your sample I can see icons 'xp on gray bar

on my application I see the old icons on bar office 2007 style

why ?
Perhaps I have an error on RPreview class
because Now when press also the X ( window exit) i make error Nwidht
can I send U in private my little code ?

Posted: Sun Jan 27, 2008 2:38 am
by Silvio
perhaps I found an error

when on an applicaton we write

Code: Select all

 DEFINE BUTTONBAR oBar 3DLOOK BUTTONSIZE 25,25 OF oWnd 2007
we can see the bar with office 2007 like

and if go on the preview we can see old icon of the rpreview on buttonbar office 2007 style


but if we write

Code: Select all

 DEFINE BUTTONBAR oBar 3DLOOK BUTTONSIZE 25,25 OF oWnd 
if go on the preview we can see xp icon of the rpreview on a gray buttonbar

perhaps there is an error

We when write DEFINE BUTTONBAR oBar 3DLOOK BUTTONSIZE 25,25 OF oWnd 2007
we want see buttonbar style office 2007 and the xp icons ...




Image

Posted: Sun Jan 27, 2008 7:50 am
by Antonio Linares
Silvio,

Its coded that way. The preview detects if you are using 2007 look and then it uses the same style for its buttons bar:

Image

Posted: Sun Jan 27, 2008 11:44 am
by Silvio
ok but also in your sample i see buttonbar 2007 style and all old icons no xp
you made it in this way ?


then i not found a solution for the second error (nwidth)

I recompile old school application made with fw 2.6 two years ago i think.

Now i recompile it with 7.12 but when i go to two pages it make error i not know why , the last exe not made this type of error , i must recompile another school application but i am sorry if it make error..
how i can make ?

Posted: Sun Jan 27, 2008 12:04 pm
by Silvio
Now I recompiled with old Rpreview.prg ( NO CLASS)

It run ok and not make error ( nwidth() )

When I recompiled with NEW class Rpreview there is error !!!!!!!!!!!!!!

Do you want control it please ?

Posted: Sun Jan 27, 2008 6:23 pm
by Antonio Linares
Silvio,

Please tell us how to reproduce the error.

We have provided you a sample that works fine and does not error. Please provide us a sample that errors, thanks

Posted: Sun Jan 27, 2008 6:34 pm
by Antonio Linares
Silvio,

>
ok but also in your sample i see buttonbar 2007 style and all old icons no xp you made it in this way ?
>

Fixed, thanks:

Image

You just need to modify source\classes\rpreview.prg and change the name of the used resources into the same name ended with "2".

Posted: Sun Jan 27, 2008 6:39 pm
by Silvio
please can you send me in private the rpreview class?

Posted: Sun Jan 27, 2008 6:49 pm
by Antonio Linares
Silvio,

Already sent

Posted: Mon Jan 28, 2008 4:03 am
by Silvio
Antonio,
I sent you the test

Posted: Tue Apr 15, 2008 9:40 pm
by dobfivewin
ME PUEDES PASAR PREV32.DLL, YA QUE NO PUEDO VISUALIZAR LOS REPORTES...


DAVID BARRIO
davidbarrio_arg@hotmail.com

Posted: Tue Apr 15, 2008 10:35 pm
by Antonio Linares
David,

What FWH version are you using ?

Que versión de FWH estás usando ?