Thread Tools Display Modes
11-30-12, 08:59 PM   #1
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
kgPanels sh*ts on my carpet every time I log off

http://postimage.org/gallery/84fcqd04/

pic ONE is when I log in, pic TWO is after a /rl (/reload) with the panels placed correctly.

what in the aslkdjhaslkdjaskjdhb is causing this ?? I swear everything is anchored and locked
only started happening after I made the chat background (it toggles on/off when clicked)

Code:
if pressed then
    if kgPanel16:IsVisible() then
        kgPanel16:Hide()
    else
        kgPanel16:Show()
    end
end
the other panels that create the chat bg are parented to panel 16 so the whole bugger hides

any ideas?

Last edited by feraldrood : 12-01-12 at 05:11 PM. Reason: fixed link
  Reply With Quote
11-30-12, 09:51 PM   #2
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
Have you tried changing the script to:

Lua Code:
  1. if pressed then
  2. if self:IsVisible() then
  3. self:Hide()
  4. else
  5. self:Show()
  6. end
  7. end

to ensure that there isn't a problem with the reference to the frame?

Do you have any other scripts set? Is the chat background parented to a frame other than UIParent? Are any other frames parented or anchored to the chat background?

Last edited by Ekaterina : 11-30-12 at 09:57 PM. Reason: additional questions
  Reply With Quote
11-30-12, 11:36 PM   #3
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Originally Posted by Ekaterina View Post

*snip*
to ensure that there isn't a problem with the reference to the frame?

wouldnt this ^ only call the panel to hide when mouse down, only to show on mouse up?

1: Do you have any other scripts set? nope
2: Is the chat background parented to a frame other than UIParent? nope
3: Are any other frames parented or anchored to the chat background?
yes, the background is three panels, black outer shadow, class color "border" and grey interior
the additional panels are parented to the panel which hides on click, therefore they hide as well
Bad doggy kgpan, stop messing everything up XD
  Reply With Quote
11-30-12, 11:42 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Without seeing your entire, actual scripts, it's impossible to even guess at what might be happening.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-01-12, 12:10 AM   #5
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Originally Posted by Phanx View Post
Without seeing your entire, actual scripts, it's impossible to even guess at what might be happening.
the only other script I use is to class color the *spoiler* CLASS colored frames (nothing wrong there)
again, the change only started around the time I added the on click function in my first post

perhaps there is a way to "auto /rl" upon log in? how would I do this?
  Reply With Quote
12-01-12, 01:42 AM   #6
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
A bit of testing indicates that possibly once it's hidden, the frame then won't receive the 'click' again to unhide.

Try using in your onclick:
Lua Code:
  1. if pressed then -- if the  mouse button is pressed while over the frame do the following
  2.  
  3.  if self:GetAlpha() > 0 then -- checks to see if the alpha of the frame is greater than 0 (invisible)
  4. self:SetAlpha(0) -- if so make it invisible
  5. else
  6. self:SetAlpha(1)  -- otherwise make it fully visible, which should return it to the setting you set in the kgpanels config screens.
  7. end
  8. end

self here just means that it's referring to the frame that you are attaching the scripts to.

The parent frame alpha also effects the children frames, so this should hide all three.

Last edited by Ekaterina : 12-01-12 at 01:47 AM.
  Reply With Quote
12-01-12, 02:29 AM   #7
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Originally Posted by Ekaterina View Post
.
To Clarify, my problem is with positioning, the panel(s) itself works fine

http://postimage.org/gallery/84fcqd04/

pic One is every time I log in (( pic Two is post "/rl" with panels in the right positions

been fooling around with settings still no idea whats doing this

Last edited by feraldrood : 12-01-12 at 05:11 PM.
  Reply With Quote
12-01-12, 06:01 AM   #8
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
I haven't had any luck recreating your positioning problem.

So, work backwards.

Does the problem persist if you change the frame reference in the script from kgpanel16 to self?
Does the problem persist if you remove the scripting?
Kgpanels can be a little flaky if you've positioned something and then changed the anchoring or parenting. Have you deleted the child frames and recreated them, with setting the parent frame being the first thing that you do after recreating the child frames?

It helps if you give us an idea of what you have tried.
  Reply With Quote
12-01-12, 12:49 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Just a shot in the dark... Are you getting any errors with your new script? (double-checking that errors are turned on in interface options, of course)
__________________
"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
12-01-12, 05:02 PM   #10
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Well, I've tried removing the toggle hide/show script- no changes

tried deleting the panel group itself- no changes

tried re anchoring all the frames which appear to be moving (stuff on the bottom, chat, and unit frame bg's)

no changes :C

http://postimage.org/gallery/84fcqd04/

Last edited by feraldrood : 12-01-12 at 05:10 PM.
  Reply With Quote
12-01-12, 07:21 PM   #11
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
My guess would be an error being thrown during login but not during /reload. It can happen (which I believe was Seerah's point).

When in game, press escape, then select Interface, Help (from the Game tab) and check Display lua errors.

Logout and logon again and see what you get.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-01-12 at 07:24 PM.
  Reply With Quote
12-01-12, 08:02 PM   #12
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Originally Posted by Fizzlemizz View Post
My guess would be an error being thrown during login but not during /reload. It can happen (which I believe was Seerah's point).

ah! good advice I got this error:

Code:
29x kgPanels\kgPanels-1.5.4.4.lua:785: kgPanel16:SetParent(): Would create a loop parenting to kgPanel16
<in C code>
kgPanels\kgPanels-1.5.4.4.lua:785: in function "ResetParent"
kgPanels\kgPanels-1.5.4.4.lua:736: in function "PlaceFrame"
kgPanels\kgPanels-1.5.4.4.lua:648: in function "ApplyLayout"
kgPanels\kgPanels-1.5.4.4.lua:482: in function <kgPanels\kgPanels.lua:478>
(tail call): ?
<in C code>
<string>:"safecall Dispatcher[1]":9: in function <string>:"safecall Dispatcher[1]":5
(tail call): ?
libs\AceAddon-3.0\AceAddon-3.0-11.lua:543: in function "EnableAddon"
libs\AceAddon-3.0\AceAddon-3.0-11.lua:636: in function <libs\AceAddon-3.0\AceAddon-3.0.lua:621>
<in C code>
FrameXML\UIParent.lua:299: in function "UIParentLoadAddOn"
FrameXML\UIParent.lua:322: in function "CombatLog_LoadUI"
FrameXML\UIParent.lua:692: in function <FrameXML\UIParent.lua:657>

Locals:
nil
not really sure how to progress though.. *scratches head*

there is one more panel that makes up the chat bg; the invisible panel which holds the on click function
would parenting "kgPanel16" to said on click panel resolve the infinite loop error?
(purely intuitive assumption here, no lua knowledge for this problem)

Last edited by feraldrood : 12-01-12 at 08:10 PM.
  Reply With Quote
12-01-12, 08:04 PM   #13
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
That means you're trying to parent two panels to each other. (or 16 to itself? judging from the error)
__________________
"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
12-02-12, 12:17 AM   #14
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
What are your panels anchored to?
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!
  Reply With Quote
12-02-12, 03:04 AM   #15
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Originally Posted by jeffy162 View Post
What are your panels anchored to?
well there are a lot of them, but mostly UIParent, or eachother.

the panels I believe are causing the error at this point are the chat background cluster

(3 panels) shadow, class color, and interior gray. the shadow and color panels are parented and anchored to the interior one. "kgPanel16" the offender mentioned in the error.

the reason for using another panel to hold the onclick function is because by hiding the shown ones, they no longer are clickable, thus- invisible panel = invisible button

otw i would use the scripts from Ekaterina
  Reply With Quote
12-02-12, 03:56 AM   #16
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Did you get the problem fixed?

If not the I believe Seerah was saying that given the error you reported, it was most likely that kgPanel16 is being anchored to itself thus creating the circular call:

kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
... and so on. After 10,000 or so of these circular calls the lua interpreter gives up and sh*ts on your carpet .

Anchor kgPanel16 to another panel or UIParent and see what happens (adjusting X/Y coords accordingly).
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-02-12 at 04:57 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » kgPanels sh*ts on my carpet every time I log off

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

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