1. onKeyPress()

Rob, and Jonas, in reading your responses there is a concern I have from
both of your approaches, namely that every time a select_table() is
performed the entire file has to be read. This wouldn't  seem to support any
substantial software application. The 22 files I've mentioned for an 'order
entry' program represent 20-100Mbytes of data, when you consider 3-5k
customers, 50k inventory, 2+ stocking locations... etc. Jonas, if this is
happening on your file server just to retreive one record from several
files, I don't see how it could support multiple users. The server would be
scanning the same files front to end over and over...

new topic     » topic index » view message » categorize

2. onKeyPress()

I've had to leave for a couple of days (mandatory appearance at a
mother-in-law weekend event)...but I took my computer so all was not a loss.
I've run into several items

1. I'm trapping all keystrokes now to handle but when the 'esc' or 'return'
key is pressed, i receive the keystroke but windows 'beeps'. Why is this and
how to get rid of it? (on my office computer it 'clicks a sound' and on my
win2000me laptop i get a loud 'bell')

2. Are there any windows editText data types like date, numeric etc where
windows will edit or use a print mask to display what is typed. (i.e. I
would like to type in for a date 80601 and have displayed 8/06/01, for $
amounts to always display 5.5 as 5.50)

3. If I am in data entry mode on the screen and change to another windows
task and then return to the screen, windows starts the data entry at the
beginning of the fields, not where I left off. Why is this and do I have to
know I was switched out and set the focus when I return?

...george

new topic     » goto parent     » topic index » view message » categorize

3. Re: onKeyPress()

I think all your points are good. I read from Rob's response that changing
tables does in fact scan the entire file pulling 4 bites from each record...
Here's a clip from his message dtd 8/6/01

db_select_table() reads
in 4 bytes per record from the table

Hopefully I am wrong on this...

..george

----- Original Message -----
From: "Jonas Temple" <jktemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, August 06, 2001 11:42 AM
Subject: RE: onKeyPress()


>
> George,
>
> See my replies in the body of the e-mail:
>
> George Walters wrote:
> > Rob, and Jonas, in reading your responses there is a concern I have from
> > both of your approaches, namely that every time a select_table() is
> > performed the entire file has to be read.
>
> I don't THINK the entire table has to be read on a select_table.  I say
> THINK because I can't be 100% sure about that.  Rob, could you clarify?
>
> > This wouldn't  seem to support any
> > substantial software application. The 22 files I've mentioned for an
> > 'order
> > entry' program represent 20-100Mbytes of data, when you consider 3-5k
> > customers, 50k inventory, 2+ stocking locations... etc. Jonas, if this
> > is
> > happening on your file server just to retreive one record from several
> > files, I don't see how it could support multiple users. The server would
> > be
> > scanning the same files front to end over and over...
>
> The server does support multiple users.   I have been seeing decent
> response times in data retrieval and I have in mind a couple of
> enhancements to speed up the retrieval process.
>
> That being stated let me also say that EDS is a simple database.  It
> certainly cannot (at this point) compete with commercial databases
> (SQLServer, Oracle, DB/2, Access, etc.).  Not that I want to discourage
> you from using EDS/Net but if you're doing a major development as you're
> describing you might want to look at other alternatives (you might want
> to also look at Matt Lewis' ODBC library in the archive).  And I suggest
> looking at alternatives for one major reason...EDS does not support
> indexes.  If you're creating customer and product databases you will
> certainly want to provide searches over those databases (my name,
> address, product description, etc) and unfortunately EDS just cannot do
> that at this time (I have printed database.e and have decided to just do
> it myself...if I only had the time).
>
> If you're still serious about it I can send you privately a VERY simple
> order entry app I'm working on.  It uses EDS/Net and it will support
> multiple users.  Just let me know.
>
> I think you're discovering what I did about Euphoria...you can generate
> business apps relatively quickly and be able to support those apps down
> the line.  And it won't crash your system!
>
> Good luck.
>
> Jonas
> >
> >
> >
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: onKeyPress()

George wrote:

> 1. I'm trapping all keystrokes now to handle but when the 'esc' or
'return'
> key is pressed, i receive the keystroke but windows 'beeps'. Why is this
and
> how to get rid of it? (on my office computer it 'clicks a sound' and on my
> win2000me laptop i get a loud 'bell')

Geez, George, first you ask how to make a beep, now you want to turn it off!
:)
I quote from the master:

