



function WhatsNext:ShowExportFrame(exportString,count, 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(240)
		frame:SetHeight(94)
		frame:SetTitle("What's Next? - Export")
		frame:SetStatusText("")
		frame:EnableResize(false);
		frame:SetCallback("OnClose", closeFunction)
		frame:SetLayout("Flow")
		frame:SetAutoAdjustHeight(false)	
		
		frame.label = WhatsNext.AceGUI:Create('Label');
		frame.label:SetText("Press Control-C to copy the export.");
		frame.label:SetFullWidth(true)
		frame.label:SetHeight(20)
		frame.label.label:SetJustifyH("CENTER")
		frame.label.label:SetJustifyV("CENTER")
		frame:AddChild(frame.label)
		
		frame.exportField = WhatsNext.AceGUI:Create('EditBox');
		frame.exportField:SetText("");
		frame.exportField:SetMaxLetters(0);
		frame.exportField:SetWidth(103);
		frame.exportField:DisableButton(true);
		frame.exportField.editbox:SetAutoFocus(true)
		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.label:SetText("Exporting " .. count .. (count == 1 and " entry." or " entries.") .. "\nPress Control-C to copy the export.");
	self.exportFrame.exportField:SetText(exportString);
	self.exportFrame.exportField:HighlightText()
	self.exportFrame:DoLayout()
end