Index: .
===================================================================
--- .	(revision 60)
+++ .	(working copy)

Property changes on: .
___________________________________________________________________
Modified: svn:ignore
## -1 +1,2 ##
+FuBar_DebuggerFu_dev.toc
 libs
Index: .pkgmeta
===================================================================
--- .pkgmeta	(revision 60)
+++ .pkgmeta	(working copy)
@@ -1,16 +1,49 @@
 package-as: FuBar_DebuggerFu
+enable-nolib-creation: no
 
 externals:
-	libs/AceLibrary: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceLibrary
-	libs/AceOO-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceOO-2.0
-	libs/AceAddon-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceAddon-2.0
-	libs/AceEvent-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceEvent-2.0
-    libs/AceHook-2.1: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceHook-2.1
-	libs/AceDB-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceDB-2.0
-	libs/AceConsole-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceConsole-2.0
-	libs/AceLocale-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
-	libs/FuBarPlugin-2.0: svn://svn.wowace.com/wow/fubarplugin-2-0/mainline/trunk/FuBarPlugin-2.0
-	libs/LibCrayon-3.0: svn://svn.wowace.com/wow/libcrayon-3-0/mainline/trunk
-	libs/Dewdrop-2.0: svn://svn.wowace.com/wow/dewdroplib/mainline/trunk/Dewdrop-2.0
-	libs/Tablet-2.0: svn://svn.wowace.com/wow/tabletlib/mainline/trunk/Tablet-2.0
-	libs/LibSharedMedia-3.0: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
\ No newline at end of file
+# libs
+ Libs/LibStub:
+   url: svn://svn.wowace.com/wow/libstub/mainline/trunk
+   tag: latest
+ Libs/LibCrayon-3.0: 
+   svn://svn.wowace.com/wow/libcrayon-3-0/mainline/trunk
+   tag: latest
+ Libs/Dewdrop-2.0: 
+   svn://svn.wowace.com/wow/dewdroplib/mainline/trunk/Dewdrop-2.0
+   tag: latest
+ Libs/Tablet-2.0: 
+   svn://svn.wowace.com/wow/tabletlib/mainline/trunk/Tablet-2.0
+   tag: latest
+ Libs/LibSharedMedia-3.0: 
+   svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
+   tag: latest
+
+# ace
+ Libs/AceLibrary: 
+   url: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceLibrary
+ Libs/AceAddon-3.0: 
+   url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
+ Libs/AceEvent-3.0: 
+   url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
+ Libs/AceDB-3.0:
+   url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
+ Libs/AceLocale-3.0:
+   url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
+
+# fubar
+ Libs/LibFuBarPlugin-3.0:
+   url: svn://svn.wowace.com/wow/libfubarplugin-3-0/mainline/trunk
+
+#	libs/AceOO-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceOO-2.0
+#	libs/AceAddon-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceAddon-2.0
+#	libs/AceEvent-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceEvent-2.0
+#   libs/AceHook-2.1: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceHook-2.1
+#	libs/AceDB-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceDB-2.0
+#	libs/AceConsole-2.0: svn://svn.wowace.com/wow/ace2/mainline/trunk/AceConsole-2.0
+#	libs/AceLocale-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
+#	libs/FuBarPlugin-2.0: svn://svn.wowace.com/wow/fubarplugin-2-0/mainline/trunk/FuBarPlugin-2.0
+#	libs/LibCrayon-3.0: svn://svn.wowace.com/wow/libcrayon-3-0/mainline/trunk
+#	libs/Dewdrop-2.0: svn://svn.wowace.com/wow/dewdroplib/mainline/trunk/Dewdrop-2.0
+#	libs/Tablet-2.0: svn://svn.wowace.com/wow/tabletlib/mainline/trunk/Tablet-2.0
+#	libs/LibSharedMedia-3.0: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
\ No newline at end of file
Index: embeds.xml
===================================================================
--- embeds.xml	(revision 60)
+++ embeds.xml	(working copy)
@@ -1,19 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.blizzard.com/wow/ui/" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
 ..\FrameXML\UI.xsd">
+	<!-- Libsstub -->
+	<Script file="Libs\LibStub\LibStub.lua"/>
 
-<Script file="Libs\AceLibrary\AceLibrary.lua"/>
-<Script file="Libs\AceOO-2.0\AceOO-2.0.lua"/>
-<Script file="Libs\AceAddon-2.0\AceAddon-2.0.lua"/>
-<Script file="Libs\AceEvent-2.0\AceEvent-2.0.lua"/>
-<Script file="Libs\AceDB-2.0\AceDB-2.0.lua"/>
-<Script file="Libs\AceConsole-2.0\AceConsole-2.0.lua"/>
-<Include file="libs\AceLocale-3.0\AceLocale-3.0.xml"/>
+	<!-- Ace Framework -->
+	<Script file="Libs\AceLibrary\AceLibrary.lua"/>
+	<Script file="Libs\AceAddon-3.0\AceAddon-3.0.lua"/>
+	<Include file="libs\AceLocale-3.0\AceLocale-3.0.xml"/>
+	<Include file="libs\AceDB-3.0\AceDB-3.0.xml"/>
 
-<Script file="Libs\FuBarPlugin-2.0\FuBarPlugin-2.0.lua"/>
-<Include file="Libs\LibCrayon-3.0\lib.xml"/>
-<Script file="Libs\Dewdrop-2.0\Dewdrop-2.0.lua"/>
-<Script file="Libs\Tablet-2.0\Tablet-2.0.lua"/>
+	<!-- Fubar Framework -->
+	<Include file="Libs\LibFuBarPlugin-3.0\lib.xml"/>
 
-<Include file="Libs\LibSharedMedia-3.0\lib.xml"/>
+	<!-- other Libraries -->
+	<Include file="Libs\LibCrayon-3.0\lib.xml"/>
+	<Script file="Libs\Dewdrop-2.0\Dewdrop-2.0.lua"/>
+	<Script file="Libs\Tablet-2.0\Tablet-2.0.lua"/>
+
+	<Include file="Libs\LibSharedMedia-3.0\lib.xml"/>
 </Ui>
Index: FuBar_DebuggerFu.lua
===================================================================
--- FuBar_DebuggerFu.lua	(revision 60)
+++ FuBar_DebuggerFu.lua	(working copy)
@@ -8,459 +8,34 @@
 
 local MaxHardLineProtection = 10000;
 
-DebuggerFu = AceLibrary("AceAddon-2.0"):new("FuBarPlugin-2.0", "AceEvent-2.0", "AceConsole-2.0", "AceDB-2.0")
+--[[
 DebuggerFu.version = "2.5.1." .. string.sub("$Revision: @file-revision@ $", 12, -3)
 DebuggerFu.date = string.sub("$Date: @project-date-iso@ $", 8, 17)
 DebuggerFu.hasIcon = true
 DebuggerFu.clickableTooltip = true
-DebuggerFu.tooltipHiddenWhenEmpty = true
+DebuggerFu.tooltipHiddenWhenEmpty = true --]]
+DebuggerFu = LibStub("AceAddon-3.0"):NewAddon("DebuggerFu", "LibFuBarPlugin-3.0", "AceEvent-3.0");
+DebuggerFu.version = "2.5.1." .. string.sub("$Revision: @file-revision@ $", 12, -3)
+DebuggerFu.date = string.sub("$Date: @project-date-iso@ $", 8, 17)
+DebuggerFu:SetFuBarOption('hasIcon', true)
+DebuggerFu:SetFuBarOption('iconPath', "interface\\addons\\fubar_debuggerfuv2\\icon")
+DebuggerFu:SetFuBarOption('title', "DebuggerFu")
+DebuggerFu:SetFuBarOption('name', "DebuggerFu")
+DebuggerFu:SetFuBarOption('revision', 60)
+DebuggerFu:SetFuBarOption('cannotDetachTooltip', true)
+DebuggerFu:SetFuBarOption('tooltipType', "Tablet-2.0")
+DebuggerFu:SetFuBarOption('configType', "Dewdrop-2.0")
+DebuggerFu:SetFuBarOption('clickableTooltip', true)
+--DebuggerFu:SetFuBarOption('overrideMenu', true)
+DebuggerFu:SetFuBarOption('independentProfile', true)
+--DebuggerFu:SetFuBarOption('hideWithoutStandby', true)
 
+
 local fontslist = {}
-local optionsTable = {
-	type = 'group',
-	args = {
-		enterVar = {
-			type = "text",
-			name = L["Debug Variable"],
-			desc = L["Enter the name of the variable to debug here"],
-			get = function()
-				return DebuggerFu.db.profile.newRootVariable
-			end,
-			set = function(value)
-				DebuggerFu.db.profile.newRootVariable = value;
-				--DEFAULT_CHAT_FRAME:AddMessage("Set : "..DebuggerFu.db.profile.newRootVariable)				
-				dewdrop:Close()
-				local found=false;
-				for _, i in ipairs(DebuggerFu.db.profile.browseHistory) do
-					if i == DebuggerFu.db.profile.newRootVariable then
-						found = true;
-						break;
-					end
-				end
-				if (found == false) then
-					table.insert(DebuggerFu.db.profile.browseHistory,1,DebuggerFu.db.profile.newRootVariable);
-				end
-				DebuggerFu.db.profile.browsePos = 1;
-				DebuggerFu:BuildTree(DebuggerFu.db.profile.newRootVariable);
-				--DebuggerFu:CalcTooltipVarDisplaySize();
-			end,
-			validate = function(v) 
-				return 1 
-			end,
-			usage = "name",			
-			order = 15
-		},					
-		["-blank-"] = {
-			order = 20,
-			type = 'header',
-		},		
-		variableOptions = {
-			order = 25,
-			type = "group",
-			name = L["Variable display"],
-			desc = L["Options for variable display."],
-			args = {
-				showVarName = {
-					type = "toggle",
-					name = L["Variable name"],
-					desc = L["Show the name of the selected variable"],
-					get = function()
-						return DebuggerFu.db.profile.showVarName
-					end,
-					set = function(value)
-						DebuggerFu.db.profile.showVarName = value;
-						DebuggerFu:CalcTooltipVarDisplaySize();
-					end,
-					order = 16
-				},						
-				showFullVarName = {
-					type = "toggle",
-					name = L["Full Variable name"],
-					desc = L["Show the full name of the selected variable (only valid in tooltip)"],
-					get = function()
-						return DebuggerFu.db.profile.showFullVarName
-					end,
-					set = function(value)
-						DebuggerFu.db.profile.showFullVarName = value;				
-						DebuggerFu:Update();
-					end,
-					disabled = function()
-						if DebuggerFu.db.profile.showVarName then
-							return false;
-						else
-							return true;
-						end
-					end,						
-					order = 17
-				},								
-				showType = {
-					type = "toggle",
-					name = L["Show Type"],
-					desc = L["Show the type of the selected variable"],
-					get = function()
-						return DebuggerFu.db.profile.showType
-					end,
-					set = function(value)
-						DebuggerFu.db.profile.showType = value;
-						DebuggerFu:CalcTooltipVarDisplaySize();
-					end,
-					order = 18
-				},				
-				showValue = {
-					type = "toggle",
-					name = L["Show Value"],
-					desc = L["Show the value of the selected variable"],
-					get = function()
-						return DebuggerFu.db.profile.showValue
-					end,
-					set = function(value)
-						DebuggerFu.db.profile.showValue = value;
-						DebuggerFu:CalcTooltipVarDisplaySize();
-					end,
-					order = 19
-				},						
-				["-blank202-"] = {
-					order = 20,
-					type = 'header',
-				},													
-				showDepth = {
-					type = "toggle",
-					name = L["Show Depth"],
-					desc = L["Shows the depths of the table nodes in brackets at the end"],
-					get = function()
-						return DebuggerFu.db.profile.showDepth
-					end,
-					set = function(value)
-						DebuggerFu.db.profile.showDepth = value;
-						DebuggerFu:Update();
-					end,
-					order = 21
-				},														
-				showValueInTree = {
-					type = "toggle",
-					name = L["Show value in tree"],
-					desc = L["Shows the value of the variable in the tree"],
-					get = function()
-						return DebuggerFu.db.profile.showValueInTree
-					end,
-					set = function(value)
-						DebuggerFu.db.profile.showValueInTree = value;
-						DebuggerFu:Update();
-					end,
-					order = 22
-				},														
-				showTypeInTree = {
-					type = "toggle",
-					name = L["Show type in tree"],
-					desc = L["Shows the variable type in the tree in {} brackets"],
-					get = function()
-						return DebuggerFu.db.profile.showTypeInTree
-					end,
-					set = function(value)
-						DebuggerFu.db.profile.showTypeInTree = value;
-						DebuggerFu:Update();
-					end,
-					order = 22
-				},																		
-			}
-		},									
-		maxTreeDepth = {
-			type = 'range',
-			name = L["Tree Depth"],
-			desc = L["How many depth levels should be displayed in tree (default 6)"],
-			get = function()
-				return DebuggerFu.db.profile.maxDepth;
-			end,
-			set = function(v)
-				DebuggerFu.db.profile.maxDepth = v
-			end,
-			min = 1,
-			max = 10,
-			step = 1,
-			order = 30
-		},		
-		maxNodeProtection = {
-			type = 'range',
-			name = L["Max Line Protection"],
-			desc = L["Limit the analysation to this amount of lines. (default 1000)"],
-			get = function()
-				if (DebuggerFu.db.profile.maxLineProtection == MaxHardLineProtection) then
-					DebuggerFu.db.profile.maxLineProtection = 0;
-				end
-				return DebuggerFu.db.profile.maxLineProtection;
-			end,
-			set = function(v)
-				DebuggerFu.db.profile.maxLineProtection = v
-				if (maxLineProtection == 0) then
-					maxLineProtection = MaxHardLineProtection;
-				end
-			end,
-			min = 0,
-			max = 2000,
-			step = 100,
-			order = 33
-		},				
-		["-blank20-"] = {
-			order = 35,
-			type = 'header',
-		},									
-		barDataDisplay = {
-			type = "toggle",
-			name = L["Data display in bar"],
-			desc = L["Display the data info in bar instead of in tooltip (see next setting as well)"],
-			get = function()
-				return DebuggerFu.db.profile.barDataDisplay
-			end,
-			set = function(value)
-				DebuggerFu.db.profile.barDataDisplay = value;
-				DebuggerFu:Update();
-			end,
-			order = 40
-		},		
-		maxTooltipLines = {
-			type = 'range',
-			name = L["Max Tooltip Lines"],
-			desc = L["If lines displayed in tooltip exceeds this number display data in bar"],
-			get = function()
-				return DebuggerFu.db.profile.lineThreshhold;
-			end,
-			set = function(v)
-				DebuggerFu.db.profile.lineThreshhold = v
-				DebuggerFu:UpdateText();
-			end,
-			disabled = function()
-				if DebuggerFu.db.profile.barDataDisplay then
-					return false;
-				else
-					return true;
-				end
-			end,			
-			min = 5,
-			max = 70,
-			step = 1,
-			order = 45
-		},
-		autoDetach = {
-			type = "toggle",
-			name = L["Auto Detach Tooltip"],
-			desc = L["Automatically detaches tooltip when the status bar is used for dislaying variables to prevent tooltip from jumping around"],
-			get = function()
-				return DebuggerFu.db.profile.autoDetach
-			end,
-			set = function(value)
-				DebuggerFu.db.profile.autoDetach = value;
-				DebuggerFu:UpdateText();
-			end,
-			disabled = function()
-				if DebuggerFu.db.profile.barDataDisplay then
-					return false;
-				else
-					return true;
-				end
-			end,						
-			order = 50
-		},				
-		autoAttach = {
-			type = "toggle",
-			name = L["Auto Attach Tooltip"],
-			desc = L["Automatically attaches tooltip when the status bar is no longer used for dislaying variables (displayed in tooltip)"],
-			get = function()
-				return DebuggerFu.db.profile.autoAttach
-			end,
-			set = function(value)
-				DebuggerFu.db.profile.autoAttach = value;
-				DebuggerFu:UpdateText();
-			end,
-			disabled = function()
-				if DebuggerFu.db.profile.barDataDisplay then
-					return false;
-				else
-					return true;
-				end
-			end,						
-			order = 55
-		},		
-		["-blank25-"] = {
-			order = 60,
-			type = 'header',
-		},									
-		wipeLastTooltip = {
-			type = "toggle",
-			name = L["Wipe Tooltip on reload"],
-			desc = L["Wipe the tooltip when UI reloaded / restarted (otherwise data will be remembered)"],
-			get = function()
-				return DebuggerFu.db.profile.wipeLastTooltip
-			end,
-			set = function(value)
-				DebuggerFu.db.profile.wipeLastTooltip = value;
-			end,
-			order = 65
-		},				
-		debugBoxOptions = {
-			order = 70,
-			type = "group",
-			name = L["Debug Box Options"], 
-			desc = L["Set options for the debug box."],
-			args = {
-				editBoxWidth = {
-					type = 'range',
-					name = L["EditBox Width"],
-					desc = L["Sets the width of your editbox"],
-					get = function()
-						return DebuggerFu.db.profile.editBoxWidth;
-					end,
-					set = function(v)
-						DebuggerFu.db.profile.editBoxWidth = v
-						DebuggerFu:CheckEditBoxParameters();
-					end,
-					min = 120,
-					max = 500,
-					step = 10,
-					order = 1
-				},
-				editBoxAlpha = {
-					type = 'range',
-					name = L["EditBox Alpha"],
-					desc = L["Sets the alpha value of your editbox"],
-					get = function()
-						return DebuggerFu.db.profile.editBoxAlpha;
-					end,
-					set = function(v)
-						DebuggerFu.db.profile.editBoxAlpha = v
-						DebuggerFu:CheckEditBoxParameters();
-					end,
-					min = 0.4,
-					max = 1,
-					step = 0.1,
-					order = 2
-				},				
-				closeOnEnter = {
-					type = 'toggle',
-					name = L["Close on Enter"],
-					desc = L["If on it closes the editbox with just the normal enter"],
-					get = function()
-						return DebuggerFu.db.profile.closeOnEnter;
-					end,
-					set = function(v)
-						DebuggerFu.db.profile.closeOnEnter = v
-					end,
-					order = 3
-				},				
-				clearHistory = {
-					order = 4,
-					type = "execute",
-					name = L["Clear Browse History"],
-					desc = L["Clears the browse history of all entries"],
-					func = function(v)
-						DebuggerFu.db.profile.browseHistory = {};
-						DebuggerFu:Debug("Browse history erased !",0);
-					end,
-				},				
-			}
-		},		
-		showBlank = {
-			type = "toggle",
-			name = L["Show Blank Text"],
-			desc = L["Show a blank text instead of Debugger while showing nothing"],
-			get = function()
-				return DebuggerFu.db.profile.showBlank
-			end,
-			set = function(value)
-				DebuggerFu.db.profile.showBlank = value;
-				DebuggerFu:UpdateText();
-			end,
-			order = 75
-		},						
-		["-blank29-"] = {
-			order = 80,
-			type = 'header',
-		},			
-		debuggingLevel = {
-			type = 'range',
-			name = L["Debug Level"],
-			desc = L["Choose level for debugging this tool (-1 = no messages at all) (0 = standard info messages) (>0 for debugging purpose only) "],
-			get = function()
-				return DebuggerFu.db.profile.debugLevel
-			end,
-			set = function(v)
-				DebuggerFu.db.profile.debugLevel = v
-			end,
-			min = -1,
-			max = 5,
-			step = 1,
-			order = 85
-		},				
-		showLogWindow = {
-			type = "toggle",
-			name = L["Toggle Log Window"],
-			desc = L["Toggle The Log Window If Debug-1.0 is installed"],
-			get = function()
-				return getglobal("Debug10LogFrame"):IsShown()
-			end,
-			set = function(value)
-			    if value then 
-			        getglobal("Debug10LogFrame"):Show()
-			    else
-			        getglobal("Debug10LogFrame"):Hide()
-			    end
-			end,
-			hidden = function() 
-			    return not AceLibrary:HasInstance("DebugStub-1.0", false) end,
-			order = 90
-		},		
-    logWindowFont = {
-    	name = L["Set Log Font"],
-      desc = L["Set the log font"],
-      type = "text",
-      order = 95,
-      get = "GetLogFont",
-      set = "SetLogFont",
-      validate = fontslist,
-			hidden = function() 
-				return not AceLibrary:HasInstance("DebugStub-1.0", false) 
-			end,
-  	},		
-	}	
-}
 
 DebuggerFu.OnMenuRequest = optionsTable
