Daniel Garcia-Gil wrote:Daniel Garcia-Gil wrote:Cristóbal
Ahora piensa en esta posible utilidad, agregar un codeblok que se ejecute cuando se borre/agregue un ítem bOnItemDeleted / bOnItemAdded
He creado estas DATAs, espero haber entendido el alcance de tu comentario
- Code: Select all Expand view RUN
DATA bPrevItemDeleted
DATA bPrevItemAdded
DATA bPostItemDeleted
DATA bPostItemAdded
y las he aplicado asi:
- Code: Select all Expand view RUN
METHOD AddItem( cItem, cResName, bRedefineControls, cnHelpId )
.../...
if ValType( ::bPrevItemAdded ) == "B"
Eval( ::bPrevItemAdded, Self, ::nOption )
endif
if Empty( cResName )
.../...
::Refresh()
if ValType( ::bPostItemAdded ) == "B"
Eval( ::bPostItemAdded, Self, ::nOption )
endif
RETURN NIL
//------------------------------------------------------------------------//
METHOD DelItem( nOption )
.../...
if Len( ::aPrompts ) > 0
if ValType( ::bPrevItemDeleted ) == "B"
Eval( ::bPrevItemDeleted, Self, nOption, ::nOption )
endif
.../...
if ValType( ::bPostItemDeleted ) == "B"
Eval( ::bPostItemDeleted, Self, nOption, ::nOption )
endif
endif
return nil
Quizás tambien habria que añadir al Metodo DelItem
- Code: Select all Expand view RUN
.../...
ADel( ::aBrightBmp, nOption )
ASize( ::aBrightBmp, Len( ::aBrightBmp ) - 1 )
ADel( ::aAlphaLevel, nOption) //Biel 1404
ASize( ::aAlphaLevel, Len( ::aAlphaLevel ) - 1 )
ADel( ::aHasAlpha, nOption )
ASize( ::aHasAlpha, Len( ::aHasAlpha ) - 1 )
ADel( ::aAlign, nOption )
ASize( ::aAlign, Len( ::aAlign ) - 1 )
.../...
¿Qué opinas?