RPREVIEW ERROR ON TWO PAGES

RPREVIEW ERROR ON TWO PAGES

Postby Silvio » 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 :

Code: Select all  Expand view

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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » 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:
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Sun Jan 27, 2008 1: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Sun Jan 27, 2008 2:38 am

perhaps I found an error

when on an applicaton we write

Code: Select all  Expand view
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  Expand view
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
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Sun Jan 27, 2008 7: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:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Sun Jan 27, 2008 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Sun Jan 27, 2008 6: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:

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".
Last edited by Antonio Linares on Sun Jan 27, 2008 6:47 pm, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Sun Jan 27, 2008 6:39 pm

please can you send me in private the rpreview class?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Sun Jan 27, 2008 6:49 pm

Silvio,

Already sent
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Mon Jan 28, 2008 4:03 am

Antonio,
I sent you the test
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby dobfivewin » Tue Apr 15, 2008 9:40 pm

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


DAVID BARRIO
davidbarrio_arg@hotmail.com
dobfivewin
 
Posts: 325
Joined: Sun Feb 03, 2008 11:04 pm
Location: Argetnina

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests