Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TypeConverter subclass doesn't port from NT7 to NT8

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    TypeConverter subclass doesn't port from NT7 to NT8

    I am working on porting an indicator from NT7 to NT8, and I am stuck on something that works well in 7, but not too well in 8 - a customized dropdown box. Let me explain:

    I would like to add an option to the indicator that contains a list of all installed SpeechSynthesizer voices. Kind of like this:



    This works in NT7. In NT8, it shows the correct values in the dropdown box, but the selected value does not save. Each time I open the Indicators dialog I see the first value selected, even if I've chosen another value a moment ago. Same results are observed after a full restart of the NT software.

    Here is my TypeConverter class:

    Code:
    public class VoiceConverter : TypeConverter
    {
    
    	public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
    	{
    		if (context == null)
    			return null;
    
    		List<string> list = new List<string>();
    		var s = new SpeechSynthesizer();
    
    		foreach (InstalledVoice v in s.GetInstalledVoices())
    		{
    			list.Add(v.VoiceInfo.Name);
    		}
    
    		return new TypeConverter.StandardValuesCollection(list);
    	}
    
    	public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
    	{
    		return true;
    	}
    }
    And here is my property:

    Code:
    [TypeConverter(typeof(VoiceConverter))]
    public string Voice {
    	get; set;
    }
    Again, this code works well in NT7, but in NT8 it doesn't save the value.

    Any help would be greatly appreciated.

    #2
    Hello,

    Thank you for the post.

    I tried the sample you provided but can see this is working on my end. My system has two installed voices, I chose the Second in the list and closed the platform saving the workspace. Upon opening and checking the indicator I can see the second voice is still selected.

    Could you instead provide an export of the sample you are using for me to test?

    Also if you have been developing this item and have only been using F5 to reload it, please try removing it and re-adding it to the chart and re-check the results.



    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    592 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    343 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    556 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    554 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X