-DebuggerFu:RegisterChatCommand( { "/DebuggerFu" }, optionsTable )
+--DebuggerFu:RegisterChatCommand( { "/DebuggerFu" }, optionsTable )
 
-DebuggerFu:RegisterDB("DebuggerFuDB")
-DebuggerFu:RegisterDefaults('profile', {
-	varTree = {},
-	browseHistory = {}, -- saves all inputs in debug text frame
-	browsePos = 1,	-- the present position while browsing the history
-	closeOnEnter = nil, -- if set , edit box closes on normal enter
-	editBoxWidth = 200,
-	editBoxAlpha = 0.8,
-	showMiniMap = false,
-	displayIndex = nil,
-	showVarName = nil,
-	showFullVarName = nil,
-	showValue = 1,
-	showType = 1,
-	autoDetach =1,
-	autoAttach = 1,
-	lineThreshhold = 49,
-	showDepth = 1, -- set to 1 if the depth of the table nodes is shown behind em
-	newTreeBuild = 0,
-	maxDepth = 6,
-	varDisplaySize =4,  --internal value to figure out how many lines the var display takes in tooltip
-	wipeLastTooltip =1, 
-	displayedVariable = nil, -- the last querried variable for build tree (might be invalid)
-	rootVariable = nil, -- the root variable of the search
-	newRootVariable = nil, -- new variable to use will be rootVariable if it is confirmed working
-	editMode = nil, -- if set to 1 indicates that editing is taking place
-	editIndex = nil, -- set to the index that is edited, if editmode is on
-	lastEditBoxText = nil, -- if this is set, the last editboxtext that was erased by editing is stored here
-	editBoxVisible = nil, -- indicates if the editbox was visible b4 editing or not
-	showValueInTree = 1, -- 1 means the var value will be shown in tooltiptree
-	showTypeInTree = 1, -- 1 means the var type will be shown in tooltiptree
-	debugLevel= 0,
-	maxLineProtection= 1000,
-})
-
 local media 
 
 function DebuggerFu:SetLogFont(font)
