Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CQC needs global Method or Function calls
#1
I just posted in a thread on how I had to set values for objects on a template, I have to cut and past lots of times from object to object.

Its is possible for every Template to have "global" or "instance" function calls that has access (reference) to all objects on that template.

example..I have 7 zones right now and in every button for the zone I have the code.....

Code:
zone1_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone2_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone3_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone4_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone5_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone6_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone7_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)

This code could be moved to one function that I then call, passing in two variables....the button widget name and the image I want.

CQC is awesome but I find this to be the biggest hole in it being a real true and great development tool
Reply
#2
penngray Wrote:I just posted in a thread on how I had to set values for objects on a template, I have to cut and past lots of times from object to object.

Its is possible for every Template to have "global" or "instance" function calls that has access (reference) to all objects on that template.

example..I have 7 zones right now and in every button for the zone I have the code.....

Code:
zone1_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone2_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone3_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone4_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone5_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone6_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)
zone7_button::SetNamedImage(Unpressed, \User\LEDs\Glass2\Round\Light...)

This code could be moved to one function that I then call, passing in two variables....the button widget name and the image I want.

CQC is awesome but I find this to be the biggest hole in it being a real true and great development tool

Ummmm....Isn't that what the Macros are?
Reply
#3
ummm...lol....maybe....Big Grin

That would be great...do they reference widgets though? I thought I couldn't not pass in a widget object. How would I do the above in a Macro?

I hope Im wrong, I missed that Macro class last year Wink and I just can't think that Macros are functions.
Reply
#4
I don't know if you can pass a widget object to a Macro...I do know that you can pass stuff in/out, but I'm unsure of the limitations of what those objects can be.
Reply
#5
I think that was the problem when I asked about using it in the past. We can not pass objects in or out of it so we do need a global or template instance method functionality
Reply
#6
You cannot currently access the widgets from CML. The need for global (well, really global as in on the master server, and template global) actions is definitely a well known lacking and it's been much discussed. It will get addressed soon.
Dean Roddey
Explorans limites defectum
Reply
#7
Dean,

Reading over all these posts makes me understand why you haven't taken a trip in over 5 yrs. It seems like every post (and some of them are mine) you finish with a "it's on the list - I'm hoping to get it out in the next release"

I'd hate to see the list ;0

Anyway, all this to say thanks. You don't get the credit you deserve.
Brian - a long time user that rarely messes with the system now
Other systems used:
SageTV w/ cablecard tuner & multiple extenders for viewing
BlueIris and IP cameras for CCTV
Incredible PBX for home phone
Reply
#8
Thanks Dean, you are awesome!


Anytime you want a timeshare week somewhere just send me an email. I have too many weeks I dont use any more...yours free!!
Reply
#9
penngray Wrote:Thanks Dean, you are awesome!


Anytime you want a timeshare week somewhere just send me an email. I have too many weeks I dont use any more...yours free!!

Hey, I'll take one of those! ;-)
Reply
#10
Can I sell mine to Robert :-)
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Global Variables in the Event Server context lleo 1 1,074 05-16-2020, 11:21 AM
Last Post: Dean Roddey
  Configure Elk Function Keys kblagron 2 1,422 12-29-2019, 11:30 PM
Last Post: kblagron
  Global Cache Driver gReatAutomation 4 1,703 07-06-2019, 05:08 PM
Last Post: gReatAutomation
  Copy and Paste into Global Cache Client Interface kblagron 3 2,225 11-01-2018, 02:23 PM
Last Post: kblagron
  Create Global Action from IV? jkmonroe 3 2,359 12-30-2017, 12:04 PM
Last Post: Dean Roddey
  Saving Global Actions RichardU 1 1,506 12-20-2017, 11:18 AM
Last Post: Dean Roddey
  Cant use fields of Denon driver in global actions George M 4 4,004 12-18-2016, 06:21 PM
Last Post: Dean Roddey
  Bug with the Echo and nested global actions? dlmorgan999 2 2,821 12-18-2016, 01:07 PM
Last Post: dlmorgan999
  Global Cache 180 serial port compatibility? MikeA 2 2,188 09-26-2016, 08:24 PM
Last Post: MikeA
  Global actions in 5.0, or what am I doing wrong pasha 9 4,463 09-26-2016, 08:03 PM
Last Post: pasha

Forum Jump:


Users browsing this thread: 1 Guest(s)