Hi Chris,

How's your scripting?  There isn't a feature for that in Exhibit that I
know of, you'll have to implement your own solution.

If Javascript isn't your favorite, and if it's not too much work for you
to generate data, perhaps you can add a new property
fileReferencesExcerpt to your JSON generation pipeline that does the
selection of N items before Exhibit ever receives data.

Otherwise we're talking about adding a new Exhibit expression, or a new
Exhibit importer that does the selecting of N items into a new property
at load time, or a completely separate script that truncates Exhibit's
output; and I'm sure there are other possibilities.

On 6/21/11 2:20 AM, cturner wrote:
> Hi Ryan,
> 
> thanks for your reply. I followed your advice and reordered my data into two 
> separate files: 
> {
>   "items": [
>     {
>       "id": 228,
>       "label": "IDS_BLABLUB_228",
>       "fileReferences": [
>         "file_4975",
>         "file_4976",
>         "file_4977",
>         "file_4978"
>       ],
>       "name": "IDS_BLABLUB",
>       "count": 4
>     },
>   ],
>   "properties": {
>     "count": {
>       "valueType": "number"
>     },
>     "name": {
>       "valueType": "text"
>     },
>     "fileReferences": {
>       "valueType": "item"
>     }
>   }
> 
> and the file reference data:
> ----snip----
>     {
>       "label": "file_4975",
>       "id": 4975,
>       "fileName": "D:\\Development\\blabla.java",
>       "lineNumber": 39,
>       "line": "currentDialogID \u003dIDS_BLABLUB"
>     },
>     {
>       "label": "file_4976",
>       "id": 4976,
>       "fileName": "D:\\Development\\\blublu.java",
>       "lineNumber": 130,
>       "line": "case IDS_BLABLUB:"
>     },
> ----snip----
> 
> You were right my core question was how to extract the first n elements and 
> display them - the order of the references isn't important. But I still 
> don't know how to do that... 
> 
> Best,
> Chris
> 

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to