Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-23-10, 01:17 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
calling variables accorss modules accross files

confused yet? i am okay so heres the deal... in one file it creates the variable based on what resolution is set. it only does this once per first use of the UI, now then another file uses that variable to chose layouts. well for some reason the other file cant pick out the variables. also the addon = {} is also in another file... is that maybe the problem? do i need to make the variables global somehow? the file that is supposed to find the variables for the layouts lil chunk to do so looks like this,
lua Code:
  1. local GPartyMainEvents = CreateFrame("Frame", nil, UIParent)
  2. GPartyMainEvents:RegisterEvent("VARIABLES_LOADED")
  3.  
  4.  
  5. GrimUI.GPartyMainEvents = GPartyMainEvents
  6.  
  7. GPartyMainEvents:SetScript("OnEvent", function(self)
  8.    
  9.     if GrimUIData.GrimResolution == "1" then
  10.         GrimLayout1()      
  11.     elseif GrimUIData.GrimResolution == "2" then
  12.         GrimLayout2()
  13.     else
  14.         GrimLayout1()
  15.     end
  16.    
  17.  
  18. end)
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 01-23-10 at 01:29 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » calling variables accorss modules accross files


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