hi all
when i use this function i get this error .
Duplicate id found control ids must be unique
i use the function in the same FLA
1 -
function EIOWEditNumber( idEdit, initialValue, EIOW_x, EIOW_y, width, height, textColor, bgColor )
{ // this function hold the text for the next restart of Amibroker
global _x0, _y0;
local rc ;
EIOW_x = EIOW_x + _x0; EIOW_y = EIOW_y + _y0;
rc = GuiEdit( idEdit, EIOW_x, EIOW_y, width, height, notifyHitReturn ); //
ID = GuiGetEvent( 0, 0 ); event = GuiGetEvent( 0, 1 );
if( ID == idEdit ) StaticVarSetText( "sV" + Name() + idEdit, GuiGetText( idEdit ), 1 );
if( rc == guiNew )
{ // after restart Amibroker read FIRST these Static Line
txt = StaticVarGettext( "sV" + Name() + idEdit );
GuiSetText( txt, idEdit );
}
GuiSetColors( idEdit, idEdit, 5, colorWhite, colorYellow, colorLightGrey );
return GuiGetValue( idEdit );
}
2-
function MAQEditNumber( idEdit, initialValue, MD_MAQ_x, MD_MAQ_y, width, height, textColor, bgColor )
{ // this function hold the text for the next restart of Amibroker
global _x0, _y0;
local rc ;
MD_MAQ_x = MD_MAQ_x + _x0; MD_MAQ_y = MD_MAQ_y + _y0;
rc = GuiEdit( idEdit, MD_MAQ_x, MD_MAQ_y, width, height, notifyHitReturn ); //
ID = GuiGetEvent( 0, 0 ); event = GuiGetEvent( 0, 1 );
if( ID == idEdit ) StaticVarSetText( "sV" + Name() + idEdit, GuiGetText( idEdit ), 1 );
if( rc == guiNew )
{ // after restart Amibroker read FIRST these Static Line
txt = StaticVarGettext( "sV" + Name() + idEdit );
GuiSetText( txt, idEdit );
}
GuiSetColors( idEdit, idEdit, 5, colorWhite, colorYellow, colorLightGrey );
return GuiGetValue( idEdit );
}
thank you for your help