Page 1 of 1

User configured context-menu

PostPosted: Thu Mar 05, 2015 11:28 pm
by mordenkainen
Purpose: let user write custom operations for topics in TMQL, store them in a map, apply them fast for selected item.

How I'm using TMQL now.
I start with some preparations. Create Selected content class to store selected items, create Query content class with query occurrence type to store prepared
When I want to apply one of my queries I perform following steps:

1. Select target topics
2. Add them to the Selected class
3. Copy occurrence from desired query
4. Run Ctrl-F
5. Paste query inside the form
6. Run query
7. Remove all instances from the Selected class

What I'm seeking for

Built-in single player association to mark selected items. Every time user (de)selects topic(s) the associations is added (removed) to them.
Built-in class for storing queries. Its content should be a valid query.
Built-in class for storing user menu items. Menu item must have a display name and association with a query that determines its availability. The query is supposed to check if players in the selected association fit the menu item purpose, to show different menu items depending on context. Menu item is shown only If the query returns non-null value. Menu item may have any number of queries that would be run on activation. They stored as triple association between menu item, query exemplar, order of execution (any type allowing sorting).

As a result user would be able to select target topics and perform queried action by single click in the menu. There may be some common used actions included in the base map. As it already has predefined Wandora language list. And user may add anything he need to the topic map.

Optional features
Menu items that contains submenus.
Built-in class to store query run report (outputed tuples). To allow materialize query result in a permanent topic for further reviewing. All outputed tuples becomes associations typed with query that produced them.

Re: User configured context-menu

PostPosted: Fri Mar 06, 2015 5:38 pm
by akivela

Interesting proposition. Thank you.

Let me suggest another solution that probably covers your idea but is much simpler and faster to implement.

What if Wandora user could store TMQL scripts into occurrences and execute these occurrence-stored TMQL scripts in a context-aware way. The user could place the TMQL scripts where they are used. And TMQL scripts are stored along the topic map. No need for external storage.

This solution would be similar to existing solution where Wandora can run occurrence-stored Processing and R language scripts. Also, this kind of solution would support my view of how I want to expand the role of occurrences in Wandora.

Kind Regards,

Re: User configured context-menu

PostPosted: Tue Mar 10, 2015 12:05 pm
by akivela
Wandora's source code repository at Github contains a commit that adds Wandora the Run occurrence as TMQL feature. ... bec71d5b7a

The feature is still experimental and may change before release but the principle stays. Now the user can right click any occurrence and choose menu item Run occurrence > Run as TMQL. Wandora assumes the occurrence text is TMQL script and tries to execute it. Wandora views TMQL results in a dialog window with a topic table.

Kind Regards,
Aki / Wandora Team