Página 1 de 1

TPlaning Control

Publicado: Lun Ago 25, 2008 7:00 am
por Dionisis Divaris
Hello Ignacio Jose
Please explain if possible how to make further updates
to the TPlaning Control after first creation of dates notes.
I try the deleteItem Method but dosen't works. I want to
make a scheduler dased on this control. Any help would be apreciated.
TIA
Dionisis

TPlaning Control

Publicado: Lun Ago 25, 2008 11:06 am
por ignacio
Dionisis,
You have the full source code and is all high level code. Indeed, this
control was made as a sample so any one could make its own controls.
The method deleteItem() receives a nItem value which is its ordinal position
on the array aItems. The methos seems to work right, but when you delete a
Item all the Items after that one will decrease its ordinal position by one.
The method DeleteItem() can be easely updated to also support a oItem
parameter.
[Not tested]
METHOD DeleteItem( Item ) CLASS XPlanning
LOCAL nItem
IF Valtype( Item ) == "O"
nItem := Ascan( ::FaItems, {|v| v == Item } )
ELSE
nItem := Item
ENDIF
IF nItem >= 1 .AND. nItem <= Len( ::FaItems )
ADel( ::FaItems, nItem )
ASize( ::FaItems, Len( ::FaItems ) - 1 )
::Refresh( .T. )
ENDIF
RETURN Nil
--
Ignacio Ortiz de Zúñiga
[Xailer support]
"Dionisis Divaris" <info@sgs-soft.gr> escribió en el mensaje
news:48b23c87$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Hello Ignacio Jose
>
> Please explain if possible how to make further updates
> to the TPlaning Control after first creation of dates notes.
> I try the deleteItem Method but dosen't works. I want to
> make a scheduler dased on this control. Any help would be apreciated.
>
> TIA
> Dionisis
>

TPlaning Control

Publicado: Lun Ago 25, 2008 11:06 am
por ignacio
Dionisis,
You have the full source code and is all high level code. Indeed, this
control was made as a sample so any one could make its own controls.
The method deleteItem() receives a nItem value which is its ordinal position
on the array aItems. The methos seems to work right, but when you delete a
Item all the Items after that one will decrease its ordinal position by one.
The method DeleteItem() can be easely updated to also support a oItem
parameter.
[Not tested]
METHOD DeleteItem( Item ) CLASS XPlanning
LOCAL nItem
IF Valtype( Item ) == "O"
nItem := Ascan( ::FaItems, {|v| v == Item } )
ELSE
nItem := Item
ENDIF
IF nItem >= 1 .AND. nItem <= Len( ::FaItems )
ADel( ::FaItems, nItem )
ASize( ::FaItems, Len( ::FaItems ) - 1 )
::Refresh( .T. )
ENDIF
RETURN Nil
--
Ignacio Ortiz de Zúñiga
[Xailer support]
"Dionisis Divaris" <info@sgs-soft.gr> escribió en el mensaje
news:48b23c87$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Hello Ignacio Jose
>
> Please explain if possible how to make further updates
> to the TPlaning Control after first creation of dates notes.
> I try the deleteItem Method but dosen't works. I want to
> make a scheduler dased on this control. Any help would be apreciated.
>
> TIA
> Dionisis
>