Mat.Alm Posted September 20, 2017 Report Posted September 20, 2017 (edited) Hello! I was using ugfx normally and i have the terminal creation working like this: void create_term (void) { GWindowInit Gwi; Gwi.show = TRUE; Gwi.height = 29; Gwi.width = 319; Gwi.x = 0; Gwi.y = 241; term1 = gwinConsoleCreate(0, &Gwi); gwinSetColor(term1, Green); gwinSetBgColor(term1, Black); gwinClear(term1); } All was working well the terminal works fine! But after enable tabs widget I run in hard fault in the create term function! If I skip calling create_term function the system does not crash and the tabs widget works fine. So my problem is that terminal and tabs widget can not work together without crash my system Any help? Edited September 20, 2017 by Mat.Alm
inmarket Posted September 20, 2017 Report Posted September 20, 2017 You have not fully initialised the Gwi structure. There is a gwin call that you can call to fully initialise the structure before you set the fields you want (sorry I am on my mobile currently so I can't easily look it up for you). Have a look at the gwin demos. While this may or may not solve your problem, it is definitely a bug in your existing code.
Joel Bodenmann Posted September 21, 2017 Report Posted September 21, 2017 16 hours ago, inmarket said: There is a gwin call that you can call to fully initialise the structure before you set the fields you want (sorry I am on my mobile currently so I can't easily look it up for you). gwinWidgetClearInit() and gwinClearInit()
Mat.Alm Posted September 22, 2017 Author Report Posted September 22, 2017 On 9/21/2017 at 11:29, Joel Bodenmann said: gwinWidgetClearInit() and gwinClearInit() Oh! Thanks! It solved my problem!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now