Date:         Fri, 14 Jan 2000 13:58:48 -0800
From:         "Cuny, David at DSS" <David.Cuny at DSS.CA.GOV>
Subject:      Re: Removing BEEP's?

MiCkeY wrote:

> Does anybody here know how can I remove this beep?

Change the code to :

   if key=13 then

      -- change the focus
      setFocus(EAddress)

      -- prevent default processing
      returnValue( True )

   end if

Basically, Win32Lib allows you to take action, and then hands the control
back to Windows to allow the program to continue with the default
processing. You can prevent this by setting the returnValue to True. This
informs Win32Lib that you've taken action, and *not* to perform any more
processing.

-- David Cuny


> 2. Are there any windows editText data types like date, numeric etc where
> windows will edit or use a print mask to display what is typed. (i.e. I
> would like to type in for a date 80601 and have displayed 8/06/01, for $
> amounts to always display 5.5 as 5.50)

> 3. If I am in data entry mode on the screen and change to another windows
> task and then return to the screen, windows starts the data entry at the
> beginning of the fields, not where I left off. Why is this and do I have
to
> know I was switched out and set the focus when I return?

I'm guessing that if you saved the currently focussed control in the
onLostFocus event
handler, and then restored focus to that control in the onGotFocus event,
that would
take care of the problem.

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

5. Re: onKeyPress()

Jonas, I would like to look at your OE program. There's a lot of EU stuff I
need to learn... on stability of EU i'll agree also at this point. I've not
run into anything that does not work correctly...although sometimes i can't
figure out what I did wrong...It won't let you get away with anything!!

..george

----- Original Message -----
From: "Jonas Temple" <jktemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Subject: RE: onKeyPress()


