From 4b6b4ad708be39e7d1dd697ce7d85ca4fe8b4e2c Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 29 Oct 2017 16:00:08 +0100 Subject: [PATCH] LocationQuery: now able to handle perspective info properly ...which was deliberately represented in an asymmetric way, to verify the design's ability to cope with such implementation intricacies. So basically we have to kick in at LEVEL == 1 and access the implementation differently. This exercise just shows again, that treating tree structures recursively is the way to go, and we should do similar when coding up the query-API for the real GTK toolkit based window elements... --- src/gui/interact/gen-node-location-query.hpp | 11 ++++++----- wiki/thinkPad.ichthyo.mm | 12 ++++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/gui/interact/gen-node-location-query.hpp b/src/gui/interact/gen-node-location-query.hpp index 944436830..10545d309 100644 --- a/src/gui/interact/gen-node-location-query.hpp +++ b/src/gui/interact/gen-node-location-query.hpp @@ -148,12 +148,12 @@ namespace interact { throw error::State(_Fmt{"unable to drill down to depth %d: " "element %s at pos %d in path %s is in " "contradiction to actual UI structure"} - % (pos+1) + % pos % (depth Literal { return Symbol{id}; }; - ///////////////////////////////////////////////////////////////TICKET #1113 : could just use lib::wrapIter when GenNode exposes Literal as ID - return lib::transform (node.keys(), internedString); + return depth==UIC_PERSP? lib::singleVal (internedString (node.getType())) + : lib::transform (node.keys(), internedString); + /////////////////////////////////////////////////////////////////////TICKET #1113 : could just use lib::wrapIter when GenNode exposes Literal as ID } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 9904b8d12..9c3d516bf 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -4575,8 +4575,8 @@ - - + + @@ -4683,11 +4683,15 @@ - - + + + + + +