[galib] a question on GALIB

xm yang vchs62003 at yahoo.com.cn
Sat Jun 23 00:59:13 EDT 2007


hi,
I want to create a componet  TGAComponent used to publishing some events for running  GAOperators, such as Evaluator, Mutator. However, there are some type conversion errors are reported  in compiling progress when I don't use static in declaring functions in which event methods are called. when using static, the calling to component's methods are refused. 
can you help me!




the code are follows:

typedef void __fastcall (__closure *TGAInitializer)(GAGenome* AGenome);

static void  Initializer(GAGenome &AGenome);

TGAInitializer FOnGenomeInit;

__property TGAInitializer OnGenomeInit = { read=FOnGenomeInit, write=OnGenomeInit };


void  TCustomGEP::Initializer(GAGenome &AGenome)
{
        if(FOnGenomeInit)
                FOnGenomeInit(&AGenome);
}

//in constuctor of my component
FGenome->Initializer = &Initializer;





      ___________________________________________________________ 
ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä3.5GÈÝÁ¿£¬20M¸½¼þ£¡ 
http://cn.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20070623/2cb7aee7/attachment.htm


More information about the galib mailing list