Thread Tools Display Modes
11-25-09, 09:15 AM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Shared Media?

So I'm sure some of you are familiar with tidy plates, and I'm not sure exactly how I'd go about incorporating shared media into my theme's for it.

Just to try to make things simplified, this:

config.healthbar = {
texture = texture.."CP_BarTexture",
width = 120,
height = 10,
x = 0,
y = 5,
anchor = "CENTER",
orientation = "HORIZONTAL",
}

is a tabled value that is plugged into tidy plates to create a theme.

Now my problem is, if I put a saved variable link directly into that:

texture = CP.db.profile.BarTexture,

I get a db = nil value since my saved variables haven't loaded yet.

How would I go about fixing this problem?

* I am still fairly new to the programming atmosphere, ace libs in particular *
  Reply With Quote
11-25-09, 09:35 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Well, saved variables don't have anything to do with Ace libraries. You're just trying to reference your saved variable before the game has loaded it. See here: http://www.wowwiki.com/Events_that_f...iables_loading
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
11-26-09, 03:23 PM   #3
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Seerah View Post
Well, saved variables don't have anything to do with Ace libraries. You're just trying to reference your saved variable before the game has loaded it. See here: http://www.wowwiki.com/Events_that_f...iables_loading
So how would I go about setting the table to something and then having it set again with the saved variable after it's been loaded?
  Reply With Quote
11-27-09, 02:12 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Here's the HOW-TO on wowwiki that has a good example.
http://www.wowwiki.com/Saving_variab..._game_sessions

If you still need help after reading that, then feel free to come back with what you've tried so far, and ask for further assistance.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Shared Media?


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