Page 1 of 1

Error in sample program : TESTRTF5

Posted: Thu Sep 05, 2024 9:00 pm
by mauri.menabue
Hi everyone
I wanted to practice using the richedit5 class so I compiled
the following program: testrtf5 however in the case
of the search this error appears:
Application
===========
Path and name: d:\fwh\samples\testrtf5.exe (32 bits)
Size: 4,952,064 bytes
Compiler version: Harbour 3.2.0dev (r2307062207)
FiveWin version: FWH 23.10
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200

Time from start: 0 hours 0 mins 4 secs
Error occurred at: 09/05/24, 22:53:41
Error description: Error BASE/1005 Message not found: TFONT:_NASCENT
Args:
[ 1] = O TFONT

Stack Calls
===========
Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TFONT:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TFONT:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TFONT:_NASCENT( 0 )
Called from: .\source\classes\WINDOW.PRG => TDIALOG:GETFONT( 3096 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 860 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 335 )
Called from: testrtf5.prg => FIND( 1022 )
Called from: testrtf5.prg => (b)SETCHILDBAR( 707 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 796 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 1083 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1851 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2138 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3648 )
Called from: .\source\classes\WINDOW.PRG => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1112 )
Called from: testrtf5.prg => MAIN( 54 )
TIA
Maurizio Menabue

Re: Error in sample program : TESTRTF5

Posted: Thu Sep 05, 2024 10:40 pm
by cnavarro
Please put here the content of the Find() function that appears in your code

Code: Select all | Expand

static function Find()

   local cFind := Space( 100 )
   local nDir  := 1
   local lCase := .f.
   local lWord := .t.       // This is my line 1022
   local oDlg
   local oFind
   local lExit := .F.

   DEFINE DIALOG oDlg RESOURCE "Find"

   REDEFINE GET oFind VAR cFind ID 101 OF oDlg UPDATE

   REDEFINE RADIO nDir ID 102, 103 OF oDlg

   REDEFINE CHECKBOX lCase ID 104 OF oDlg
   REDEFINE CHECKBOX lWord ID 105 OF oDlg

   REDEFINE BUTTON ID 201 ;
            ACTION ( oRTF:SetFocus(), ;
                     oRTF:Find( AllTrim( cFind ), ( nDir == 1 ), lCase, lWord ) )

   REDEFINE BUTTON ID 202 ACTION ( lExit := .T., oDlg:End() )

   oDlg:bStart := { || oFind:SetFocus() }

   ACTIVATE DIALOG oDlg CENTER NOWAIT
   
return nil
 

Re: Error in sample program : TESTRTF5

Posted: Fri Sep 06, 2024 9:12 am
by mauri.menabue
hi Cristobal

Code: Select all | Expand

static function Find()

   local cFind := Space( 100 )
   local nDir  := 1
   local lCase := .f.
   local lWord := .t. <------- in my TestRtf5.prg this line in 1001
   local oDlg
   local oFind

   DEFINE DIALOG oDlg RESOURCE "Find"

   REDEFINE GET oFind VAR cFind ID 101 OF oDlg UPDATE

   REDEFINE RADIO nDir ID 102, 103 OF oDlg

   REDEFINE CHECKBOX lCase ID 104 OF oDlg
   REDEFINE CHECKBOX lWord ID 105 OF oDlg

   REDEFINE BUTTON ID 201 ;
            ACTION ( oRTF:SetFocus(), ;
                     oRTF:Find( Trim( cFind ), ( nDir == 1 ), lCase, lWord ) )

   REDEFINE BUTTON ID 202 ACTION ( oDlg:End() )

   oDlg:bStart := { || oDlg:SetFocus() }

   ACTIVATE DIALOG oDlg CENTER NOWAIT

return nil
 
I also noticed that the same error also appears in other examples such as TestMemo.prg.
I thought that the problem could arise from the fact that the font was missing: Nascent so I installed it, but the problem remains

TIA

Re: Error in sample program : TESTRTF5

Posted: Fri Sep 06, 2024 11:13 am
by karinha

Re: Error in sample program : TESTRTF5

Posted: Fri Sep 06, 2024 3:34 pm
by mauri.menabue
Path and name: d:\fwh\samples\testrtf5.exe (32 bits)
Size: 4,952,064 bytes
Compiler version: Harbour 3.2.0dev (r2307062207)
FiveWin version: FWH 23.10
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200

Re: Error in sample program : TESTRTF5

Posted: Sun Sep 08, 2024 8:41 pm
by Silvio.Falconi
cnavarro wrote:Please put here the content of the Find() function that appears in your code

Code: Select all | Expand

static function Find()

   local cFind := Space( 100 )
   local nDir  := 1
   local lCase := .f.
   local lWord := .t.       // This is my line 1022
   local oDlg
   local oFind
   local lExit := .F.

   DEFINE DIALOG oDlg RESOURCE "Find"

   REDEFINE GET oFind VAR cFind ID 101 OF oDlg UPDATE

   REDEFINE RADIO nDir ID 102, 103 OF oDlg

   REDEFINE CHECKBOX lCase ID 104 OF oDlg
   REDEFINE CHECKBOX lWord ID 105 OF oDlg

   REDEFINE BUTTON ID 201 ;
            ACTION ( oRTF:SetFocus(), ;
                     oRTF:Find( AllTrim( cFind ), ( nDir == 1 ), lCase, lWord ) )

   REDEFINE BUTTON ID 202 ACTION ( lExit := .T., oDlg:End() )

   oDlg:bStart := { || oFind:SetFocus() }

   ACTIVATE DIALOG oDlg CENTER NOWAIT
   
return nil
 
Welcome you're back....