@@ -502,14 +77,470 @@
 end
 
 -- Methods
+local updateframe;
 
 function DebuggerFu:OnInitialize()
 	--self:DetachTooltip();
+	
+	local optionsTable = {
+		type = 'group',
+		args = {
+			enterVar = {
+				type = "text",
+				name = L["Debug Variable"],
+				desc = L["Enter the name of the variable to debug here"],
+				get = function()
+					return DebuggerFu.db.profile.newRootVariable
+				end,
+				set = function(value)
+					DebuggerFu.db.profile.newRootVariable = value;
+					--DEFAULT_CHAT_FRAME:AddMessage("Set : "..DebuggerFu.db.profile.newRootVariable)				
+					dewdrop:Close()
+					local found=false;
+					for _, i in ipairs(DebuggerFu.db.profile.browseHistory) do
+						if i == DebuggerFu.db.profile.newRootVariable then
+							found = true;
+							break;
+						end
+					end
+					if (found == false) then
+						table.insert(DebuggerFu.db.profile.browseHistory,1,DebuggerFu.db.profile.newRootVariable);
+					end
+					DebuggerFu.db.profile.browsePos = 1;
+					DebuggerFu:BuildTree(DebuggerFu.db.profile.newRootVariable);
+					--DebuggerFu:CalcTooltipVarDisplaySize();
+				end,
+				validate = function(v) 
+					return 1 
+				end,
+				usage = "name",			
+				order = 15
+			},					
+			["-blank-"] = {
+				order = 20,
+				type = 'header',
+			},		
+			variableOptions = {
+				order = 25,
+				type = "group",
+				name = L["Variable display"],
+				desc = L["Options for variable display."],
+				args = {
+					showVarName = {
+						type = "toggle",
+						name = L["Variable name"],
+						desc = L["Show the name of the selected variable"],
+						get = function()
+							return DebuggerFu.db.profile.showVarName
+						end,
+						set = function(value)
+							DebuggerFu.db.profile.showVarName = value;
+							DebuggerFu:CalcTooltipVarDisplaySize();
+						end,
+						order = 16
+					},						
+					showFullVarName = {
+						type = "toggle",
+						name = L["Full Variable name"],
+						desc = L["Show the full name of the selected variable (only valid in tooltip)"],
+						get = function()
+							return DebuggerFu.db.profile.showFullVarName
+						end,
+						set = function(value)
+							DebuggerFu.db.profile.showFullVarName = value;				
+							DebuggerFu:Update();
+						end,
+						disabled = function()
+							if DebuggerFu.db.profile.showVarName then
+								return false;
+							else
+								return true;
+							end
+						end,						
+						order = 17
+					},								
+					showType = {
+						type = "toggle",
+						name = L["Show Type"],
+						desc = L["Show the type of the selected variable"],
+						get = function()
+							return DebuggerFu.db.profile.showType
+						end,
+						set = function(value)
+							DebuggerFu.db.profile.showType = value;
+							DebuggerFu:CalcTooltipVarDisplaySize();
+						end,
+						order = 18
+					},				
+					showValue = {
+						type = "toggle",
+						name = L["Show Value"],
+						desc = L["Show the value of the selected variable"],
+						get = function()
+							return DebuggerFu.db.profile.showValue
+						end,
+						set = function(value)
+							DebuggerFu.db.profile.showValue = value;
+							DebuggerFu:CalcTooltipVarDisplaySize();
+						end,
+						order = 19
+					},						
+					["-blank202-"] = {
+						order = 20,
+						type = 'header',
+					},													
+					showDepth = {
+						type = "toggle",
+						name = L["Show Depth"],
+						desc = L["Shows the depths of the table nodes in brackets at the end"],
+						get = function()
+							return DebuggerFu.db.profile.showDepth
+						end,
+						set = function(value)
+							DebuggerFu.db.profile.showDepth = value;
+							DebuggerFu:Update();
+						end,
+						order = 21
+					},														
+					showValueInTree = {
+						type = "toggle",
+						name = L["Show value in tree"],
+						desc = L["Shows the value of the variable in the tree"],
+						get = function()
+							return DebuggerFu.db.profile.showValueInTree
+						end,
+						set = function(value)
+							DebuggerFu.db.profile.showValueInTree = value;
+							DebuggerFu:Update();
+						end,
+						order = 22
+					},														
+					showTypeInTree = {
+						type = "toggle",
+						name = L["Show type in tree"],
+						desc = L["Shows the variable type in the tree in {} brackets"],
+						get = function()
+							return DebuggerFu.db.profile.showTypeInTree
+						end,
+						set = function(value)
+							DebuggerFu.db.profile.showTypeInTree = value;
+							DebuggerFu:Update();
+						end,
+						order = 22
+					},																		
+				}
+			},									
+			maxTreeDepth = {
+				type = 'range',
+				name = L["Tree Depth"],
+				desc = L["How many depth levels should be displayed in tree (default 6)"],
+				get = function()
+					return DebuggerFu.db.profile.maxDepth;
+				end,
+				set = function(v)
+					DebuggerFu.db.profile.maxDepth = v
+				end,
+				min = 1,
+				max = 10,
+				step = 1,
+				order = 30
+			},		
+			maxNodeProtection = {
+				type = 'range',
+				name = L["Max Line Protection"],
+				desc = L["Limit the analysation to this amount of lines. (default 1000)"],
+				get = function()
+					if (DebuggerFu.db.profile.maxLineProtection == MaxHardLineProtection) then
+						DebuggerFu.db.profile.maxLineProtection = 0;
+					end
+					return DebuggerFu.db.profile.maxLineProtection;
+				end,
+				set = function(v)
+					DebuggerFu.db.profile.maxLineProtection = v
+					if (maxLineProtection == 0) then
+						maxLineProtection = MaxHardLineProtection;
+					end
+				end,
+				min = 0,
+				max = 2000,
+				step = 100,
+				order = 33
+			},				
+			["-blank20-"] = {
+				order = 35,
+				type = 'header',
+			},									
+			barDataDisplay = {
+				type = "toggle",
+				name = L["Data display in bar"],
+				desc = L["Display the data info in bar instead of in tooltip (see next setting as well)"],
+				get = function()
+					return DebuggerFu.db.profile.barDataDisplay
+				end,
+				set = function(value)
+					DebuggerFu.db.profile.barDataDisplay = value;
+					DebuggerFu:Update();
+				end,
+				order = 40
+			},		
+			maxTooltipLines = {
+				type = 'range',
+				name = L["Max Tooltip Lines"],
+				desc = L["If lines displayed in tooltip exceeds this number display data in bar"],
+				get = function()
+					return DebuggerFu.db.profile.lineThreshhold;
+				end,
+				set = function(v)
+					DebuggerFu.db.profile.lineThreshhold = v
+					DebuggerFu:UpdateText();
+				end,
+				disabled = function()
+					if DebuggerFu.db.profile.barDataDisplay then
+						return false;
+					else
+						return true;
+					end
+				end,			
+				min = 5,
+				max = 70,
+				step = 1,
+				order = 45
+			},
+			autoDetach = {
+				type = "toggle",
+				name = L["Auto Detach Tooltip"],
+				desc = L["Automatically detaches tooltip when the status bar is used for dislaying variables to prevent tooltip from jumping around"],
+				get = function()
+					return DebuggerFu.db.profile.autoDetach
+				end,
+				set = function(value)
+					DebuggerFu.db.profile.autoDetach = value;
+					DebuggerFu:UpdateText();
+				end,
+				disabled = function()
+					if DebuggerFu.db.profile.barDataDisplay then
+						return false;
+					else
+						return true;
+					end
+				end,						
+				order = 50
+			},				
+			autoAttach = {
+				type = "toggle",
+				name = L["Auto Attach Tooltip"],
+				desc = L["Automatically attaches tooltip when the status bar is no longer used for dislaying variables (displayed in tooltip)"],
+				get = function()
+					return DebuggerFu.db.profile.autoAttach
+				end,
+				set = function(value)
+					DebuggerFu.db.profile.autoAttach = value;
+					DebuggerFu:UpdateText();
+				end,
+				disabled = function()
+					if DebuggerFu.db.profile.barDataDisplay then
+						return false;
+					else
+						return true;
+					end
+				end,						
+				order = 55
+			},		
+			["-blank25-"] = {
+				order = 60,
+				type = 'header',
+			},									
+			wipeLastTooltip = {
+				type = "toggle",
+				name = L["Wipe Tooltip on reload"],
+				desc = L["Wipe the tooltip when UI reloaded / restarted (otherwise data will be remembered)"],
+				get = function()
+					return DebuggerFu.db.profile.wipeLastTooltip
+				end,
+				set = function(value)
+					DebuggerFu.db.profile.wipeLastTooltip = value;
+				end,
+				order = 65
+			},				
+			debugBoxOptions = {
+				order = 70,
+				type = "group",
+				name = L["Debug Box Options"], 
+				desc = L["Set options for the debug box."],
+				args = {
+					editBoxWidth = {
+						type = 'range',
+						name = L["EditBox Width"],
+						desc = L["Sets the width of your editbox"],
+						get = function()
+							return DebuggerFu.db.profile.editBoxWidth;
+						end,
+						set = function(v)
+							DebuggerFu.db.profile.editBoxWidth = v
+							DebuggerFu:CheckEditBoxParameters();
+						end,
+						min = 120,
+						max = 500,
+						step = 10,
+						order = 1
+					},
+					editBoxAlpha = {
+						type = 'range',
+						name = L["EditBox Alpha"],
+						desc = L["Sets the alpha value of your editbox"],
+						get = function()
+							return DebuggerFu.db.profile.editBoxAlpha;
+						end,
+						set = function(v)
+							DebuggerFu.db.profile.editBoxAlpha = v
+							DebuggerFu:CheckEditBoxParameters();
+						end,
+						min = 0.4,
+						max = 1,
+						step = 0.1,
+						order = 2
+					},				
+					closeOnEnter = {
+						type = 'toggle',
+						name = L["Close on Enter"],
+						desc = L["If on it closes the editbox with just the normal enter"],
+						get = function()
+							return DebuggerFu.db.profile.closeOnEnter;
+						end,
+						set = function(v)
+							DebuggerFu.db.profile.closeOnEnter = v
+						end,
+						order = 3
+					},				
+					clearHistory = {
+						order = 4,
+						type = "execute",
+						name = L["Clear Browse History"],
+						desc = L["Clears the browse history of all entries"],
+						func = function(v)
+							DebuggerFu.db.profile.browseHistory = {};
+							DebuggerFu:Debug("Browse history erased !",0);
+						end,
+					},				
+				}
+			},		
+			showBlank = {
+				type = "toggle",
+				name = L["Show Blank Text"],
+				desc = L["Show a blank text instead of Debugger while showing nothing"],
+				get = function()
+					return DebuggerFu.db.profile.showBlank
+				end,
+				set = function(value)
+					DebuggerFu.db.profile.showBlank = value;
+					DebuggerFu:UpdateText();
+				end,
+				order = 75
+			},						
+			["-blank29-"] = {
+				order = 80,
+				type = 'header',
+			},			
+			debuggingLevel = {
+				type = 'range',
+				name = L["Debug Level"],
+				desc = L["Choose level for debugging this tool (-1 = no messages at all) (0 = standard info messages) (>0 for debugging purpose only) "],
+				get = function()
+					return DebuggerFu.db.profile.debugLevel
+				end,
+				set = function(v)
+					DebuggerFu.db.profile.debugLevel = v
+				end,
+				min = -1,
+				max = 5,
+				step = 1,
+				order = 85
+			},				
+			showLogWindow = {
+				type = "toggle",
+				name = L["Toggle Log Window"],
+				desc = L["Toggle The Log Window If Debug-1.0 is installed"],
+				get = function()
+					return getglobal("Debug10LogFrame"):IsShown()
+				end,
+				set = function(value)
+					if value then 
+						getglobal("Debug10LogFrame"):Show()
+					else
+						getglobal("Debug10LogFrame"):Hide()
+					end
+				end,
+				hidden = function() 
+					return not AceLibrary:HasInstance("DebugStub-1.0", false) end,
+				order = 90
+			},		
+		logWindowFont = {
+			name = L["Set Log Font"],
+		  desc = L["Set the log font"],
+		  type = "text",
+		  order = 95,
+		  get = "GetLogFont",
+		  set = "SetLogFont",
+		  validate = fontslist,
+				hidden = function() 
+					return not AceLibrary:HasInstance("DebugStub-1.0", false) 
+				end,
+		},		
+		}	
+	}
+
+	DebuggerFu.OnMenuRequest = optionsTable
+
+	
+	local defaults = {
+		profile = {
+			varTree = {},
+			browseHistory = {}, -- saves all inputs in debug text frame
+			browsePos = 1,	-- the present position while browsing the history
+			closeOnEnter = nil, -- if set , edit box closes on normal enter
+			editBoxWidth = 200,
+			editBoxAlpha = 0.8,
+			showMiniMap = false,
+			displayIndex = nil,
+			showVarName = nil,
+			showFullVarName = nil,
+			showValue = 1,
+			showType = 1,
+			autoDetach = 1,
+			autoAttach = 1,
+			lineThreshhold = 49,
+			showDepth = 1, -- set to 1 if the depth of the table nodes is shown behind em
+			newTreeBuild = 0,
+			maxDepth = 6,
+			varDisplaySize = 4,  --internal value to figure out how many lines the var display takes in tooltip
+			wipeLastTooltip = 1, 
+			displayedVariable = nil, -- the last querried variable for build tree (might be invalid)
+			rootVariable = nil, -- the root variable of the search
+			newRootVariable = nil, -- new variable to use will be rootVariable if it is confirmed working
+			editMode = nil, -- if set to 1 indicates that editing is taking place
+			editIndex = nil, -- set to the index that is edited, if editmode is on
+			lastEditBoxText = nil, -- if this is set, the last editboxtext that was erased by editing is stored here
+			editBoxVisible = nil, -- indicates if the editbox was visible b4 editing or not
+			showValueInTree = 1, -- 1 means the var value will be shown in tooltiptree
+			showTypeInTree = 1, -- 1 means the var type will be shown in tooltiptree
+			debugLevel = 0,
+			maxLineProtection = 1000,
+			FubarPosition = "MINIMAP",
+			FubarMinimapPosition = 180,
+		},
+	};
+
+	DebuggerFu.db = LibStub("AceDB-3.0"):New("DebuggerFuDB", defaults, true)
+	
+	DebuggerFu:SetFuBarOption("defaultPosition", DebuggerFu.db.profile.FubarPosition)
+	DebuggerFu:SetFuBarOption("defaultMinimapPosition", DebuggerFu.db.profile.FubarMinimapPosition)
+	
+	updateframe = CreateFrame("FRAME");
 end
 	
 function DebuggerFu:OnEnable()
     media = media or LibStub:GetLibrary("LibSharedMedia-3.0");
