¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

CH5 - Help - using Contract editor....... #crestron


 

So since labs is shutting down I figured someone here might know how to make this work.

I'm trying to use ch5 and I have a simple touchpanel and was going to try to use contract editor to make it so I could make a keypad for what ever I needed.? I made one button in the editor and gave it 12 instances and it spits back:


????????<ch5-template?id="Keypad.Button.Button">
??????????<ch5-list?id="Button.Button"?indexId="idx1"?size="12"?orientation="horizontal">
?????????????<template>
?????????????<div?class="horizontal-list-item">
?????????????<ch5-button?sendEventOnClick="Button[{idx1}].KeypadButton"?receiveStateSelected="Button[{idx1}].KeypadButtoFb">
??????????????</ch5-button>
?????????????<span?data-ch5-textcontent="Button[{idx1}].KeypadButtonName">Label</span>
????????????</div>?
????????????</template>
???????????</ch5-list>
??????????
??????????</ch5-template>


so i then add :



<ch5-template?templateId="Keypad.Button.Button"?context="1"></ch5-template>

to reference the first button right? I want to have a press and recieve and a serial recieve but after importing the gui file and connecting signals it doesn't seem to work. Any thoughts as to what i am doing wrong???


 

It has been a minute since I've messed with CH5, but I think the index should just be listed as idx with no number.

IE,

<ch5-list class="source-list" indexId="idx" size="4" maxWidth="1000px" receiveStateSize="SourceList.NumberOfSources"
orientation="horizontal">
<template>
<div class="horizontal-list-item">
<ch5-button customClass="source-btn-{{idx}}" class="d-block" type="text" shape="rectangle"
receivestatelabel="SourceList.Sources[{{idx}}].NameOfSource"
receivestateiconclass="SourceList.Sources[{{idx}}].IconClassOfSource" iconPosition="top"
receiveStateSelected="SourceList.Sources[{{idx}}].SourceIsSelected"
sendEventOnClick="SourceList.Sources[{{idx}}].SetSourceSelected"></ch5-button>
</div>
</template>
</ch5-list>


 

I wouldn't use a list for keypad buttons, you can't lay them out the way a keypad looks.
I've used Grid for mine, that works well as I can lay the keypad out the way I want it to look.

You can still use the signal names for the buttons, you just won't be able to template them.


 
Edited

but isn't that the point of a template????? Yes i did it with just buttons and used the grid....it works..but i guess i don't understand what the contract editor is for then.? i thought it was to make like smart graphics extenders...


 

It does make something like smart graphic extenders in Simpl.
That's mainly what it's for, using signal names in Simpl instead of join numbers


 

has anyone made this work in simpl??? i haven't seen the? digital or serial joins work from the above code.?