![]() |
|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
How does CONFIG_MULTICHOICE work?
I've been experimenting with a General plugin and trying to use a configuration type of CONFIG_MULTICHOICE and can't sort out how it's supposed to work. Does anybody have any experience using this type?
getConfigValue is being called, but I have no idea what's supposed to be returned since it returns a String and and CONFIG_MULTICHOICE deals with String[]. getConfigValues and setConfigValues are not doing what I expected either. Before I pollute other people's thoughts and post what I expected them to do, can somebody tell me how you think these methods should work? Thanks, Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#2
|
||||
|
||||
I haven't used it, but here's what I'd expect:
getConfigOptions() returns an Array of all allowable values. getConfigValues() returns an Array containing the currently set value(s). setConfigValues() receives an Array containing the value(s) to be set as current. getConfigValue() and setConfigValue() would not be called. Looking at the calling code in the stock STV seems to bear this out, with one exception: there's a call to GetPluginConfigValue() in the MenuNeedsDefaultFocus hook of the choice popup dialog. Maybe Andy can comment further on that, but if this is by design, then it would seem to indicate that getConfigValue() should return the single value that you want to receive focus when that dialog comes up. For Choice settings this would be the same as the selected value; for Multichoice it's less clear what this should be. Perhaps the STV should be modified to call GetPluginConfigValues() instead and put the focus on the first value returned (if any).
__________________
-- Greg |
#3
|
|||
|
|||
I just used this past night for the first time.
Get config value is returning the current property setting. In the ui is puts a dot next to the current property value as well as uses it to display the current value on the main config screen. Reall all you need to in java with it is define it with the property an pass the string[] of values you want. You can also subscribe to the listener and do anything you need to do on the change. Somehow I missed option in the plugin implentation until last night I just admit it is nicely done. |
#4
|
||||
|
||||
I wasn't using the getConfigOptions() method since the comment in the code Sage posted indicated it was for CONFIG_CHOICE.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#5
|
||||
|
||||
Quote:
![]() In any case, I don't think it will do what I wanted. I'm looking for a way to display a table with three columns. The first column contains items I populate (Channel Names) and the next two (or three) columns contain choices that the user can select. Specifically, in the CommercialDetector plugin I'm trying to present a table of Channel Names to the user so (s)he can choose to use comskip on shows from that channel, ShowAnalyzer, or neither. I'd also like a way to specify what .ini file to use on a per-channel basis. Is this doable or am I asking too much? Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#6
|
|||
|
|||
Sorry that is what I get for posting on my iphone
![]() Basically you define a popup of options in java that the user can select from. All you have to pass is the property you want defined and the String[] of options you want. You don't need to use get or set unless you are wanting to do something different then just setting or getting a property. What you are wanting is possible although not easy as you would have to listen to changes and do your code in that. three columns really isn't possible but you could separate it with --- or commas or such. For what you are wanting to do I would do it in a stvi or in Greg's stvi configuration he coded |
#7
|
||||
|
||||
Plucky,
I'm trying to keep all of the configuration within the plugin so for now I think I will not use STVi code or Greg's config tool. (I have not used Greg's tool yet but I was under the impression that it's to be used from STV code and not Java code. Please correct me if I'm wrong.) What I've decided to do is dynamically add ConfigSettings based on the channels that the user has defined. (One ConfigSetting per channel.) I then make each ConfigSetting type CONFIG_CHOICE allowing the user to choose from a menu of items. To avoid cluttering up the configuration with too many settings there is a setting that the user can use to display, or not display, all of the channels. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#8
|
||||
|
||||
Quote:
You can use my XmlConfig class from a Standard plugin, but again, it doesn't offer any new capabilities; it just allows you to simplify your config code by defining most of the structure in an XML file instead of directly in the code. That's probably the best approach for what you want to accomplish.
__________________
-- Greg |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
I've tried and tried and just can't get this to work... | atlantadude1972 | SageTV Placeshifter | 13 | 08-31-2009 07:14 PM |
Will this work? | sheddav | Hardware Support | 2 | 03-06-2009 04:12 PM |
Will this work? | rileydogmi | SageTV Media Extender | 2 | 02-18-2009 08:51 AM |
Need help with getting CC to work. | lovingHDTV | SageTV Software | 4 | 11-09-2004 07:15 AM |
No 5.1 out....it does work, right? | broderp | SageTV Software | 21 | 06-05-2004 04:46 PM |