Derma Collapsible Category issue.. Unknown Category in top left

So I was working on some collapsible categories… when all of the sudden I get this random ass category in the top-left of my screen

Clicking it brings this error in console…


[ERROR] lua/vgui/dcategorycollapse.lua:208: attempt to index a nil value
  1. Toggle - lua/vgui/dcategorycollapse.lua:208
   2. DoClick - lua/vgui/dcategorycollapse.lua:25
    3. unknown - lua/vgui/dlabel.lua:206

I attempted to look it up to see what the issue was, seeing as it had nothing to do with my lua file at all, and only received this piece of code.


    self:GetParent():GetParent():InvalidateLayout()

I seriously have no idea what the fuck happened. It didn’t appear to be there while I wrote my first 2 categories, but when I added a third I started seeing it. Ended up removing the category to see if it was the issue, but apparently it wasn’t.

Here is the snippet of code to where I started working on the categories.


 

**SNIP

Problem was duplicated a category by accident**



Anyone have any Idea’s as to what is causing it?

Thanks for your time :slight_smile:

*Also, Sorry about how messy it is… For some reason copying from Notepad++ Fucks up my code when I paste it

EDIT:

Fixed

Its an unparented element.

Do you mean the categories?

What should I parent them to?

Where is ‘GeneralPanel’ ?

Up more in the code, Here is what it looks like.


GeneralPanel = vgui.Create('DPanel')
GeneralPanel:SetParent(ControlFrame)
GeneralPanel:SetSize(425, 425)
GeneralPanel:SetPos(200, 50)
GeneralPanel:SetVisible( true )
GeneralPanel.Paint = function()
    surface.SetDrawColor( 176, 196, 222, 255 )
    surface.DrawRect( 0, 0, GeneralPanel:GetWide(), GeneralPanel:GetTall() )
    surface.SetDrawColor( 255, 215, 0, 255 )
    surface.DrawOutlinedRect( 0, 0, GeneralPanel:GetWide(), GeneralPanel:GetTall() )
end

It come’s before GeneralList

On a side note, I might not have mentioned that everything is completely fine with my code… It all work’s fine, look’s great… But that extra category that I never even created is somehow in the top left of my screen, and I feel like I did something that might have caused it (obviously).

It’s extremely bothersome.

[editline]9th February 2013[/editline]

God damnit… I found the problem.

I accidentally duplicated one of the categories.

Thank you for your time anyway everyone, I appreciate it. Dumb mistake on my part.