WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   kgPanels sh*ts on my carpet every time I log off (https://www.wowinterface.com/forums/showthread.php?t=45328)

feraldrood 11-30-12 08:59 PM

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?

Ekaterina 11-30-12 09:51 PM

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?

feraldrood 11-30-12 11:36 PM

Quote:

Originally Posted by Ekaterina (Post 269940)

*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 :confused:

Phanx 11-30-12 11:42 PM

Without seeing your entire, actual scripts, it's impossible to even guess at what might be happening.

feraldrood 12-01-12 12:10 AM

Quote:

Originally Posted by Phanx (Post 269944)
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?

Ekaterina 12-01-12 01:42 AM

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.

feraldrood 12-01-12 02:29 AM

Quote:

Originally Posted by Ekaterina (Post 269949)
.

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 :mad::confused:

Ekaterina 12-01-12 06:01 AM

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.

Seerah 12-01-12 12:49 PM

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)

feraldrood 12-01-12 05:02 PM

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/

Fizzlemizz 12-01-12 07:21 PM

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.

feraldrood 12-01-12 08:02 PM

Quote:

Originally Posted by Fizzlemizz (Post 270013)
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)

Seerah 12-01-12 08:04 PM

That means you're trying to parent two panels to each other. (or 16 to itself? judging from the error)

jeffy162 12-02-12 12:17 AM

What are your panels anchored to?

feraldrood 12-02-12 03:04 AM

Quote:

Originally Posted by jeffy162 (Post 270027)
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

Fizzlemizz 12-02-12 03:56 AM

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).


All times are GMT -6. The time now is 06:34 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI