<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>hi,<br>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. <br>can you help me!<br><br><br><br><br>the code are follows:<br><br>typedef void __fastcall (__closure *TGAInitializer)(GAGenome* AGenome);<br><br>static void Initializer(GAGenome &AGenome);<br><br>TGAInitializer FOnGenomeInit;<br><br>__property TGAInitializer OnGenomeInit = { read=FOnGenomeInit, write=OnGenomeInit };<br><br><br>void TCustomGEP::Initializer(GAGenome
&AGenome)<br>{<br> if(FOnGenomeInit)<br> FOnGenomeInit(&AGenome);<br>}<br><br>//in constuctor of my component<br>FGenome->Initializer = &Initializer;<br><br></div></div><br>
<hr size=1><a href="http://cn.mail.yahoo.com" target=blank>ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä3.5GÈÝÁ¿£¬20M¸½¼þ£¡</a> </body></html>