JQueryMobile - small correction in JQMUserAgent

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

JQueryMobile - small correction in JQMUserAgent

Tomas Kukol
Hi list.

I have found a small bug in JQueryMobile class JQMUserAgent. Sometimes
a user agent string is not filled and the code throws an exception.

Can you change the code FROM:

JQMUserAgent>>isIOS
        ^ #('iPhone' 'iOS' 'iPod' 'iPad')
                anySatisfy: [ :each |
                        self userAgentString includesSubString: each ]


TO this version?

JQMUserAgent>>isIOS
        ^ #('iPhone' 'iOS' 'iPod' 'iPad')
                anySatisfy: [ :each | self userAgentString isEmptyOrNil not and: [
self userAgentString includesSubString: each ] ]
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: JQueryMobile - small correction in JQMUserAgent

Nick
Hi Thomas,

Thanks for the bug report. I've added you as a developer to the jQueryMobile repository: http://ss3.gemstone.com/ss/jQueryMobile.html/

... so feel free to add the fix. Another fix might be to modify the following:

JQMUserAgent>>userAgentString
   ^ userAgentString ifNil: [ userAgentString := '' ]

Then JQMUserAgent>>isIOS remains simply as it is.

At the moment I'm in the process of updating jQueryMobile to support the latest version 1.1.1, however I've noticed that the transitions don't appear as iPhone-like as 1.0.1. The solution appears to be to integrate something like: https://github.com/watusi/jquery.mobile.simultaneous-transitions - though I've yet to complete that work. The upshot is that if you're using an old version - probably best to stick to that at the moment. 

Thanks again for the bug fix

Nick

On 12 September 2012 10:27, Tomas Kukol <[hidden email]> wrote:
Hi list.

I have found a small bug in JQueryMobile class JQMUserAgent. Sometimes
a user agent string is not filled and the code throws an exception.

Can you change the code FROM:

JQMUserAgent>>isIOS
        ^ #('iPhone' 'iOS' 'iPod' 'iPad')
                anySatisfy: [ :each |
                        self userAgentString includesSubString: each ]


TO this version?

JQMUserAgent>>isIOS
        ^ #('iPhone' 'iOS' 'iPod' 'iPad')
                anySatisfy: [ :each | self userAgentString isEmptyOrNil not and: [
self userAgentString includesSubString: each ] ]
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: JQueryMobile - small correction in JQMUserAgent

Tomas Kukol
Hi Nick.

Thank you for your wonderful work on JQueryMobile.

I am beginner with Smalltalk so I will consult all bug corrections (I
hope none) with you. :-)

Best regards,
Tomas


On Wed, Sep 12, 2012 at 2:24 PM, Nick Ager <[hidden email]> wrote:

> Hi Thomas,
>
> Thanks for the bug report. I've added you as a developer to the jQueryMobile
> repository: http://ss3.gemstone.com/ss/jQueryMobile.html/
>
> ... so feel free to add the fix. Another fix might be to modify the
> following:
>
> JQMUserAgent>>userAgentString
>    ^ userAgentString ifNil: [ userAgentString := '' ]
>
> Then JQMUserAgent>>isIOS remains simply as it is.
>
> At the moment I'm in the process of updating jQueryMobile to support the
> latest version 1.1.1, however I've noticed that the transitions don't appear
> as iPhone-like as 1.0.1. The solution appears to be to integrate something
> like: https://github.com/watusi/jquery.mobile.simultaneous-transitions -
> though I've yet to complete that work. The upshot is that if you're using an
> old version - probably best to stick to that at the moment.
>
> Thanks again for the bug fix
>
> Nick
>
> On 12 September 2012 10:27, Tomas Kukol <[hidden email]> wrote:
>>
>> Hi list.
>>
>> I have found a small bug in JQueryMobile class JQMUserAgent. Sometimes
>> a user agent string is not filled and the code throws an exception.
>>
>> Can you change the code FROM:
>>
>> JQMUserAgent>>isIOS
>>         ^ #('iPhone' 'iOS' 'iPod' 'iPad')
>>                 anySatisfy: [ :each |
>>                         self userAgentString includesSubString: each ]
>>
>>
>> TO this version?
>>
>> JQMUserAgent>>isIOS
>>         ^ #('iPhone' 'iOS' 'iPod' 'iPad')
>>                 anySatisfy: [ :each | self userAgentString isEmptyOrNil
>> not and: [
>> self userAgentString includesSubString: each ] ]
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside