Page 1 of 1

#define "lost" ?

Posted: Sat Dec 28, 2019 4:44 am
by Jimmy
hi,

i got a new Problem which i don't understand.

what have i done :

Code: Select all

   IF EMPTY(cWantPath)
      // add new 
      cWantPath := Lay( cApp )
   ENDIF

   ACTIVATE WINDOW oForm CENTER
i did open a other Dialog before ...

Code run without this line so something i'm doing wrong :idea:
Error description: Error BASE/1004 No exported method: NCLRTEXT
Args:
[ 1] = U

Stack Calls
===========
Called from: => NCLRTEXT( 0 )
Called from: .\source\classes\SAY.PRG => TSAY:NEW( 81 )
Called from: CLICK2.PRG => MAIN_SCREEN( 4083 )
Called from: CLICK2.PRG => STARTCLICK( 495 )
Called from: CLICK2.PRG => (b)BUILDMENU( 4436 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1552 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1122 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3546 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1078 )
Called from: CLICK2.PRG => MAIN( 197 )
---

i have as 1st line

Code: Select all

#define Use_Gui

4065│#IFDEF Use_GUI
4066│   #IFDEF __HMG__
4067│      SetProperty( "Main", "StatusBox", "Value", cDummy )
4068│      SetProperty( "Main", "InBox", "Value", TIME() )
4069│      SetProperty( "Main", "OutBox", "Value", TIME() )
4070│   #ELSE
4071│      oStatusBox:Value := cDummy
4072│      oInBox:Value := TIME()
4073│      oOutBox:Value := TIME()
4074│   #ENDIF
4075│#ELSE
4076│   SetMode(50,80)
4077│   nMidScreen := 8 + INT( ( ( MAXROW() - 2 ) - 8 ) / 2 )
4078│   SETCOLOR( 'w+/b' )
4079│   CLEAR SCREEN
4080│   DISPBOX( 0, 0, 8, MAXCOL() )
4081│   DISPBOX( 8, 0, nMidScreen, MAXCOL() )
4082│   DISPBOX( nMidScreen, 0, MAXROW() - 2, MAXCOL() )
4083│   @  8,  0               SAY '├'
4084│   @  8, MAXCOL()         SAY '┤'
4085│   @ nMidScreen,  0       SAY '├'
4086│   @ nMidScreen, MAXCOL() SAY '┤'
4087│#ENDIF
how can harbour go to that Code :?:

---

Code: Select all

4462│static function Lay( cTemp )
4463│local oDlg, oGet,cClickini,nLen,nPosi
4464│local cINIfile := Space( 80 )
4465│
4466│IIF( !empty( cTemp ), cINIfile := SUBSTR(cTemp+Space( 80 ),1,80), )
4467│
4468│DEFINE DIALOG oDlg TITLE "CLICK Directory" ;
4469│        SIZE 600, 150
4470│
4471│@ 1, 1.5 SAY "Directory" OF oDlg SIZE 100, 8
4472│@ 2, 1.0 GET oGet VAR cINIfile OF oDlg
4473│
4474│@ 3, 1.0 BUTTON "Directory" ;
4475│       ACTION( cTemp := CGETFOLDER("Hello",cINIfile), ;
4476│       If( !Empty( cTemp ), ( cINIfile := TRIM(cTemp), oGet:Refresh() ),
4477│
4478│@ 3, 43.0 BUTTON "Exit" ACTION oDlg:End()
4479│
4480│ACTIVATE DIALOG oDlg CENTERED
4481│
4482│cINIfile := TRIM(cINIfile)
4483│If .NOT. Empty(cINIfile)
4484│   // check last sign
4485│   nLen  := LEN(cINIfile)
4486│   nPosi := RAT("\",cINIfile)
4487│   IF nPosi < nLen
4488│      cINIfile += "\"
4489│   ENDIF
4490│   #IFDEF Need_Once
4491│      // new INI if need
4492│      cClickini  := cINIfile + 'click.ini'
4493│      IF .NOT. FILE( cClickini )
4494│         createini( cClickini )
4495│         SET PATH TO cINIfile
4496│      ENDIF
4497│   #ENDIF
4498│   oStatusBox:cText := cINIfile
4499│ENDIF
4500│return TRIM(cINIfile)

Re: #define "lost" ?

Posted: Sat Dec 28, 2019 9:30 am
by Marc Vanzegbroeck
Use

Code: Select all

#IFDEF Use_GUI
because it's Case sensitive.

Re: #define "lost" ?

Posted: Sun Dec 29, 2019 2:24 am
by Jimmy
hi,
Marc Vanzegbroeck wrote:Use

Code: Select all

#IFDEF Use_GUI
because it's Case sensitive.
thx for Answer.
i do use Copy/Paste so it is always same Syntax.

but that is not the Problem while Code work without that "extra" Dialog.
if use #IFDEF under Cl*pper oder Xbase++ those Code does "NOT exist" when compile so he can't go to Code that does not exist :!: