SUB-CLASS TFolderEx()

Re: SUB-CLASS TFolderEx()

Postby Jimmy » Sun Feb 05, 2023 5:20 am

hi Antonio,

"where" can i get more Information about
__objAddData( oObject, cSymbol ) and __objAddMethod( oObject, cSymbol, nFuncPtr ), __objModMethod( oObject, cSymbol, nFuncPtr )

have not found a Sample

---

have found in OOHG
/*
* The following parts are Copyright of the individual authors.
* www - http://harbour-project.org
*
* Copyright 1999 Antonio Linares <alinares@fivetech.com>
* __objGetMsgList
*
* Copyright 2000 Jf. Lefebvre <jfl@mafact.com> and Ra. Cuylen <rac@mafact.com>
* __objDerivedFrom


and these Function

__OBJADDDATA
__OBJADDINLINE
__OBJADDMETHOD
__OBJCLONE
__OBJDELDATA
__OBJDELINLINE
__OBJDELMETHOD
__OBJDERIVEDFROM
__OBJGETCLSNAME
__OBJGETMETHODLIST
__OBJGETMSGLIST
__OBJGETPROPERTIES
__OBJGETVALUELIST
__OBJHASDATA
__OBJHASMETHOD
__OBJHASMSG
__OBJHASMSGASSIGNED
__OBJMODINLINE
__OBJMODMETHOD
__OBJSENDMSG
__OBJSETCLASS
__OBJSETVALUELIST


are these OOHG or harbour Function :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: SUB-CLASS TFolderEx()

Postby Antonio Linares » Mon Feb 06, 2023 7:53 am

regards, saludos

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

Re: SUB-CLASS TFolderEx()

Postby Jimmy » Mon Feb 06, 2023 9:25 pm

hi Antonio,
Antonio Linares wrote:They are Harbour functions

ok, thx
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: SUB-CLASS TFolderEx()

Postby Jimmy » Wed Feb 08, 2023 4:14 am

hi,

how to run Console App with QOut() under Fivewin :?:

i try to use a Demo Sample which use Qout() but i got not "output" on Screen
i do have sane under HGM where i can add
Code: Select all  Expand view
REQUEST HB_GT_WIN_DEFAULT           // Console

but this does not work with Fivewin while "unknown" :(

so how run this CODE so i can "see" Output :?:

Code: Select all  Expand view
//
// $Id: dynobj.prg 14676 2010-06-03 16:23:36Z vszakats $
//
// DynObj
//
// Implementation of dynamic objects in Harbour
//
// Date : 1999/05/12
//
// Written by Eddie Runia <eddie@runia.com>
// www - http://harbour-project.org
//
// Placed in the public domain
//

function Main()

   local oForm := TForm():New()
   local nSeq

   QOut( "What methods are in the class :" )
   Debug( __objGetMethodList( oForm ) )

/* Let's add an inline at run-time. Should already be possible */

   QOut( "Let's add inline 'CalcArea' at run-time to an already instanced class" )

   __objAddInline( oForm, "CalcArea", ;
      {|self| ( ::nRight  - ::nLeft ) * ( ::nBottom - ::nTop ) } )

   QOut( "What methods are in the class :" )
   Debug( __objGetMethodList( oForm ) )

   QOut( "What is the Form area ?" )
   QOut( oForm:CalcArea() )

   QOut( "Let's add method 'Smile' at run-time to an already instanced class" )

   __objAddMethod( oForm, "Smile", @Smile() )

   QOut( "What methods are in the class :" )
   Debug( __objGetMethodList( oForm ) )

   QOut( "Smile please " )
   oForm:Smile()

   Pause()

   QOut( "Data items before" )
   Debug( oForm )

   QOut( "Let's add an additional data item" )

   __objAddData( oForm, "cHelp" )

   oForm:cHelp := "This is a real tricky test"

   QOut( "Data items after" )
   Debug( oForm )

   Pause()

   QOut( "Let's attach a bigger smile" )

   __objModMethod( oForm, "Smile", @BigSmile() )

   QOut( "Let's smile" )
   oForm:Smile()

   QOut( "And CalcArea() will now give a result in square inches" )

   __objModInline( oForm, "CalcArea", ;
      {|self| ( ::nRight  - ::nLeft ) * ( ::nBottom - ::nTop ) / (2.54*2.54) } )

   QOut( "What is the Form area ?" )
   QOut( oForm:CalcArea() )

   QOut( "What methods are in the class :" )
   Debug( __objGetMethodList( oForm ) )

   QOut( "Delete CalcArea" )
   __objDelInline( oForm, "CalcArea" )

   QOut( "What methods are in the class :" )
   Debug( __objGetMethodList( oForm ) )

   QOut( "Delete Smile" )
   __objDelMethod( oForm, "Smile" )

   QOut( "What methods are in the class :" )
   Debug( __objGetMethodList( oForm ) )

   Pause()

   QOut( "Data items before" )
   Debug( oForm )

   QOut( "Let's delete cHelp" )

   __objDelData( oForm, "cHelp" )

   QOut( "Data items after" )
   Debug( oForm )

/*   oForm:cHelp := "Please crash" */

return nil


function TForm()

   static oClass

   if oClass == nil
      oClass := HBClass():New( "TFORM" )    // starts a new class definition

      oClass:AddData( "cText" )           // define this class objects datas
      oClass:AddData( "nTop" )
      oClass:AddData( "nLeft" )
      oClass:AddData( "nBottom" )
      oClass:AddData( "nRight" )

      oClass:AddMethod( "New",  @New() )  // define this class objects methods
      oClass:AddInline( "Show", {|self| ::cText } )

      oClass:Create()                     // builds this class
   endif

return oClass:Instance()                  // builds an object of this class


static function New()

   local Self := QSelf()

   ::nTop    := 10
   ::nLeft   := 10
   ::nBottom := 20
   ::nRight  := 40

return Self


static function Smile()

   local self := QSelf()

   if ::CalcArea() == 300
      QOut( ":-)" )
   else
      QOut( ":-(" )
   endif
return self


static function BigSmile()

   local self := QSelf()

   QOut( ":-)))" )
return self


function Pause()

   __Accept( "Pause :" )
return nil
 
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: SUB-CLASS TFolderEx()

Postby Antonio Linares » Wed Feb 08, 2023 8:44 am

Dear Jimmy,

You don't need FWH there at all. Simply use hbmk2 to build it or FWH\samples\build.bat
regards, saludos

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

Re: SUB-CLASS TFolderEx()

Postby Jimmy » Wed Feb 08, 2023 10:22 pm

hi Antonio,
Antonio Linares wrote:You don't need FWH there at all. Simply use hbmk2 to build it or FWH\samples\build.bat

ok, got it
Code: Select all  Expand view
c:\fwh64\0\TGRID>hbmk2 DYNOBJ

... : undefined reference to `HB_FUN_DEBUG'

hbmk2: Hint: Add input file 'hbmisc.hbc' for missing Harbour function(s):
Debug()

Code: Select all  Expand view
c:\fwh64\0\TGRID>hbmk2 DYNOBJ -lhbmisc
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 98 guests