paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-users] Child with ID '10010' already exists (???)


From: leiavoia
Subject: [paragui-users] Child with ID '10010' already exists (???)
Date: Sun, 3 Aug 2003 13:13:25 -0400
User-agent: KMail/1.5

I'm trying to implement a PG_DropDown box. When i place the object on the 
screen i get this error message:

"Child with ID '10010' already exists in the id cache. Ignoring the new 
child."

when i try to delete the object (like if i change screens), i get a segfault.

i took a look at the code for the dropdown:


------pgdropdown.cpp----------------\/----------------------

PG_DropDown::PG_DropDown(PG_Widget* parent, int id, const PG_Rect& r, const 
char* style) : PG_Widget(parent, r) {
        PG_Rect rect(0, 0, r.my_width - r.my_height, r.my_height);

        SetID(id);

        my_EditBox = new PG_LineEdit(this, rect, style);

        PG_Rect rbutton(abs(r.my_width - r.my_height), 0, r.my_height, 
r.my_height);
        my_DropButton = new PG_Button(this, PG_IDDROPDOWN_BOX, rbutton, NULL, 
style);

        PG_Rect rlist(r.my_xpos, r.my_ypos + r.my_height +1, r.my_width, 
r.my_height 
* 5);
        my_DropList = new PG_ListBox(NULL, rlist, style);
        my_DropList->SetEventObject(MSG_SELECTITEM, this, 
(MSG_CALLBACK_OBJ)&PG_DropDown::select_handler);

        //LoadThemeStyle(style);
}

-------pgdropdown.cpp---------------/\----------------------


it seems that DropDown wants to set the ID of my_DropDown to 
PG_IDDROPDOWN_BOX. if it does this for every box in existance, wouldn't they 
duplicate themselves?

is there a way around this error that i am not aware of yet? What is the 
"right" way to implement a DropDown (or related widget with similar errors)?

thanks

-- 
leiavoia
The AXIS Project
http://www.project-axis.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]