Re: [nsbasic-ce] Questions about event processing

2011-03-03 Thread George Henne
I think you'll need to watch for the change event on the TextBox (I have
not tried this) and wait for the last character to be lineFeed. You can
then do the lookup and SetFocus on the next field.

George Henne 
NS BASIC Corporation
http://www.nsbasic.com 

>Hi,
>I have a Form with a number of fields.   The purpose of the form is to
>capture barcodes (via a barcode scanner), display some pertinent
>information, and then allow the user to place an order for the given barcode.
>
>The application is working correctly, but there are a few problems with
>usability.
>
>1)  How do I process the ENTER key/Line feed.  Let me explain.   I can
>configure the barcode scanner to issue a line feed after a barcode is
>properly read.   However, this doesn't seem to trigger a move to the
>next textbox control.  I placed the code to lookup the barcode and
>display the information on the "LostFocus" event for the barcode.
>
>Right now to trigger the "lostfocus" event for the barcode, I have to
>click somewhere on the Form.   Otherwise it will just stay there.
>
>Probably I'm missing something simple on how to process the LineFeed.  
>
>
>2)  I have a small glitch also on the code to close the form.  The way
>this works right now is that if no barcode is entered, and the user
>presses the OK button, the form will just close.  This works fine...  
>However, if the user enters a non-existant barcode, a warning MsgBox
>appears.  The barcode is then cleared to allow entering a new barcode.  
>If the user presses the OK button at this time, the Form should close
>since no barcode was entered  HOWEVER, the FORM is not closed.   I
>only get focus transfered to the OK button... I have to press OK a
>second time for it to close the form.
>
>It is really weird.   In both cases, the barcode textbox's LostFocus
>triggers.  But in the second case the Click event on the OK button does
>not trigger...  It is as if the CLICK event was being cleared somehow.
>
>Has anyone experienced something like that?  
>
>Thanks,
>Edgard
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



Re: [nsbasic-ce] Which control has focus and which will receive focus

2011-03-03 Thread George Henne
NS Basic/CE does not have the concept of ordering the focus of objects.

>Hi,
>
>On a given form is it possible to know which control was the last
>control with focus, and/or which control will receive focus next?
>
>Take for example a textbox "TextBox1" on whose "LostFocus" event a
>routine runs.   If that routine changes any other textbox's text
>properties, a number of event Changed get triggered.However the last
>control with the focus WAS "TextBox1".In a similar way, what is the
>control that will ultimately receive focus?
>
>Any ideas on this?
>
>Thanks,
>Edgard
>
>
>
>
>
>Yahoo! Groups Links
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



Re: [nsbasic-ce] Re: Is there a problem with the FileStream CopyFile method?

2011-03-03 Thread George Henne
Last time, I asked this question:

>> What is in pIniFileName?

>Hi George,
>
>I modified the example project "FileIO.nsb" adding a button to copy the
>working text file.
>
>I just added a button on the form, and on the event "click" I added the
>following:
>
>Sub CopyButton_Click
>   MsgBox TypeName(fs) & ", " & fileName & ", " & fileName2
>   
>   If Not fs.fileExists(FileName) Then
>  txtMsg.text = "File does not exists" & vbCrLf & txtMsg.text
>   Else
>  fs.CopyFile fileName,filename2
>  txtMsg.text = "File copied" & vbCrLf & txtMsg.text
>   End If
>End Sub
>
>
>Simply add the button and code to FileIO.nsb (or I can send the modified
>one), press the buttons to create the file, and press the button to add
>1000 records.Then try to copy the file.   
>
>After the MsgBox I get the reported error.
>
>The MsgBox returns:
>  ISFMain, MyFile.txt, MyFile2.txt
> 
>
>Right now I'm working around it by using Microsoft's File object to
>copy.   However it would be nice to fix this problem.
>
>Best regards,
>Edgard
>
>
>
>--- In nsbasic-ce@yahoogroups.com, "George Henne"  wrote:
>>
>> OK, so the object is being created properly.
>> 
>> What is in pIniFileName?
>> 
>> >It returns "ISFMain"
>> >
>> >
>> >--- In nsbasic-ce@yahoogroups.com, "George Henne"  wrote:
>> >>
>> >> What happens if you do MsgBox TypeName(FS)?
>> >> 
>> >> Let's see if the object is created properly.
>> >> 
>> >> >Hi George,
>> >> >
>> >> >Thanks for looking into this.
>> >> >
>> >> >I've tried various ways and I always get the error.
>> >> >
>> >> >I also changed FileIO.nsb by adding another button to use "CopyFile",
>> >> >and I get the same error there.
>> >> >
>> >> >Let me know if you want the FileIO.nsb so you can test it.
>> >> >
>> >> >Best regards,
>> >> >Edgard
>> >> >
>> >> >--- In nsbasic-ce@yahoogroups.com, "George Henne"  wrote:
>> >> >>
>> >> >> Is the file "tmp.ini" present in root (\)? You need to give full
>> >> >> pathnames to files in Windows CE.
>> >> >> 
>> >> >> >Hi,
>> >> >> >
>> >> >> >I'm trying to copy a text file from the device to the storage
card.  
>> >> >> >The line of code is:
>> >> >> >
>> >> >> >   FS.CopyFile "tmp.ini",pIniFileName,1
>> >> >> >
>> >> >> >I'm getting the following error:
>> >> >> >
>> >> >> >Microsoft VBScript runtime error - line 1198, char 3
>> >> >> >File name of class name not found during Automation operation
>> >> >> >
>> >> >> >
>> >> >> >I know the FileStream object is working because I previously
>use other
>> >> >> >methods... for example I create the "tmp.ini" file with it:
>> >> >> >
>> >> >> >   Set tmpFile = FS.CreateFile("tmp.ini")
>> >> >> >
>> >> >> >And this code is working.
>> >> >> >
>> >> >> >I have NSBasic 8.2.0a on the desktop.   On the device NSBasic
reports
>> >> >> >being version 8.0.0 on the device's nsbasic editor "About
NSBasic/CE"
>> >> >> >menu option.   I doubt this has anything to do with the "CopyFile"
>> >> >> >problem, but I thought I'd mention it just in case.
>> >> >> >
>> >> >> >Thanks,
>> >> >> >Edgard
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >Yahoo! Groups Links
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >Yahoo! Groups Links
>> >> >
>> >> >
>> >> >
>> >>
>> >
>> >
>> >
>> >
>> >
>> >
>> >Yahoo! Groups Links
>> >
>> >
>> >
>>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



