Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS Comm experts
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00614817
Message ID:
00617402
Views:
34
First, the last thing you should be doing is THISFORM.buffer = "". Try something like this instead:
if this.commevent = 2
   thisform.buffer = thisform.buffer + this.input
   * Assuming a CR at the end of the scan
   IF CHR(13)$THISFORM.inbuffer
       lnscansize = AT(CHR(13),THISFORM.inbuffer)
       * extract scan
       lcmydesiredscan = SUBSTR(THISFORM.inbuffer,1,lnscansize)
       *delete scan
       THISFORM.inbuffer = SUBSTR(THISFORM.inbuffer,lnscansize+1)
   ENDIF
or something similar. This leaves the .inbuffer intact in the case there are multiple scans in the buffer.


>I am still trying to figure out what is going on here. In the OnComm method I have
>
>if this.commevent = 2
>   thisform.buffer = ""
>   thisform.buffer = this.input
>...
>
>
>Then when I debug the first time it is fine. The second time it looks like it adds the input to the previous input but it is truncated. Not 2 complete data scans. What do I need to do to reset this object?
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform