Old 12-03-2018, 04:21 PM   #1
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 221
Default Crashes on Resizing (Horizontally)

Originally in another thread:
Quote:
Originally Posted by tXShooter View Post
What can I do to prevent the script from crashing when resizing the width of the GUI (I've got mine in the Docker when this happens)?

Code:
Error: Reaper DAW Interface GUI.lua:1852: attempt to index a nil value (global 'gui')

Stack traceback:
	Core.lua:70: in metamethod '__index'
	Reaper DAW Interface GUI.lua:1852: in field 'func'
	Core.lua:292: in function <C:\OneDriveTemp\OneDrive\Lokasenna_GUI v2\Library\Core.lua:280>
		[C]: in function 'xpcall'
	Core.lua:280: in function <C:\OneDriveTemp\OneDrive\Lokasenna_GUI v2\Library\Core.lua:279>

Lokasenna_GUI:	(the file is not owned by any package entry)
Reaper:       	5.962/x64
Platform:     	Win64
At the suggestion of someone else commenting on someone else's comment, I decided to create my own thread here. (Did that make sense?)
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
tXShooter is offline   Reply With Quote
Old 12-08-2018, 12:38 PM   #2
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 221
Default

Baby bump
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
tXShooter is offline   Reply With Quote
Old 12-08-2018, 12:58 PM   #3
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,313
Default

Quote:
Originally Posted by tXShooter View Post
What can I do to prevent the script from crashing
Line 1852 of a file called "Reaper DAW Interface GUI.lua" is attempting to do gui[something]. It fails because gui is nil at that point in time.

I'm guessing it's supposed to be Lokasenna's library's GUI variable whose name is in uppercase.

Last edited by cfillion; 12-08-2018 at 01:04 PM.
cfillion is online now   Reply With Quote
Old 12-08-2018, 03:17 PM   #4
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 221
Default

Is anyone else experiencing this, or is it just me?
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
tXShooter is offline   Reply With Quote
Old 12-08-2018, 03:35 PM   #5
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,313
Default

It's a bug in your script. gui does not exist at line 1852. It should probably be in uppercase.

Last edited by cfillion; 12-08-2018 at 03:46 PM.
cfillion is online now   Reply With Quote
Old 12-08-2018, 03:52 PM   #6
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 221
Default

Quote:
Originally Posted by cfillion View Post
It's a bug in your script. gui does not exist at line 1852. It should probably be in uppercase.
Ahhh. Good catch. Thank you.

Code:
-- Prevent the user from resizing the window
	if GUI.resized then
		-- If the window's size has been changed, reopen it
		-- at the current position with the size we specified
		local __,x,y,w,h = gfx.dock(-1,0,0,0,0)
		gfx.quit()
		gfx.init(GUI.name, GUI.w, GUI.h, 0, x, y)
		GUI.redraw_z[0] = true
		gui.settings.docker_id = 0
	end
I ended up just removing that whole section.
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
tXShooter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.