wxFormBuilder icon indicating copy to clipboard operation
wxFormBuilder copied to clipboard

Ids should be unique across project

Open SpareSimian opened this issue 8 years ago • 3 comments

Currently first_id is applied for each top-level object in a project, so ids in different objects within a project overlap. Consider a project that contains a frame and a panel that is to be "stamped" several times in the frame. The panel's ids should not overlap those of the frame or spurious events from the panel will trigger handlers in the frame for which they're inappropriate. An alternative fix is to have an optional first_id property for every top-level object, so the user can control each object's control numbering.

SpareSimian avatar Jul 13 '17 13:07 SpareSimian

What about using random numbers for ids?

jhasse avatar Aug 04 '17 13:08 jhasse

I'd prefer deterministic numbering. The code generator just needs to not restart the sequence when it goes from one top-level object to the next, so they don't overlap.

SpareSimian avatar Aug 04 '17 23:08 SpareSimian

I just ran into this again today. I'll have to move the frame to a separate project with a different base ID value.

SpareSimian avatar Nov 12 '25 21:11 SpareSimian