



function WhatsNext:ShowExportFrame(exportString, closeFunction)
	if not self.exportFrame then
		local frame = self.AceGUI:Create("Window")
		_G["WhatsNext_ExportFrame"] = frame
		WhatsNext_AddOptionsScreen(frame.frame)
		tinsert(UISpecialFrames, "WhatsNext_ExportFrame") 
		self.exportFrame = frame;
		frame:SetWidth(230)
		frame:SetHeight(84)
		frame:SetTitle("What's Next? - Export")
		frame:SetStatusText("")
		frame:EnableResize(false);
		frame:SetCallback("OnClose", closeFunction)
		frame:SetLayout("Flow")
		frame:SetAutoAdjustHeight(false)	
		
		local label = WhatsNext.AceGUI:Create('Label');
		label:SetText("Press Control-C to copy the export.");
		label:SetFullWidth(true)
		label.label:SetJustifyH("CENTER")
		label.label:SetJustifyV("CENTER")
		frame:AddChild(label)
		
		frame.exportField = WhatsNext.AceGUI:Create('EditBox');
		frame.exportField:SetText("");
		frame.exportField:SetMaxLetters(0);
		frame.exportField:SetWidth(103);
		frame.exportField:DisableButton(true);
		frame.exportField:SetFocus()
		frame:AddChild(frame.exportField)
		
		local okButton = WhatsNext.AceGUI:Create('Button');
		okButton:SetWidth(103);
		okButton:SetText('Okay');
		okButton:SetCallback('OnClick', function() 
			closeFunction()
			frame.frame:Hide()
		end);
		frame:AddChild(okButton)
		
		frame:DoLayout()
	else
		self.exportFrame:Show()
	end
	
	self.exportFrame.exportField:SetText(exportString);
	self.exportFrame.exportField:HighlightText()
	self.exportFrame.exportField:SetFocus()
end