JungleGUI need some help peeps...

Monkey Forums/Monkey Programming/JungleGUI need some help peeps...

Paul - Taiphoz(Posted 2017) [#1]
Right I'm pulling this out of the module forum cos I dont seem to be getting any kind of response. my hope now is that some one other than the mod author will have or know the solution..

Code Bellow should I hope preset the issue. but the cruks of it is that when I create a TextField and asing it a starting text value it works, but later when I try and set it a new text value via code not via user input it simply refuses to render the new text.

Another odd thing is that I even tried deleting the object and creating a new instance with the text i want which funnily didn't work either it was clearly still rendering the old one under the new one.

So background on this is that its settings for an app, when I make the form I make the fields , sliders and textfields with the values from the config file, but I need to be able to update these values via code as well as user input.

So pressing F2 has no visible effect.




Goodlookinguy(Posted 2017) [#2]
You're going to feel stupid about this one so I apologize in advance.

Line 293, comment this out
box = New junglegui.TextField


I should note, however, despite this fixing the issue, Jungle GUI has its own issues. If you have a lots of text in the box (enough to scroll it) and have your caret on the last letter then change the text to "This". The scrolling will not reset itself.


Paul - Taiphoz(Posted 2017) [#3]
oh my goodness.

Three lessons here,
1.... NEVER copy paste code from one function/method to another without actually checking it first
2.... When passing an object into a method, its not nice to then ignore its sad little face and create a new one instead..
3.... Don't take a break from coding your brain will goto mush.
Again mate thanks for pointing this out, that's what I get for taking a long break from writing code.


ziggy(Posted 2017) [#4]
Great to see you find a solution for your issue. Remember JungleGUI is open source so if you fix anything, don't hesitate to pull request at GitHub!


Paul - Taiphoz(Posted 2017) [#5]
had to add a bit of code to handle clicking the close button on a form and the close button image was missing if it helps at all. im not to good when it comes to github so will leave that to some one else.