Re: [nsbasic-ce] Which control has focus and which will receive focus

2011-03-03 Thread Woody & Yuni Ho
What about tab order?


Woody wizard at large(I'm in shape. Round is a shape)
Connected by MOTOBLURâ„¢ on T-Mobile

-Original message-
From: George Henne 
To: "nsbasic-ce@yahoogroups.com" 
Sent: Thu, Mar 3, 2011 05:56:12 PST
Subject: Re: [nsbasic-ce] Which control has focus and which will receive focus

NS Basic/CE does not have the concept of ordering the focus of objects.

>Hi,
>
>On a given form is it possible to know which control was the last
>control with focus, and/or which control will receive focus next?
>
>Take for example a textbox "TextBox1" on whose "LostFocus" event a
>routine runs.   If that routine changes any other textbox's text
>properties, a number of event Changed get triggered.However the last
>control with the focus WAS "TextBox1".In a similar way, what is the
>control that will ultimately receive focus?
>
>Any ideas on this?
>
>Thanks,
>Edgard
>
>
>
>
>
>Yahoo! Groups Links
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



Re(2): [nsbasic-ce] Which control has focus and which will receive focus

2011-03-03 Thread George Henne
Sorry - no such thing.

The original Windows Mobile specification was very strict. No keyboard,
no tab keys, therefore no tab order.
>
>
>What about tab order?
>
>
>Woody wizard at large(I'm in shape. Round is a shape)
>Connected by MOTOBLUR(TM) on T-Mobile
>
>-Original message-
>From: George Henne 
>To: "nsbasic-ce@yahoogroups.com" 
>Sent: Thu, Mar 3, 2011 05:56:12 PST
>Subject: Re: [nsbasic-ce] Which control has focus and which will
receive focus
>
>NS Basic/CE does not have the concept of ordering the focus of objects.
>
>>Hi,
>>
>>On a given form is it possible to know which control was the last
>>control with focus, and/or which control will receive focus next?
>>
>>Take for example a textbox "TextBox1" on whose "LostFocus" event a
>>routine runs. If that routine changes any other textbox's text
>>properties, a number of event Changed get triggered. However the last
>>control with the focus WAS "TextBox1". In a similar way, what is the
>>control that will ultimately receive focus?
>>
>>Any ideas on this?
>>
>>Thanks,
>>Edgard
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



Re: Re(2): [nsbasic-ce] Which control has focus and which will receive focus

2011-03-03 Thread Woody & Yuni Ho
Ahh makes sense since its mobile. No mouse etc...


Woody wizard at large(I'm in shape. Round is a shape)
Connected by MOTOBLURâ„¢ on T-Mobile

-Original message-
From: George Henne 
To: "nsbasic-ce@yahoogroups.com" 
Sent: Thu, Mar 3, 2011 07:15:16 PST
Subject: Re(2): [nsbasic-ce] Which control has focus and which will receive 
focus

Sorry - no such thing.

The original Windows Mobile specification was very strict. No keyboard,
no tab keys, therefore no tab order.
>
>
>What about tab order?
>
>
>Woody wizard at large(I'm in shape. Round is a shape)
>Connected by MOTOBLUR(TM) on T-Mobile
>
>-Original message-
>From: George Henne 
>To: "nsbasic-ce@yahoogroups.com" 
>Sent: Thu, Mar 3, 2011 05:56:12 PST
>Subject: Re: [nsbasic-ce] Which control has focus and which will
receive focus
>
>NS Basic/CE does not have the concept of ordering the focus of objects.
>
>>Hi,
>>
>>On a given form is it possible to know which control was the last
>>control with focus, and/or which control will receive focus next?
>>
>>Take for example a textbox "TextBox1" on whose "LostFocus" event a
>>routine runs. If that routine changes any other textbox's text
>>properties, a number of event Changed get triggered. However the last
>>control with the focus WAS "TextBox1". In a similar way, what is the
>>control that will ultimately receive focus?
>>
>>Any ideas on this?
>>
>>Thanks,
>>Edgard
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.