Assignement to UNO Sequence using index operator fails in Ruby
This post has NOT been accepted by the mailing list yet.
I have a UNO-Ruby Bridge implementation which allows implementation of Uno components using Ruby. However I encountered a corner case in the following scenario. In IDL file, I have a uno struct (i.e Book) containing a member of the type UNO Sequence (i.e data).
1. When we use following approach to assign values to Book.data member, it works:
Following is the reason why above assignment works:
a. UNO-Ruby Bridge is built upon method_missing(). Whenever any new construct is encountered in Ruby script, Ruby invokes method_missing() by passing appropriate arguments to this method.
b. In above scenario, method_missing() gets parameter methodName as "data=" and args as "dataElements". If methodName ends with a '=' (in this case it does), value of args is assigned to methodName.
2. When we use following approach to assign values to Book.data member, it gives unexpected result.
In this case, Ruby invokes method_missing(), however arguments to this method_missing() are not getting populated correctly from Ruby.
In this case inside method_missing(), we get parameter methodName as "data" and args as empty. Thus the assignment fails.
Our interest is to make above mentioned second approach work.
Is there any way this can be achieved?
Can we debug how the parsing happens and how the arguments sent to method_missing() are populated?
Any help/pointers are much appreciated.