Because Violation isn't the name of the eePanel. It's eePanel1 or eePanel3 or something like that.
You also haven't specified what your strata problem is. I'm too busy/sick/lazy to go check in-game, but anchors shouldn't change the strata. It's possible, but strata is something that's supposed to be inherited from the parent as far as I can tell (and as far as wowwiki says).
I get the same error if i use eePanel1 as name. If i use a name that doesn't exist (not eePanelx or a name i gave to a panel) i get an error about the name and not about GetStrata.
What happens with the strata is that as soon as i enter the script in the add script window, the panel goes to it's place but is between Violation. The panel hides the bars and the header of Violation, but the text on the bars is visable. When i switch the strata to low and back to background the panel is in the background behind Violation. The effect is the same when i only use the parent part of the script and remove the anchor line. So my conclusion is that the parent part of the script modifies the strata somehow.
1) eePanels(2) doesn't actually fetch the frame's strata when it tells you what it's set it, it only shows the setting it was given. If the strata is somehow modified, it won't show correctly.
2) If you haven't changed the frame's parent, and there aren't any scripts modifying the strata, it should still be set to background (I don't think anchors change strata). You can double-check by doing a /script eePanels2:Print(eePanel1:GetStrata()) . Just insert the actual name of your panel before GetStrata().
3) Anchors won't change the panels visibility. You should instead set the parent to the violation frame, or use a script which listens to the OnShow/OnHide changes for violation, and modify the panel's visibility accordingly.
And i don't have the strata problem when i remove the script and just place the panel on it's place. But then the panel isn't linked to violation anymore.
The script thing gives this error:
[2007/09/24 09:59:22-3125-x1]: <string>:"eePanels2:Print(Violation:GetStrata())":1: attempt to call method 'GetStrata' (a nil value)
Quote from Seerah »
@Bartel: try setting the offset points directly in the script - I put an example on the wiki when I added that script the other day.
I don't know. Maybe make sure your verticala/horizontal positions are set to 0. I would think they wouldn't interfere, but I'm not sure.
You can also try:
THIS:SetPoint("CENTER", Violation.windows.frame, "CENTER", 0, 0)
doesn't work either. The panel is now exactly in the middle of my screen after a relog. I'm gonna place the panel using the vertical/horizontal positions then and hope it stays on his place that way. Most important thing is that it hides and shows when i hide/show the violation window :)
/edit: this works, the panel stays on it's place now. But now the strata ain't on background, while the settings say it is...