Plugin related - Is it possible to fill a MultiLine Textbox with content from a var / Update the text



  • I am trying to make a Change-log from inside of my Plugin and I'm having issues Updating a Multi-line Textbox's Text from a Var. I am pulling the raw text from Github and saving it to a Var. However i have not found a way without build errors to have a textbox (standard and multi) to display the content of the Var. I'm still getting used to the plugin framework so I'm not sure if this is possible or if I'm just doing something wrong. I figured id ask here before opening an issue.


  • Admin

    Hey! Your multi-line textbox should be bound to a property with the [TextMulti] attribute and a string[] type right? What happens when you assign a value to that property at runtime? If nothing is changed on the interface (which is what I think you are trying to say) it means that I have to make changes to the code to allow that behaviour.



  • When a new value is assigned there is no changes, That is the Issue. The other is i dont know how to make a Method run when OB is opened, or when the plugin tab is opened. (IDK if that's possible or not.)

    Ideally when i open the plugin tab it would pull the latest Change-log. Right now i have it pull the latest Change-log when the Check for Update button is pressed.

    I have:

    [Text("Changelog")]
    public string ChangeLog { get; set; } = "";
    

    Then i have a method run when a button is pressed that changes ChangeLog to the content of a Github txt file. (Its just 4 different lines I'm using to test)

    Short Snippet:

    using (HttpResponseMessage response = await client.GetAsync(ChangelogURL))
                {
                    var Changelog = await response.Content.ReadAsStringAsync();
                    ChangeLog = Changelog;
                    app.Logger.Log(ChangeLog, LogLevel.Info, true);
                }
    

    Ive verified that ChangeLog is being changed to the Github content using

    app.Logger.Log(ChangeLog, LogLevel.Info, true);
    

    However no changes appear on the form.


  • Admin

    To make it run when OB is opened, you just put the code in the constructor of the plugin class ^_^ it's that simple.
    Anyways yes I will make it so that textboxes etc. will update when you change their properties values in the code, no problem!


  • Admin

    Please don't forget to open an issue about this on github



  • Thanks for the help. I Opened an issue on the github for it.


Log in to reply