-	self:ReattachTooltip();
+	--self:ReattachTooltip();
 	self:CalcTooltipVarDisplaySize();
 	if (self.db.profile.wipeLastTooltip) then
 		self.db.profile.varTree = {};
@@ -518,25 +549,46 @@
 	self:CheckEditBoxParameters();
 	self.db.profile.browsePos = 1;
 	if self.db.profile.browseHistory and (self.db.profile.browseHistory[self.db.profile.browsePos]) then
-			self.editBox:SetText(self.db.profile.browseHistory[self.db.profile.browsePos]);
+			--self.editBox:SetText(self.db.profile.browseHistory[self.db.profile.browsePos]);
 	end
 		
     self:RegisterEvent("SharedMedia_Registered")	
     self:BuildFontList()	
 	--self:ScheduleRepeatingEvent("DebuggerFu_Update",self.ToggleTooltipDetached, 2, self);
-	--self:ScheduleEvent("DebuggerFu_Update",self.CheckTooltipAttachment, 1.5, self);		
+	--self:ScheduleEvent("DebuggerFu_Update",self.CheckTooltipAttachment, 1.5, self);
+	
+	updateframe.firstUpdate = 1.5;
+	updateframe.repeatUpdate = 2;
+	updateframe:SetScript("OnUpdate", function(frame, elapsed)
+		if frame.firstUpdate ~= nil then
+			frame.firstUpdate = frame.firstUpdate - elapsed;
+			if frame.firstUpdate < 0 then
+				--print("ScheduleEvent")
+				frame.firstUpdate = nil;
+				DebuggerFu:CheckTooltipAttachment(true);
+			end
+		end
+		
+		frame.repeatUpdate = frame.repeatUpdate - elapsed;
+		if frame.repeatUpdate < 0 then
+			--print("ScheduleRepeatingEvent")
+			frame.repeatUpdate = frame.repeatUpdate + 2;
+		end
+		
+	end)
+
 end
 
 function DebuggerFu:CheckTooltipAttachment(onlyAttach)
 	if (self:UseBarDisplay()) then		
 		if (not onlyAttach) and (self.db.profile.autoDetach) and (self:IsTooltipDetached() == false) then			
 			self:DetachTooltip();
-			--self:UpdateTooltip();			
+			self:UpdateTooltip();			
 		end		
 	elseif (self:IsTooltipDetached() == true) then		
 		if (self.db.profile.autoAttach) then
 			self:ReattachTooltip();
-			--self:UpdateTooltip();
+			self:UpdateTooltip();
 		end				
 	end		
 end
@@ -564,7 +616,19 @@
 	end
 end
 
-	
+function DebuggerFu:OnUpdateFuBarText()	
+	print("OnUpdateFuBarText");
+end
+
+function DebuggerFu:OnFuBarEnter()
+	DebuggerFu:UpdateFuBarTooltip()
+	print("OnFuBarEnter");
+end
+
+function DebuggerFu:OnUpdateFuBarTooltip()
+	DebuggerFu:OnTooltipUpdate()
+end
+
 function DebuggerFu:OnTextUpdate()	
 	local txt;
 	if (self.db.profile.showBlank) then
@@ -777,6 +841,10 @@
 	end
 end
 
+function DebuggerFu:UpdateText()
+	DebuggerFu:UpdateFuBarText()
+end
+
 function DebuggerFu:UseBarDisplay()	-- determins whether the bar is used for display or the tooltip
 	local aSize = #self.db.profile.varTree;	
 	
@@ -787,6 +855,14 @@
 	end
 end
 
+function DebuggerFu:IsTooltipDetached()
+	return DebuggerFu:IsFuBarTooltipDetached()
+end
+
+function DebuggerFu:UpdateTooltip()
+	return DebuggerFu:UpdateFuBarTooltip()
+end
+
 function DebuggerFu:GetFullVarName(index)
 	--DEFAULT_CHAT_FRAME:AddMessage("Showing full var name "..self.db.profile.displayedVariable);
 	local idx = index;
@@ -1157,8 +1233,12 @@
 	self.editFrame:SetAlpha(self.db.profile.editBoxAlpha);		
 end
 
-	
-function DebuggerFu:OnClick()
+
+function DebuggerFu:Update()
+	DebuggerFu:UpdateFuBarPlugin()
+end
+
+function DebuggerFu:OnFuBarClick()
 	if (IsShiftKeyDown()) then				
 		self:CheckEditBoxParameters();
 		if (self.editFrame:IsVisible()) then
@@ -1269,6 +1349,8 @@
 	if (nodeType == "number" or nodeType == "string" or nodeType == "boolean") then
 		--DEFAULT_CHAT_FRAME:AddMessage("Insert Bool "..nodeName.." "..nodeType);		
 		table.insert(self.db.profile.varTree, {name = nodeName, parentIndex = parentIndex,depth = depth, value = node});
+--	elseif (nodeType == "function") then
+--		table.insert(self.db.profile.varTree, {name = nodeName, parentIndex = parentIndex,depth = depth, value = "function"});
 	elseif (nodeType == "table") then
 		table.insert(self.db.profile.varTree, {name = nodeName, parentIndex = parentIndex,depth = depth, expanded = 1});
 		
Index: FuBar_DebuggerFu.toc
===================================================================
--- FuBar_DebuggerFu.toc	(revision 60)
+++ FuBar_DebuggerFu.toc	(working copy)
@@ -1,4 +1,4 @@
-﻿## Interface: 30300
+﻿## Interface: 50100
 ## Title: FuBar - |cffffffffDebugger|r|cff00ff00Fu|r
 ## Notes: Used to visualize and change values of variables/variable-trees in game
 ## Author: Schelli
@@ -12,8 +12,8 @@
 ## X-Curse-Repository-ID: wow/project-13908/mainline
 ## X-Category: Development Tools
 ## X-FuBar-Dependent: 1
-## X-Embeds: Ace2, LibCrayon-3.0, DewdropLib, FuBarPlugin-2.0, TabletLib
-## OptionalDeps: Ace2, LibCrayon-3.0, DewdropLib, FuBarPlugin-2.0, TabletLib
+## X-Embeds: Ace3, LibCrayon-3.0, DewdropLib, LibFuBarPlugin-3.0, TabletLib
+## OptionalDeps: Ace3, LibCrayon-3.0, DewdropLib, LibFuBarPlugin-3.0, TabletLib
 ## SavedVariables: DebuggerFuDB
 
 embeds.xml
