scene guidance, please

21 views
Skip to first unread message

John W.

unread,
Dec 15, 2017, 9:56:02 AM12/15/17
to Tasker
I've used Tasker since 2012 but never had a use for scenes until this month and I could really use some guidance.

I have a popup scene that, when long-pressing the text1 element, tests the text1 value and then calls a variable query preloaded with text1's value. The idea is to allow the user to edit that text. A glitch comes in returning the query's value back to the popup scene. Not only does the queried value not pass back to the popup, but the popup variable holding text1's tested value becomes un-set. The UG suggests that the child scene creates copies of the parent scene's variables such that changes to the child's variables are not reflected in the parent scene. OK, I get that, but what I don't understand is why the child var query scene does not *return* its value. Any ideas?

John W.

unread,
Dec 15, 2017, 10:39:44 AM12/15/17
to Tasker
In a lark, I retrieved the caller chain and I wonder if it doesn't explain the issue as there seems to be an extraneous/redundant caller:

scene=Variable Query:TextEdit1,scene=Variable Query:TextEdit1,scene=Popup:Text1,scene=Menu:Menu,qstile=Information

Rich D

unread,
Dec 15, 2017, 7:23:34 PM12/15/17
to Tasker Google Groups Post


I have a popup scene that, when  long-pressing the text1 element, tests the text1 value and then calls a variable query preloaded with text1's value. The idea is to allow the user to edit that text. A glitch comes in returning the query's value back to the popup scene. Not only does the queried value not pass back to the popup, but the popup variable holding text1's tested value becomes un-set. The UG suggests that the child scene creates copies of the parent scene's variables such that changes to the child's variables are not reflected in the parent scene. OK, I get that, but what I don't understand is why the child var query scene does not *return* its value. Any ideas?


This seems to work on my device. Here is the task I have in the popup long press tab.  When I edit the text in the variable query and tap the check mark I get a flash of the edited text. 

Rich D

unread,
Dec 15, 2017, 7:24:22 PM12/15/17
to Tasker Google Groups Post
Popup Task (406)
A1: Test Element [ Scene Name:Popup Element:Text1 Test:Value Store Result In:%paste ] 
A2: Flash [ Text:%paste Long:On ] 
A3: Variable Query [ Title: Variable:%paste Input Type:Normal Text Default:%paste Background Image: Layout:Variable Query Timeout (Seconds):10 Show Over Keyguard:On ] 
A4: Flash [ Text:%paste

%caller() Long:On ] 
A5: Variable Set [ Name:%Caller To:%caller() Recurse Variables:Off Do Maths:Off Append:Off ] 

Rich D

unread,
Dec 15, 2017, 8:18:40 PM12/15/17
to Tasker Google Groups Post
Could you also post the relevant part of the run log? Judging by your %caller data we are not doing the same thing. My %caller looks like this.

scene=Variable Query:Accept,scene=Popup:Text1,ui
Screenshot_20171215-201524.png

John W.

unread,
Dec 17, 2017, 9:08:32 AM12/17/17
to Tasker
In light of your post in which you used %paste, I tried using a different var name and voilà, it worked. When I tested the element text, I stored it in %value. %value passed just fine to the var query, but returned as an unset var from the var query. The fact that changing the variable name worked suggests that %value is a "reserved word" for the variable query scene. Only Pent would be able to confirm if it is purposefully reserved or unintentionally reserved. But either way, thanks Rich for leading me down the road to a solution.
Reply all
Reply to author
Forward
0 new messages