FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RPREVIEW ERROR ON TWO PAGES
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Fri Jan 25, 2008 11:35 PM
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 :

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
Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sat Jan 26, 2008 11:20 PM
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:
#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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 01:30 AM

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 ?

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 02:38 AM
perhaps I found an error

when on an applicaton we write

 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

 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 ...




Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 07:50 AM
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:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 11:44 AM

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 ?

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 12:04 PM

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 ?

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 06:23 PM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 06:34 PM
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:



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

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 06:39 PM

please can you send me in private the rpreview class?

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Sun Jan 27, 2008 06:49 PM

Silvio,

Already sent

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Mon Jan 28, 2008 04:03 AM

Antonio,
I sent you the test

Best Regards, Saludos



Falconi Silvio
Posts: 325
Joined: Sun Feb 03, 2008 11:04 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Tue Apr 15, 2008 09:40 PM

ME PUEDES PASAR PREV32.DLL, YA QUE NO PUEDO VISUALIZAR LOS REPORTES...

DAVID BARRIO

davidbarrio_arg@hotmail.com

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RPREVIEW ERROR ON TWO PAGES
Posted: Tue Apr 15, 2008 10:35 PM

David,

What FWH version are you using ?

Que versión de FWH estás usando ?

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion