RE: [gnomemm] How to use persistent history with GnomeEntry?



On Fri, 2003-10-17 at 11:41, Christopher Smith wrote:
> On Fri, 2003-10-17 at 05:20, Murray Cumming Comneon com wrote:
> > > From: Christopher Smith [mailto:x xman org] 
> > > So, I've been experimenting a tad with gnomemm, so forgive me 
> > > if I ask a silly question.
> > > 
> > > It looks to me like there isn't an obvious way to use 
> > > GnomeEntry's "persistent history" feature.
> > 
> > What "persistent history" feature? I don't see anything here:
> > http://developer.gnome.org/doc/API/2.0/libgnomeui/gnomeentry.html
> 
> Admittedly, it's not terribly well documented, but I'm sure that's not
> new for anyone. ;-)

I found somewhat better docs:

http://lidn.sourceforge.net/books/libgnomeui/book/gnomeentry.html

> > You're probably the only person who has tried it. I'm not sure what
> > GnomeEntry is supposed to do, but if you have an example or test case then
> > maybe we could investigate for you. It would be nice to compare it to the
> > same thing in C.
> 
> Ugh, I detest writing in C. ;-) Well, if I get some time in the next day
> or so to deal with this, I'll either write a patch or a sample in C. I'm
> happy to fix this problem myself, I just didn't want to be worrying
> about this in a case where I just wasn't using the API correctly.

As per request, here's a code sample that demonstrates the
functionality. It doesn't do much, so to "get it", you have to follow
these steps:

1) build the code
2) run the code
3) type in something into the entry widget
4) check the widget history.... notice there is nothing in the history
5) *press enter*
6) check the widget history.... notice what you typed is now in the
history.
7) close the app
8) run the code
9) check the widget history.... notice that it contains what you typed
in the last time you ran

I'll see if I can come up with a patch myself based on this.

-- 
Christopher Smith <x xman org>

Attachment: entry_demo.tar.gz
Description: application/compressed-tar



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