[Openroad-users] FW: Re: BufferText

Laverty, Danny Danny.Laverty at falkirk.gov.uk
Wed Mar 12 22:12:53 EST 2008


I found this an interesting and potentially useful feature - I wanted to use it to let our users know how many characters they still had left when entering data into certain text fields.  It works perfectly if only alphanumeric characters are used but I hit a bug where the number of characters used (and, therefore, the number of characters left) is incorrect if the Return key (HC_NEWLINE) is used - something our users do regularly as they format many of their text fields to show paragraphs.  My intended workaround is to use "traffic lights" rather than numbers, but I would prefer to combine both.

If you are thinking of using similar functionality, the bug has been raised under Issue 126468 and a fix will be forthcoming in due course.

Danny


________________________________
From: openroad-users-bounces at peerlessit.com [mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Gary Hansford
Sent: 06 February 2008 09:00
To: International OpenROAD Users
Subject: Re: [Openroad-users] BufferText


Andrew,

To speed things up - you could also remove the fieldobject creation / destruction in the event block and instead use the trigger field and string object.

e.g: -

ON BUFFERCHANGED comments =

DECLARE

ENDDECLARE

BEGIN

    tally = EntryField(CurFrame.TriggerField).BufferString.Length;

END

________________________________
From: openroad-users-bounces at peerlessit.com [mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Andrew
Sent: 05 February 2008 23:27
To: International OpenROAD Users
Subject: Re: [Openroad-users] BufferText
Hi Simon,

There is more work in using keypress.

BufferText is alot easier and now with using On BufferChanged its great.

ON BUFFERCHANGED comments =
declare
    fo = FieldObject;
{
    fo = Field(comments);
    tally = Length(EntryField(fo).BufferText);
}

Regards,
Andrew.

Simon Lovell wrote:

What about the KeyPress event?  Would that be any better?



Greenstein, Stacey - ES/EW wrote:





I believe that KEYDOWN fires before the character is added to or

removed from the buffertext. You could check what key was pressed and

add 1 if the key wasn't backspace or delete, and subtract 2 if

backspace or delete was pressed. Too bad there is no KEYUP event,

which is what you really want... an event that fires after the buffer

is changed.



*Stacey Greenstein

*Member of Technical Staff

ITT Electronic Systems

Electronic Warfare Systems

MS 63850

77 River Road

Clifton NJ 07014-2099

Phone: (973) 284-2707

Fax: (973) 284-3947

stacey.greenstein at itt.com<mailto:stacey.greenstein at itt.com>





------------------------------------------------------------------------

*From:* openroad-users-bounces at peerlessit.com<mailto:openroad-users-bounces at peerlessit.com>

[mailto:openroad-users-bounces at peerlessit.com] *On Behalf Of *Andrew

*Sent:* Tuesday, February 05, 2008 9:51 AM

*To:* International OpenROAD Users

*Subject:* [Openroad-users] BufferText



Hi All,



OR4.1 on WinXp.



Anyone out there displaying a tally or character count of a multiline

entryfield as a user types?



I have tried using buffertext but when the user starts typing the

length of the buffertext is one less than what is displayed.



If the user backspaces once then the count goes up by one. If

backspaces again then the count goes down by one, but the count does

not represent the actual number of characters displayed in the field.



My field event look like this:



ON KEYDOWN comments =

declare

    fldobj = fieldobject;

{

    fldobj = field(comments);

    tally = length(EntryField(fldobj).BufferText);

}



I have also tried BufferString but get the same behaviour.

My comments field is a varchar(2000).



Any help would be greatly appreciated.



Regards,

Andrew.

E-Mail Notice and disclaimer.

This e-mail (including any attachment) is intended for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, or the person responsible for delivering the message to the named addressee, please notify us immediately.
Every effort has been made to ensure that this e mail and any attachment is free from viruses but we give no warranty to that effect and can accept no responsibility for any losses resulting from infected e-mail. The internet cannot guarantee the integrity of this message. Indesit Company UK Ltd (and its subsidiaries) shall not be liable for the message if modified. Please note that any views expressed in this e-mail may be those of the author and do not necessarily reflect those of this organisation.
Indesit Company UK Limited
Registered Office: Morley Way, Peterborough, PE2 9JB.
Company Number 106725. EEE Reg. Number WEE/DH0057TS

________________________________


*********************************************************************************************
The information contained in this e-mail is confidential and is intended only for the named recipient(s). If you are not the intended recipient, you must not copy, distribute or take any action or reliance on it. If you have received this e-mail in error, please notify the sender. Any unauthorised disclosure of the information contained in this e-mail is strictly prohibited.

The views and opinions expressed in this e-mail are the senders own and do not necessarily represent the views and opinions of Falkirk Council.
*********************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080312/95fc8e23/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001
Url: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080312/95fc8e23/attachment.pl 


More information about the Openroad-users mailing list