>
> George,
>
> See my replies in the body of the e-mail:
>
> George Walters wrote:
> > Rob, and Jonas, in reading your responses there is a concern I have from
> > both of your approaches, namely that every time a select_table() is
> > performed the entire file has to be read.
>
> I don't THINK the entire table has to be read on a select_table.  I say
> THINK because I can't be 100% sure about that.  Rob, could you clarify?
>
> > This wouldn't  seem to support any
> > substantial software application. The 22 files I've mentioned for an
> > 'order
> > entry' program represent 20-100Mbytes of data, when you consider 3-5k
> > customers, 50k inventory, 2+ stocking locations... etc. Jonas, if this
> > is
> > happening on your file server just to retreive one record from several
> > files, I don't see how it could support multiple users. The server would
> > be
> > scanning the same files front to end over and over...
>
> The server does support multiple users.   I have been seeing decent
> response times in data retrieval and I have in mind a couple of
> enhancements to speed up the retrieval process.
>
> That being stated let me also say that EDS is a simple database.  It
> certainly cannot (at this point) compete with commercial databases
> (SQLServer, Oracle, DB/2, Access, etc.).  Not that I want to discourage
> you from using EDS/Net but if you're doing a major development as you're
> describing you might want to look at other alternatives (you might want
> to also look at Matt Lewis' ODBC library in the archive).  And I suggest
> looking at alternatives for one major reason...EDS does not support
> indexes.  If you're creating customer and product databases you will
> certainly want to provide searches over those databases (my name,
> address, product description, etc) and unfortunately EDS just cannot do
> that at this time (I have printed database.e and have decided to just do
> it myself...if I only had the time).
>
> If you're still serious about it I can send you privately a VERY simple
> order entry app I'm working on.  It uses EDS/Net and it will support
> multiple users.  Just let me know.
>
> I think you're discovering what I did about Euphoria...you can generate
> business apps relatively quickly and be able to support those apps down
> the line.  And it won't crash your system!
>
> Good luck.
>
> Jonas
> >
> >
> >
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: onKeyPress()

George Walters writes:
> I read from Rob's response that changing
> tables does in fact scan the entire file 
> pulling 4 bites from each record...

EDS does not scan the entire file, or
even the entire table.

If your table has 1000 records (of any size), 
db_select_table() will read in 1000 pointers 
to those records on disk. This is 4000 bytes
of data split into a number of contiguous blocks.
EDS tries to maintain, very roughly, sqrt(number of records)
pointers per block, e.g. roughly 32 blocks of 32 pointers (128 bytes)
per block, but it can vary a lot, depending on deletions etc.
EDS seeks directly to the start of each block and starts 
reading it. There is no "scanning" or searching of the file.

I doubt that this is going to slow you down enough 
for the user of your program to notice. It might be
a problem if you are doing a massive operation
over the whole database, selecting tables millions of times.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

7. Re: onKeyPress()

OK, that's a lot more than I probably needed to know..I certainly got the
wrong idea in my head somehow...So we shoudn't have to worry about changing
tables or DB's...

thanks Rob

...george


----- Original Message -----
From: "Robert Craig" <rds at RapidEuphoria.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: onKeyPress()


>
> George Walters writes:
> > I read from Rob's response that changing
> > tables does in fact scan the entire file
> > pulling 4 bites from each record...
>
> EDS does not scan the entire file, or
> even the entire table.
>
> If your table has 1000 records (of any size),
> db_select_table() will read in 1000 pointers
> to those records on disk. This is 4000 bytes
> of data split into a number of contiguous blocks.
> EDS tries to maintain, very roughly, sqrt(number of records)
> pointers per block, e.g. roughly 32 blocks of 32 pointers (128 bytes)
> per block, but it can vary a lot, depending on deletions etc.
> EDS seeks directly to the start of each block and starts
> reading it. There is no "scanning" or searching of the file.
>
> I doubt that this is going to slow you down enough
> for the user of your program to notice. It might be
> a problem if you are doing a massive operation
> over the whole database, selecting tables millions of times.
>
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    http://www.RapidEuphoria.com
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

8. Re: onKeyPress()

----- Original Message -----
From: "George Walters" <gwalters at sc.rr.com>
To: "EUforum" <EUforum at topica.com>
Subject: onKeyPress()


>
> I've had to leave for a couple of days (mandatory appearance at a
> mother-in-law weekend event)...but I took my computer so all was not a
loss.
> I've run into several items
>
> 1. I'm trapping all keystrokes now to handle but when the 'esc' or
'return'
> key is pressed, i receive the keystroke but windows 'beeps'. Why is this
and
> how to get rid of it? (on my office computer it 'clicks a sound' and on my
> win2000me laptop i get a loud 'bell')

According to the Win32Lib documentation for onKeyPress(), and I quote, ...
"
 If you want Windows to ignore the key, set the return value to -1.


 if find(keyCode,"0123456789") then
    returnValue(-1) -- ignore digits.
 end if
"

When you don't do this, Windows also uses the key that was pressed but if
the control that has focus can't use the key, it beeps/bells/clicks ..
whatever. However, there is also a mistake in v0.55x of the library in that
some Alt-Key combinations used to "press" buttons also beep because the
corresponding key-up event is not thrown away.


> 2. Are there any windows editText data types like date, numeric etc where
> windows will edit or use a print mask to display what is typed. (i.e. I
> would like to type in for a date 80601 and have displayed 8/06/01, for $
> amounts to always display 5.5 as 5.50)

>From memory, Windows API doesn't have any edit mask capabilities built in.
This means that you will have to do this yourself. You will need to decide
the best way to do this. The choices are generally ...

a) Trap every keystroke and only allow those that match the datatype and
format you want. To do this, you need to keep some context info in between
keystrokes to "know" where you are up to. You must take into consideration
things like backspace, delete, arrow keys etc....

b) Wait til the user has completed the field and examine what they entered
on the onLostFocus() event. If they put in something wrong you need to
either regain focus or make a note somewhere on screen so the user knows to
go back and fix it.

c) Ensure that the user cannot enter bad data in the first place. This is
only effective for "bounded data". That is, where the data has some bounds
that can be enforced. For dates, this usually means displaying a calendar
for them to choose a date rather than key in any old thing. For data that
has specific ranges, use a slider or spinner. For data that has a limited
number of possible choices (eg Days of the week), use a list or combo.


