sending a msg to an object from low level code

sending a msg to an object from low level code

Postby Antonio Linares » Sun Jun 19, 2011 4:32 am

Using hb_objSendMsg()

Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42084
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: sending a msg to an object from low level code

Postby Carles » Sun Jun 19, 2011 9: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
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1134
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: sending a msg to an object from low level code

Postby Antonio Linares » Mon Jun 20, 2011 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42084
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

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