Re: TreeView::append_column_numeric() format?
- From: Murray Cumming <murrayc murrayc com>
- To: Carl Nygard <cjnygard fast net>
- Cc: pks timing com, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: TreeView::append_column_numeric() format?
- Date: Mon, 06 Dec 2004 23:27:40 +0100
On Mon, 2004-12-06 at 16:48 -0500, Carl Nygard wrote:
> On Mon, 2004-12-06 at 13:52, Murray Cumming wrote:
> > On Tue, 2004-11-23 at 10:23 +0100, Murray Cumming wrote:
>
> > > I think I'll allow a sprintf-style format string,
> >
> > I've done that now, in gtkmm 2.5. When parsing data in editable cells,
> > it only understand decimal numbers, but I don't think that's a huge
> > disadvantage.
> >
> > I'd welcome any criticism.
>
> The problem with relying on purely sprintf-style formatting is you're
> missing the localization provided by the streams classes (unless *I'm*
> missing something).
Yes, the streams classes seem to be better at parsing times and dates. I
use them in Glom. But
1. I think that localization with sprintf()-formatting works OK. It
works for C, for instance. Do you have an example of what doesn't work.
2. We don't handle date and time types yet. That's another issue.
> And if you want to parse the numbers, again streams would be the logical
> choice in C++.
>
> That's why I was suggesting something akin to the lexical_cast<>
> templates I have available. They are easily extensible to include input
> as well as output, so would provide a natural bridge between text
> representation and float/complex/etc. data values, and even extend to
> other data types like dates, money, etc.
Maybe you've shown me a simple example of how method would look, but I
can't find it now.
> I use something similar in the libsimple/libgtklink libraries (also
> available, I believe) which provide simplified interface/link between
> data vars and widgets. In particular, I have a translation class used
> with the entry fields to provide translation to/from the Gtk::Text
> widget.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]