[Seaside-dev] Contributing bug fixes in Seaside
Jimmie Houchin
j.squeak at cyberhaus.us
Sat Dec 8 18:47:15 UTC 2007
Philippe Marschall wrote:
> 2007/12/7, Jimmie Houchin <j.squeak at cyberhaus.us>:
>> Hello,
>>
>> What is the preferred procedure for people like me who have a potential
>> bug fix for Seaside. I am not one of the developers and do not mind
>> having my work inspected by others before approval and being committed.
>> However, I am happy to commit to the repository if that is preferred. I
>> just don't want to cause problems. Though I am very cautious about
>> anything I would commit.
>
> http://www.seaside.st/community/contribute
> Monticello is not like cvs, we prefer your contribution in as a
> commit. In general try to add a helpful log message and keep the
> commits small. It is recommended that you subscribe to this
> mailinglist. If you feel that more needs to be said than the code and
> and log message open a thread with the version name as a subject.
>
>> While playing around today, I ran into an error when playing with the
>> Functional Seaside Test Suite and clicking on the Date and Time
>> Selector. I clicked debug, and fixed the code. It is running fine now. I
>> do not know if this is the best way to solve this bug or not. But it works.
>>
>> Any input greatly appreciated.
>>
>>
>> renderSeconds
>> | brush |
>> brush := canvas textInput
>> id: (self id isNil
>> ifFalse: [self id , '-secs']);
>> value: seconds asFloat rounded asTwoCharacterString;
>> yourself.
>> self addSecondsCallbackToBrush: brush.
>> brush attributeAt: 'size' put: 2;
>> attributeAt: 'maxlength' put: 2
>>
>>
>> The line:
>> value: seconds asTwoCharacterString;
>> was giving an error.
>> I changed it to:
>> value: seconds asFloat rounded asTwoCharacterString;
>>
>> Let me know how the community wants to handle things like this.
>
> Can you describe the problem you obversed? A stack trace would be very
> helpful. Looking at the code it might be better to change WATimeInput
>>> #seconds: to send #asInteger instead of #asNumber since
> asTwoCharacterString is implemented in Integer.
Hello,
Thanks for your reply.
I knew about the Seaside repository. I have updated to the latest. But I
am not expert in Monticello and didn't want mess anything up.
I will commit my fix (and future fixes).
Below is the stack trace.
I went ahead and just changed the #renderSeconds as I noted. Changing
the #seconds to an integer did not fix the Functional Test. The test
within itself used Time now. And provided the seconds directly, not from
WATimeInput. I tried your suggestion and discovered this.
Since Time provides seconds as a Fraction. It seemed to me that it is
most reasonable to leave this as a rendering method and not changed the
manner in which seconds may be passed as an argument.
At least that's my thoughts, right or wrong.
The fix as described has been committed.
Thanks.
Jimmie
Seaside Walkback
MessageNotUnderstood: Fraction>>asTwoCharacterString
Debug Proceed Full Stack
Possible Causes
* you sent a message this type of object doesn't understand
Stack Trace
1. thisContext
Fraction(Object)>>doesNotUnderstand: #asTwoCharacterString
self
(51247/1000)
aMessage
asTwoCharacterString
2. thisContext
WATimeInput>>renderSeconds
self
a WATimeInput
brush
nil
3. thisContext
WATimeInput>>with:
self
a WATimeInput
aBlock
nil
4. thisContext
WATimeInput(WACompound)>>close
self
a WATimeInput
5. thisContext
WARenderCanvas(WACanvas)>>flush
self
a WARenderCanvas
More information about the seaside-dev
mailing list