Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Porting Auto-Gen Music Templates to Existing System
I really like the auto-generated music templates and the functionality they provide, and I'm trying to merge them into my system. I'm on 4.8.3.

I can get them to work as contemplated when I load the "Main" template (in User\CQC_AutoGen\1280x800\Room\Main), which in turn loads Overlay_Main, then Overlay_Main_Left, then Overlay_Main_Tiles where the Music tile is--and all is good.

But when I put a command button with the action to load the AG "Main" template on my master template, I get the tiles properly loaded, but when I press the "Music" bar in the Music tile to load the "Overlay_MusicBrowse," I get this message: "An asynchronous callback failed. Callback id=ScrollOverlay," with the details that "The target must be an overlay widget."

The auto-generated Action for the Music command button in the Music tile is:

// The auto-gen will enable and update this to invoke an action if configured
-System:Big GrinoGlobalAct

// And now load our overlay and scroll over to view it


I have read everything I can find on the LoadSiblingOverlay and it seems that loading the "Main" AG template from a command button has disturbed the "relative path" that the action uses to find the target. Based on the development guide description of the LoadSiblingOverlay, I have tried every combination of "double dots" and slashes to get to the target. I have also tried non-"relative path" alternatives. Nothing seems to work and when I vary the paths (relative or not), I usually get "the container path did not resolve to a legal target container."

Oddly enough, when I change the command button on my main template to load the AG "Overlay_Main" template (instead of the AG "Main" template), the CAB browsing loads and scrolls but the upper part of the screen with the content overlay does not scroll back to the tiles.

Thoughts on how to replicate the functionality of the auto-generated music templates in an existing template?

It's tricky, and I have trouble with it, because it involves some fairly complicated nestings of overlays to get it to work that way.

The LoadSiblingOverlay command is used because both the tiles and the right side content overlays are side by side within the underlying template that contains them. There's no way to directly load the right side from the stuff that has been loaded into the tiles side overlay. So it uses the sibling overlay loading thing.

The ..\..\ContentOverlay is how it's getting to the right side. One .. gets up to the tiles overlay, and another .. gets up to the common parent they share.

The template that contains both of those overlays is loaded into the main overlay, so the layering is like this:

[tiles    ][      content]
  [    parent container   ]
  [main over]

So it's the parent container overlay that is actually being scrolled back and forth within the half as wide main overlay. So if something in the tiles overlay wants to scroll, it has to ask the main overlay to scroll. So tiles will be the parent, container the grandparent, and main the great grandparent.

And, if I look at the existing auto-gen content in 5.0, that command is:

ScrollParent(Left, Great Grandparent)

which seems right to me. I'm not sure why yours indicates GrandParent, which would seem one short of the target. Maybe something changed there from 4.8 to 5.0. What CQC version are you on?

Anyhoo, once you change this to happen from a button outside of all of this stuff in your main template, then none of that stuff applies anymore. It's only being done because it's all happening within the content that is being affected. If you are doing this from a button in your main template, then it would be done very differently.

For one, you will have no access to the right side content overlay. You can ask our main overlay to scroll, which you would just do directly instead of using ScrollParent() because the button doing the asking isn't a child of any of that stuff. But, you have no way to get to the child overlays that were loaded into your main template. Well, you could do it from a button in your main overlay, since those two overlays are now children of it. But from the perspective of your main template, those two left/right overlays are children of children, so you have no way to get to them from the main template.

So, there's not really any way to adapt that stuff to the scheme you are using. There would need to be some sort of means to load a child overlay of a child overlay or something. That could be done but doesn't exist now.

You'd really have to move your main functionality selection buttons into the tiles overlay so that the buttons that do the invocation are on the inside and can then use the sibling overlay load and scroll parent stuff.

Did that make any sense? If not, I'll take another shot at it.
Dean Roddey
Explorans limites defectum
Dean, thanks for the explanation.

I'll continue to dissect the AG music templates and see what works with my setup or I may just customize the auto generation music templates.

BTW, the Grandparent instead of Great Grandparent glitch was my error--I cut and pasted the AG Action at a time when I was going through one of my countless iterations and did not notice it was not from the actual, auto-generated, default template.

Thanks again.
If you just adopting the tiles scheme, then you could just move your functionality into your own modifications of the auto-gen stuff. I.e. get rid of your main screen functionality (other than maybe some display stuff) and move your main functionality selection stuff into the tiles, just add more tiles if you need them, you can scroll the up and down to get to all of them.

Then your existing overlays work the same way, being loaded to the right side, then scrolled over to make them visible.
Dean Roddey
Explorans limites defectum
I'm working on a preliminary variation of that. Right now I have a button approach modeled heavily on gacevich templates [url=][/url] so I could just move the content of each button to a tile.

For now, though, I have simply created an empty "My Main" template to mirror the auto generated empty Main template. At this point, it has two command buttons for loading overlays--one loads my "old" existing master overlay template and the other loads the "Overlay_Main" auto-generated template that then loads the tiles template. That seems to give me the functionality I want (old non music stuff and your music tiles), but I need to play around with placement of buttons for a uniform look. I also need to change all the popup action buttons and use actual paths since ".\\Popup\\Popup_xxx" path no longer works but the desired scrolling does.

But I do like the tiles approach so maybe it is time to move it all.

Possibly Related Threads…
Thread Author Replies Views Last Post
  System::Pause gReatAutomation 1 912 09-03-2020, 03:05 PM
Last Post: Dean Roddey
  How to size Interface Viewer WebRIVA templates gReatAutomation 5 2,433 12-24-2019, 05:29 PM
Last Post: Dean Roddey
  GE Heavy Duty 40 Amp Outdoor Switch (14285) / Misting System gReatAutomation 0 1,242 06-11-2019, 04:44 PM
Last Post: gReatAutomation
  Google Play Music integration sic0048 1 1,507 12-25-2018, 11:52 AM
Last Post: batwater
  Adding custom tiles/overlays to the auto-gen system Dean Roddey 1 2,136 07-20-2018, 08:14 PM
Last Post: Dean Roddey
  System Config tom 35 16,217 01-12-2018, 09:02 AM
Last Post: Dean Roddey
  New HVAC System - Nest? dgage 5 4,921 05-24-2017, 11:15 AM
Last Post: dgage
  Keep system from sleeping George M 8 7,413 01-20-2017, 06:37 PM
Last Post: wuench
  Auto Gen / Room config potts.mike 3 3,652 12-28-2016, 06:51 PM
Last Post: Dean Roddey
  List Based Music Browsing jrlewis 36 14,668 06-29-2016, 05:18 PM
Last Post: kblagron

Forum Jump:

Users browsing this thread: 1 Guest(s)