Thread Tools Display Modes
10-20-10, 01:10 PM   #1
xandora
A Chromatic Dragonspawn
 
xandora's Avatar
Join Date: Feb 2009
Posts: 188
Lua tips?

Code:
Interface\FrameXML\UIPanelTemplates.lua:98: attempt to index local 'frame' (a nil value):
GoldRaidManager-3.3.1.100119\GoldRaidManager.lua:169: in function `GRM_OnLoad'
<string>:"*:OnLoad":1: in function <[string "*:OnLoad"]:1>

Locals:

  ---
Trying to update an addon as a little project, and just wondering what the above error is trying to tell me.
__________________
  Reply With Quote
10-20-10, 01:35 PM   #2
Ruinit
A Deviate Faerie Dragon
Join Date: Aug 2009
Posts: 19
LOL I think we are trying to get the same addon fixed.
  Reply With Quote
10-20-10, 02:52 PM   #3
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Looks like the addon you are trying to update is using the old global this, change this to self and see if you get a new error.
  Reply With Quote
10-20-10, 03:28 PM   #4
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Vrul View Post
Looks like the addon you are trying to update is using the old global this, change this to self and see if you get a new error.
This (pun intended)

...but often it will complain about 'this' specifically not 'frame' so it may be that frame is assigned to this or that the frame needs to be passed in (with this being OnLoad that's unlikely so it's possibly a reference) to something that's assuming a 'this' in a called function.

One way of resolving "this" that I've done in the various hackery I've been doing since 4.x, since self is passed as the 1st parameter very often, is convert ModName:FunctionName() to ModName:FunctionName(this) or (this, arg1) for some oldies-but-goodies -- just to save myself some re-typing -- and it's resolved a lot of those "frame or object is nil" issues. Sometimes you have to also take a calling function and force the pass ( somedamnfunction() to somedamnfunction(object, args) )

If none of that is of any help, shoot me a PM and I'll d/l the mod and take a peek.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Lua tips?


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

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