comp.lang.ada
 help / color / mirror / Atom feed
From: "Alexander S. Mentis" <foo@invalid.invalid>
Subject: Re: Contents of JEWL Editbox not consistent
Date: Thu, 28 Oct 2010 21:42:36 +0000 (UTC)
Date: 2010-10-28T21:42:36+00:00	[thread overview]
Message-ID: <iacqob$c2k$1@news.eternal-september.org> (raw)
In-Reply-To: 2849fcf3-d0e6-4226-83f5-c4a7defb4370@v16g2000yqn.googlegroups.com

tolkamp wrote:

> In my application the selected file name  is written in an Editbox.
> When an new (second) file name is selected this is also displayed in
> the Editbox.
> When the contents of this Editbox have to be edited, first the mouse
> pointer have to be placed in the Editbox, by doing this the original
> (first) file name again is coming back in the Editbox. Why remains the
> second file name not displayed?

As has been pointed out, a small chunk of code that demonstrates the
problem you are asking about is usually helpful, so all of the below is
just a shot in the dark.

Full disclosure: I haven't actually ever used JEWL, having just heard
about it recently on this forum, but I did read the documentation
today.  I'm looking forward to tinkering with it.

Anyway, in the JEWL.Windows user manual, section 1.3, there's a line
that says "Note that if the Set_Rate button is pressed again, the value
that was entered into the edit box will still be there unless it has
been explicitly altered by the program."

In your post, you don't say how the second filename is being put into
the Editbox.  I think you have two options: using Set_Text or letting
the user change it interactively.  I assume using Set_Text is what the
note in sec. 1.3 means by "explicitly altered," so I further assume
that your problem is that the user is manually editing the Editbox, but
you never take that newly-entered text and assign it to the variable
that holds the state of the Editbox string.

In this case, it looks like the Modified(Editbox) subprogram described
in section 4.1.3 might be helpful.  Use that to detect when the user
has fiddled with the string manually, use Get_Text to get the modified
string, and then give the gotten string to Set_Text to explicitly
update the Editbox string.

And if this is completely wrong, please see the disclaimer in paragraph
2 and post some example code. :-)

Alex




      parent reply	other threads:[~2010-10-28 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28 19:37 Contents of JEWL Editbox not consistent tolkamp
2010-10-28 20:26 ` Yannick Duchêne (Hibou57)
2010-10-29  9:23   ` tolkamp
2010-10-28 21:42 ` Alexander S. Mentis [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox