pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Whitcomb <RogerandB...@rbwhitcomb.com>
Subject Re: BXMLSerializer: different handling of script return values
Date Fri, 22 Apr 2016 15:01:20 GMT
I just tried it and going in from pivot.apache.org if I click on the red "Create" button, Pivot
shows up at the top but doesn't show up later in "All Projects". So just try again. 

Or I can create the issue and you can comment on it. 

~Roger Whitcomb

Sent from my iPhone

> On Apr 22, 2016, at 7:16 AM, Josh Highley <joshhighley@gmail.com> wrote:
> 
> I must be missing something:  I've submitted Pivot issues on JIRA before (ex: PIVOT-980),
but now when I go to Create Issue, Pivot isn't in the list of Projects.
> <image.png>
> 
> 
> 
> 
> 
> 
>> On Thu, Apr 21, 2016 at 2:54 PM, Roger Whitcomb <Roger.Whitcomb@actian.com>
wrote:
>> Hi Josh,
>> 
>>                 That just looks like a bug to me.  Can you file a JIRA and provide
a patch along with, and I will commit the changeā€¦
>> 
>>  
>> 
>> Thank you!
>> 
>> ~Roger
>> 
>>  
>> 
>> From: Josh Highley [mailto:joshhighley@gmail.com] 
>> Sent: Thursday, April 21, 2016 12:15 PM
>> To: user@pivot.apache.org
>> Subject:
>> 
>>  
>> 
>> In my bxml, I defined a TextInputContentListener method for previewInsertText in
script.  The method was getting invoked, but my returned Vote seemed to get ignored.  Stepping
through the code, I found that BXMLSerializer never assigns the result variable and ignores
the returned value when the method is specified as an attribute but not when it's a child
element.  Is there a reason for this, or is this a bug? 
>> 
>>  
>> 
>> I'm using 2.0.4, but the same code is in trunk
>> 
>>  
>> 
>> BXMLSerializer:
>> 
>>  
>> 
>> inner class AttributeInvocationHandler, method invoke(Object proxy, Method method,
Object[] args)
>> ....
>>    // If the function didn't return a value, return the default
>>    Class<?> returnType = method.getReturnType();
>>    if (returnType == Vote.class) {
>>        result = Vote.APPROVE;
>>    } else if (returnType == Boolean.TYPE) {
>>        result = false;
>>    }
>>  
>>    return result;
>>  
>> inner class ElementInvocationHandler, method invoke(Object proxy, Method method,
Object[] args)
>> .....
>>    // If the function didn't return a value, return the default
>>    if (result == null) {
>>       Class<?> returnType = method.getReturnType();
>>       if (returnType == Vote.class) {
>>          result = Vote.APPROVE;
>>       } else if (returnType == Boolean.TYPE) {
>>          result = false;
>>       }
>>    }
>>  
>>    return result;
>>  
>> Thanks,
>> Josh
> 

Mime
View raw message