ILTimeInputField

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ILTimeInputField

thiago_sl
Hi list.
In Iliad-More-Formula.0.9.1.2 current version (at IliadDev) ,
ILTimeInputField class seems  not functional. Its not called by
ILFormula and there are bugs in its initialization. I made some
changes to make it works:

1 - Need to create the  #timeInputOn: aSelector message in ILFormula.
   timeInputOn: aSelector
        ^self addField: (ILTimeInputField on: self selector: aSelector)


2 - The ILTimeInputField #initialize causes error (formula is nil),
because it calls #value: aTime, overriding the ILField message, and it
needs formula (not present yet). The solution:
ILTimeInputField
 a) #initialize
        super initialize.
        self time: Time now.

 b) #value:aTime removed!!

 c) added
    #value
        ^super value ifNil: [ self time  ]

It solution is working well in my sample test.

Thiago da S. Lino
Reply | Threaded
Open this post in threaded view
|

Re: ILTimeInputField

Nicolas Petton
Thanks Thiago :)

Le mercredi 25 mai 2011 à 16:23 -0700, Thiago SL a écrit :

> Hi list.
> In Iliad-More-Formula.0.9.1.2 current version (at IliadDev) ,
> ILTimeInputField class seems  not functional. Its not called by
> ILFormula and there are bugs in its initialization. I made some
> changes to make it works:
>
> 1 - Need to create the  #timeInputOn: aSelector message in ILFormula.
>    timeInputOn: aSelector
> ^self addField: (ILTimeInputField on: self selector: aSelector)
>
>
> 2 - The ILTimeInputField #initialize causes error (formula is nil),
> because it calls #value: aTime, overriding the ILField message, and it
> needs formula (not present yet). The solution:
> ILTimeInputField
>  a) #initialize
> super initialize.
> self time: Time now.
>
>  b) #value:aTime removed!!
>
>  c) added
>     #value
> ^super value ifNil: [ self time  ]
>
> It solution is working well in my sample test.
>
> Thiago da S. Lino

--
Nicolas Petton
http://www.nicolas-petton.fr