Opened 5 years ago

Closed 4 years ago

#10988 closed defect (fixed)

wxDatePickerCtrlGeneric::SetFormat doesn't exist

Reported by: dconnet Owned by:
Priority: normal Milestone:
Component: GUI-all Version: 2.8.10
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

On systems that don't have a date picker (Mac) or where you set wxUSE_DATEPICKCTRL_GENERIC to 1 (Windows), the SetFormat api specified in the header file isn't implemented, resulting in a linker error.

Change History (4)

comment:1 Changed 5 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [61467]) removed wxDatePickerCtrlGeneric::SetFormat() which didn't exist but was declared and documented (closes #10988)

comment:2 Changed 5 years ago by vadz

I think the simplest solution is to just remove it completely -- if it it never existed in the first place, we don't break any code by doing it and why implement a function which only exists in the generic version. Let is just use the system date locale as the native control does.

comment:3 follow-up: Changed 4 years ago by andim2

  • Resolution fixed deleted
  • Status changed from closed to reopened

Guys, please give a warm welcome to our new ABI breakage ;-)

At least wx <= 2.6.4 _did_ have wxDatePickerCtrlGeneric::SetFormat() implemented in src/generic/datectlg.cpp,
and then someone came along and removed it without removing it in the header, resulting in the linker breakage discussed here.

So unless _all_ 2.6.x versions do have it and _all_ 2.8.x versions don't have it, we've got not only an API problem (existing source assumes it to be there) but also an ABI problem (older 2.8.x binaries which did use it successfully will croak on 2.8.10).
Thus I guess reopening this ticket is the correct thing to do.

Using wxGTK on this box.
Going to add a wxABI_VERSION check to my source. *sigh*

Thanks!

comment:4 in reply to: ↑ 3 Changed 4 years ago by vadz

  • Priority changed from critical to normal
  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to andim2:

At least wx <= 2.6.4 _did_ have wxDatePickerCtrlGeneric::SetFormat() implemented in src/generic/datectlg.cpp,
and then someone came along and removed it without removing it in the header, resulting in the linker breakage discussed here.

Yes, it was removed (apparently unintentionally) by r42241. But this was done before 2.8.0 (r44014) so there is no ABI breakage in 2.8 branch (even forgetting about the fact that nothing was changed in 2.8 branch anyhow, r61467 affected the trunk only).

Anyhow, unless someone really needs it (do you?) I don't plan to reintroduce it, this API is unimplementable in the native versions and doesn't seem useful anyhow, the control should use the users setting.

Note: See TracTickets for help on using tickets.