Code Broken

what was changed in the code?

local Backdrop = {
    bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
}

local f = CreateFrame("Button", "BakoraGetChatName", UIParent, "BackdropTemplate")
f:SetSize(200, 28)
f:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 50)
f:SetBackdrop(Backdrop)
f:SetClampedToScreen(true)
f:EnableMouse(true)
f:SetMovable(true)
f:SetUserPlaced(true)
f:RegisterForDrag("LeftButton")
f:RegisterForClicks("AnyUp")
f:SetScript("OnDragStart",function(self) 
    self:StartMoving()
end)
f:SetScript("OnDragStop",function(self)  
    self:StopMovingOrSizing()
end)

f.Text = CreateFrame("EditBox", nil, f, "InputBoxTemplate")
f.Text:SetPoint("TOPLEFT", 5, -11)
f.Text:SetPoint("BOTTOMRIGHT", -1, 5)
f.Text:SetFontObject(GameFontNormalSmall)
f.Text:SetAutoFocus(false)
f.Text:SetScript("OnEscapePressed", function(self)
	self:ClearFocus()
	self:GetParent():Hide()
end)
f.Close = CreateFrame("Button", nil, f, "UIPanelCloseButton")
f.Close:SetSize(10, 10)
f.Close:SetPoint("TOPRIGHT")
f:Hide()

local copyString = "%s-%s"

hooksecurefunc(UnitPopupCopyCharacterNameButtonMixin, "OnClick", function(self, button, down)
	local dropdownMenu = UnitPopupSharedUtil.GetCurrentDropdownMenu()
	local name = format(copyString, dropdownMenu.name, dropdownMenu.server or GetRealmName())
	local nameLen = strlen(name)
	BakoraGetChatName.Text:SetText(name)
	BakoraGetChatName:Show()
	BakoraGetChatName.Text:SetFocus()
	BakoraGetChatName.Text:SetCursorPosition(nameLen)
	BakoraGetChatName.Text:HighlightText(0, nameLen)
end)

Not working in what way?

I Have no popup

Add:

f.y = f:CreateTexture()
f.y:SetAllPoints()
f.y:SetColorTexture(0, 1, 0)

Thnx Dude,matter what section?

At the bottom of the code you posted. Just makes the frame is bright green and easier to see.

If you still can’t see it, I would question whether the addon is actually loading and/or change the name of the frame so the Blizz. code resets it to default just above ChatFrame1.

Its Listed in the addons view,still no popup

Is that the only code in the addon? Do you have debugging on?

If you make an addon with just that code, it will definately show up so the problem is likely elsewhere.

Missed some code at the bottom of your post

f.Close:SetPoint("TOPRIGHT")
f:Hide()

remove the

f:Hide()

Tried,It popped up once green but no text

You should be getting an error, the menu system has changed. Delete the green and change your hooked function to:

hooksecurefunc(UnitPopupCopyCharacterNameButtonMixin, "OnClick", function(self, contextdata)
	local name = format(copyString, contextdata.name, contextdata.server or GetRealmName())
	local nameLen = strlen(name)
	BakoraGetChatName.Text:SetText(name)
	BakoraGetChatName:Show()
	BakoraGetChatName.Text:SetFocus()
	BakoraGetChatName.Text:SetCursorPosition(nameLen)
	BakoraGetChatName.Text:HighlightText(0, nameLen)
end)

Thnx Works