Error in sample program : TESTRTF5

Post Reply
User avatar
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

Error in sample program : TESTRTF5

Post 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
User avatar
cnavarro
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Error in sample program : TESTRTF5

Post 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
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in sample program : TESTRTF5

Post 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
User avatar
karinha
Posts: 7884
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Error in sample program : TESTRTF5

Post by karinha »

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
mauri.menabue
Posts: 157
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in sample program : TESTRTF5

Post 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
User avatar
Silvio.Falconi
Posts: 7103
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error in sample program : TESTRTF5

Post 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....
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply