I am just trying to learn how to use this but can’t seem to get it to work.
I am just creating the label and a mapping page and trying to associate the label with any HostObject (Selected Track Volume, in this case).
var labelField1 = deviceDriver.mSurface.makeLabelField(8,8,7,2)
var mainPage = deviceDriver.mMapping.makePage('Default')
mainPage.setLabelFieldHostObject(labelField1, mainPage.mHostAccess.mTrackSelection.mMixerChannel.mValue.mVolume)
But I get “Error: Argument 1 wrong type of native object in line 43 (the last line with the setLabelFieldHostObject call. I am not sure how the arguments are indexed so argument one could be the first or second.
Anyway, what am I doing wrong? How do I use this method?
JL
BTW, I got this to work…
mainPage.setLabelFieldText(labelField1, “Volume”)
so I think the first argument “labelField1” is the correct object type so it is probably the second argument (the mVolume chain).
Hi, mVolume is not a hostObject, it’s a hostValue.
I totally understand what you want to do, but it’s not doable this way unfortunately. If you need this type of feedback, you’d have to create an external utility, be it an app, or even an html page, and transmit hostValues there.
To be honest, I am not really trying to do anything in particular other than see how to use the labelFields. I got the following to accept without an error message in the script console but nothing shows up in the labelField
Any chance you could provide just some example of using it? Or is it really just meant to be used with the setLabelFieldText() method?
I mean, what would be the point of attaching it to some particular host object? Would it then automatically populate with some identifying text. For example, I thought if I associate it with the mTrackSelection, which it accepts, that it would display the selected track or something…
Not sure where you’ve put this, i.e. perhaps before the page creation, or even didn’t define a proper witdh for the label, but it should show the name of the selected track, and this changes dynamically whenever the name changes.
Labels may accept a text static for each page, a subPages area title, or can be bound to host objects, in which case, they get the title of them.
Thank you for your continued help! I got it to work. I had bound it on the “mainPage” but was actually on the “altPage” so it was just showing a dash. Again, I really appreciate your responses. I am learning a lot. You tip earlier about mixing up HostObjects and HostValues was also very helpful.