Hi Enrico,
I added below pieces of code to emulate OVERRIDE command from xharbour
and I use it successfully.
I don't know if harbour developers are interested to add, if yes I can
add to SVN.
Use it, for your case, as:
OVERRIDE METHOD SetPos IN CLASS TGet WITH MySetPos
HTH
Best regards,
Francesco
----- hbclass.ch -----
// Extend Classes
#xcommand OVERRIDE METHOD <!Message!> [IN] CLASS <!Class!> WITH [METHOD]
<!Method!> [SCOPE <Scope>] => ;
<Class>(); __clsModMsg( __ObjGetClsHandle( #<Class> ), #<Message>,
@<Method>(), IIF( <.Scope.>, <Scope>, HB_OO_CLSTP_EXPORTED ) )
----------------------
----- classes.c ------
/*
* __objGetClsHandle( <cClassName> | <oObj> ) -> <hClass>
*
* Returns class handle of <oObj> or <cClassName>
*/
HB_FUNC( __OBJGETCLSHANDLE )
{
PHB_ITEM pObject = hb_param( 1, HB_IT_OBJECT );
const char * szClass;
USHORT uiClass;
if( pObject )
uiClass = pObject->item.asArray.value->uiClass;
else
{
szClass = hb_parc( 1 );
uiClass = hb_clsFindClass( szClass, NULL );
}
hb_retni( uiClass );
}
----------------------
Il 20/02/2009 23.30, Enrico Maria Giordano ha scritto:
-----Messaggio Originale----- Da: "Przemyslaw Czerpak" <[email protected]>
A: "Harbour Project Main Developer List." <[email protected]>
Data invio: venerdì 20 febbraio 2009 13.20
Oggetto: Re: [Harbour] TGet: setting cursor position to ::nMaxLen + 1
My typo, classH not Hclass.
Ok, thank you. Unfortunately it seems that creating a new method is not
enough as the old method I'm trying to replace is still callled
internally by other methods.
EMG
--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
The EMG Music page: http://www.emagsoftware.it/emgmusic
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour