myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott O'Bryan" <darkar...@gmail.com>
Subject Re: [jira] Created: (TRINIDAD-1242) Convenience API to test for iPhone agent
Date Thu, 25 Sep 2008 21:30:52 GMT
I think what he's saying is that we have pre-exsiting API's.  Still, we 
could add an isPlatform or even a better a getPlatform which takes an 
Agent enum.  The convenience methods could be deprecated (or not) and 
then simply tie use the much nicer isPlatform method.

The real question becomes, do we support the new user agents going 
forward with the convenience methods or not?  I personally think that 
there is no time like the present to move to the new API if you need to 
know about iPhone.  :)

As for the get vs. the IS, I could see the agent annotation adding 
capability properties and whatnot.  Getting this enum rather then simply 
testing for it opens up a whole world of flexibility (including doing 
conditionals for multiple renderkits at once.  Since Enums are 
guarenteed equality and can even work inside of a switch statement, you 
get a lot more leverage out of a get then you do out of an is.

In either case, I like the suggestion.

Scott

Matthias Wessendorf wrote:
> Hi,
>
> On Thu, Sep 25, 2008 at 12:09 PM, Andrew Robinson
> <andrew.rw.robinson@gmail.com> wrote:
>   
>> Would have been nice to have an enum instead
>> (isPlatform(Agent.IPHONE)), seems more extensible and easier to
>> support than adding tons of methods, but I guess it is too late for
>> that suggestion
>>     
>
> Why is it too late?
>
> -M
>
>   
>> On Thu, Sep 25, 2008 at 12:01 PM, Andy Schwartz (JIRA)
>> <dev@myfaces.apache.org> wrote:
>>     
>>> Convenience API to test for iPhone agent
>>> ----------------------------------------
>>>
>>>                 Key: TRINIDAD-1242
>>>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1242
>>>             Project: MyFaces Trinidad
>>>          Issue Type: Improvement
>>>            Reporter: Andy Schwartz
>>>            Priority: Minor
>>>
>>>
>>> CoreRenderer contains a variety of convenience methods for checking the agent
type/name, eg:
>>>
>>> isDesktop
>>> isPDA
>>> isIE
>>> isGecko
>>> isWebKit
>>>
>>> Can we also add isIPhone?
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> You can reply to this email to add a comment to the issue online.
>>>
>>>
>>>       
>
>
>
>   


Mime
View raw message