Reply
Thread Tools Display Modes
Unread 05-11-12, 03:06 AM   #1
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 428
OpenChatWindow

So using this code

Code:
--Right Chat Frame (if it exists)
    FCF_SetLocked(ChatFrame3, nil)
	FCF_SetChatWindowFontSize(self, ChatFrame3, fontsize2) 
    ChatFrame3:ClearAllPoints()
    ChatFrame3:SetPoint(unpack(def_position2))
    ChatFrame3:SetWidth(chat_width2)
    ChatFrame3:SetHeight(chat_height2)
    ChatFrame3:SetFrameLevel(8)
    ChatFrame3:SetUserPlaced(true)
	for i=1,10 do local cf = _G["ChatFrame"..i] FCF_SetWindowAlpha(cf, 0) end
    FCF_SavePositionAndDimensions(ChatFrame3)
	FCF_SetLocked(ChatFrame3, 1)
end
gives this error here

Code:
Message: Interface\AddOns\BobUI\chat.lua:79: Frame ChatFrame3 is not movable or resizable
Time: 05/11/12 05:02:27
Count: 1
Stack: [C]: in function `SetUserPlaced'
Interface\AddOns\BobUI\chat.lua:79: in function `SetChat'
Interface\AddOns\BobUI\chat.lua:91: in function <Interface\AddOns\BobUI\chat.lua:91>

Locals: (*temporary) = ChatFrame3 {
 0 = <userdata>
 checkedGMOTD = true
 flashTimer = 0
 isInitialized = 1
 tellTimer = 49803.928
 resizeButton = ChatFrame3ResizeButton {
 }
 buttonFrame = ChatFrame3ButtonFrame {
 }
 oldAlpha = 0
 channelList = <table> {
 }
 clickAnywhereButton = ChatFrame3ClickAnywhereButton {
 }
 isDocked = 1
 editBox = ChatFrame3EditBox {
 }
 name = "G,S,W"
 AddMessage = <function> defined @Interface\AddOns\BobUI\chat.lua:350
 buttonSide = "right"
 zoneChannelList = <table> {
 }
 defaultLanguage = "Common"
 messageTypeList = <table> {
 }
}
(*temporary) = true

What I would like to do is since this error only shows up if ChatWindow3 is locked or docked with the main chat window is undock/unlock it and move it to the proper place.

Unfortunately, I'm an .lua novice and I feel that I'm in over my head here atm since FCF_UnDockFrame(ChatFrame3) doesn't work.

if you want a more in depth look at what I'm working on the file I'm working on is the chat.lua file in my UI package (Interface>Addons>BobUI>chat.lua)
http://www.wowinterface.com/download...502-BobUI.html

Last edited by 10leej : 05-11-12 at 03:09 AM.
10leej is offline   Reply With Quote
Unread 05-11-12, 06:01 AM   #2
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
There are a set of FCF commands for the chat windows and I believe Lock and Dock versions exist but I can't recall at moment. If no one replies by the time I get back home tonight I'll look up my chat window function list and list them.

Otherwise you could take a look at my nUI_Infopanel_Chat addon to see what commands I used to add chat windows to a new location.

I am still trying to create a new dock frame but I don't think Blizzards docking functions are fully designed for more than the general dock frame at present.
__________________
Xrystal is offline   Reply With Quote
Unread 05-11-12, 08:35 PM   #3
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,260
For questions like this, looking at the Blizzard UI code should generally be your first step.

All of the functions related to docking, moving, resizing, and otherwise manipulating the chat frames are used and/or defined in FloatingChatFrame.lua.
Phanx is offline   Reply With Quote
Unread 05-12-12, 01:12 AM   #4
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Yep, many an hour I have trawled through that code while working on my chat plugins... *sigh* but alas the docking system isn't that well documented or exampled clear enough.

These are some of the functions I have used with my chat plugins. But definitely worth reading though those files Phanx mentioned.

local _, _, _, _, _, _, shown = FCF_GetChatWindowInfo(i);

Locking Functions
FCF_SetLocked( cframe, nil );
FCF_SetLocked( cframe, 1 );

Docking Functions
FCF_UnDockFrame( cframe );
FCF_DockFrame( cframe, #FCFDock_GetChatFrames(GENERAL_CHAT_DOCK)+1, true );

SetChatWindowShown(cframe:GetID(), 1);
__________________

Last edited by Xrystal : 05-12-12 at 01:21 AM.
Xrystal is offline   Reply With Quote
Unread 05-12-12, 02:57 AM   #5
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 428
Originally Posted by Phanx View Post
For questions like this, looking at the Blizzard UI code should generally be your first step.

All of the functions related to docking, moving, resizing, and otherwise manipulating the chat frames are used and/or defined in FloatingChatFrame.lua.
>.<


but alas the docking system isn't that well documented or exampled clear enough.
tis my issue
10leej is offline   Reply With Quote
Unread 05-12-12, 04:52 AM   #6
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Yeah, my attempts have got as far as getting the docking bar and the chat tab and frame to appear I want as the main always docked frame like the GENERAL one for the blizzard version but looking at their floating chat frame code they haven't object orientated all of the docking code to allow non GENERAL dockable frames to be used. Some of the functions aren't hardcoded to the GENERAL one but some are. It might have to be the case of literally writing a FloatingChatFrame lua file that does the same sort of thing but for a non GENERAL dock system. That is one thing I am considering looking into when I next get 5 hrs to sit down and spend time on it haha.
__________________
Xrystal is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » OpenChatWindow

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