FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour sending a msg to an object from low level code
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
sending a msg to an object from low level code
Posted: Sun Jun 19, 2011 04:32 AM
Using hb_objSendMsg()

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

  local o := Test()
  
  o:nData = 1234
  
  SetValue( o, 4321 )
  
  ? o:nData

return nil

CLASS Test

   DATA nData
   
ENDCLASS

#pragma BEGINDUMP
#include <hbapicls.h>

HB_FUNC( SETVALUE )
{
   hb_objSendMsg( hb_param( 1, HB_IT_OBJECT ), "_NDATA", 1, hb_param( 2, HB_IT_ANY ) );
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1283
Joined: Fri Feb 10, 2006 02:34 PM
Re: sending a msg to an object from low level code
Posted: Sun Jun 19, 2011 09:01 AM

A,

It's interesting, but do u aprpreciate acces time ? maybe in loops of 1000 iterations, :roll:

:

Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
HIX -> https://github.com/carles9000/hix
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: sending a msg to an object from low level code
Posted: Mon Jun 20, 2011 08:54 AM

It is interesting for sending a msg to an object from low level in a simple way :-)

From PRG we should use ":" as usual :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion