[Gambas-user] help with inherits using serial port

PICCORO McKAY Lenz mckaygerhard at gmail.com
Thu Aug 2 18:07:16 CEST 2018


umm if you opend the attached i send in first mail noted that i do as you
cited with file example, so then seems i not explained very well, i taking
about tobias said : "declare the event name "SComm" but  don't use it at
all"

so if your example citation does not use the event name so what it's the
point, i taking about usage of event name!

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2018-08-02 11:25 GMT-04:00 T Lee Davidson <t.lee.davidson at gmail.com>:

> On 08/01/2018 01:21 PM, PICCORO McKAY Lenz wrote:
> >     next issue that I can spot is that you declare the event name
> "SComm" but
> >     don't use it at all to intercept events. No wonder you don't get any.
> >
> > *please that parti, i need more clear ideas of them, but the english
> language are a barrier
> > *
> > *a kind of more "example for dummies" can be in that point?*
>
> There is a simple example at http://gambaswiki.org/wiki/lang/open:
>
> [code]
> ' Watching a serial port
>
> Dim hFile As File
>
> hFile = Open "/dev/ttyS0" For Read Write Watch
>
> ...
>
> Public Sub File_Read()
>
>   Dim iByte As Byte
>
>   Read #hFile, iByte
>   Print "Got one byte: "; iByte
>
> End
> [/code]
>
> It does not give the hFile object a custom name as you do with: SComm =
> New SerialPort As "SComm"
>
> So, event management uses "File" as its name, and its Read event is
> handled with the File_Read() subroutine.
>
> See also: http://gambaswiki.org/wiki/lang/eventdecl
>
>
> ___
> Lee
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180802/75ff00c8/attachment.html>


More information about the User mailing list