> 3. If I am in data entry mode on the screen and change to another windows
> task and then return to the screen, windows starts the data entry at the
> beginning of the fields, not where I left off. Why is this and do I have
to
> know I was switched out and set the focus when I return?

This is a mistake in Win32lib. I really must get around to fixing this one.
I've done some research and haven't yet tracked down why focus is
transferring back to the first item when the window regains focus.

-----
cheers
Derek Parnell.

new topic     » goto parent     » topic index » view message » categorize

9. onKeyPress()

The returnValue(-1) fixed the noise...thanks.

..george

new topic     » goto parent     » topic index » view message » categorize

10. Re: onKeyPress()

Derek, you mentioned


According to the Win32Lib documentation for onKeyPress(), and I quote, ...
"
 If you want Windows to ignore the key, set the return value to -1.


This is not in my documentation which I thought was current. Have I got the
wrong doc? I'm finding I need a lot more info than I currently have so I
don't have to ask so many question.

..george



----- Original Message -----
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, August 06, 2001 5:19 PM
Subject: Re: onKeyPress()


>
>
> ----- Original Message -----
> From: "George Walters" <gwalters at sc.rr.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Tuesday, August 07, 2001 1:20 AM
> Subject: onKeyPress()
>
>
> >
> > I've had to leave for a couple of days (mandatory appearance at a
> > mother-in-law weekend event)...but I took my computer so all was not a
> loss.
> > I've run into several items
> >
> > 1. I'm trapping all keystrokes now to handle but when the 'esc' or
> 'return'
> > key is pressed, i receive the keystroke but windows 'beeps'. Why is this
> and
> > how to get rid of it? (on my office computer it 'clicks a sound' and on
my
> > win2000me laptop i get a loud 'bell')
>
> According to the Win32Lib documentation for onKeyPress(), and I quote, ...
> "
>  If you want Windows to ignore the key, set the return value to -1.
>
>
>  if find(keyCode,"0123456789") then
>     returnValue(-1) -- ignore digits.
>  end if
> "
>
> When you don't do this, Windows also uses the key that was pressed but if
> the control that has focus can't use the key, it beeps/bells/clicks ..
> whatever. However, there is also a mistake in v0.55x of the library in
that
> some Alt-Key combinations used to "press" buttons also beep because the
> corresponding key-up event is not thrown away.
>
>
> > 2. Are there any windows editText data types like date, numeric etc
where
> > windows will edit or use a print mask to display what is typed. (i.e. I
> > would like to type in for a date 80601 and have displayed 8/06/01, for $
> > amounts to always display 5.5 as 5.50)
>
> >From memory, Windows API doesn't have any edit mask capabilities built
in.
> This means that you will have to do this yourself. You will need to decide
> the best way to do this. The choices are generally ...
>
> a) Trap every keystroke and only allow those that match the datatype and
> format you want. To do this, you need to keep some context info in between
> keystrokes to "know" where you are up to. You must take into consideration
> things like backspace, delete, arrow keys etc....
>
> b) Wait til the user has completed the field and examine what they entered
> on the onLostFocus() event. If they put in something wrong you need to
> either regain focus or make a note somewhere on screen so the user knows
to
> go back and fix it.
>
> c) Ensure that the user cannot enter bad data in the first place. This is
> only effective for "bounded data". That is, where the data has some bounds
> that can be enforced. For dates, this usually means displaying a calendar
> for them to choose a date rather than key in any old thing. For data that
> has specific ranges, use a slider or spinner. For data that has a limited
> number of possible choices (eg Days of the week), use a list or combo.
>
>
> > 3. If I am in data entry mode on the screen and change to another
windows
> > task and then return to the screen, windows starts the data entry at the
> > beginning of the fields, not where I left off. Why is this and do I have
> to
> > know I was switched out and set the focus when I return?
>
> This is a mistake in Win32lib. I really must get around to fixing this
one.
> I've done some research and haven't yet tracked down why focus is
> transferring back to the first item when the window regains focus.
>
> -----
> cheers
> Derek Parnell.
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu