[Gambas-user] help with inherits using serial port

PICCORO McKAY Lenz mckaygerhard at gmail.com
Thu Aug 2 20:56:40 CEST 2018


a ok thanks for clarify jussi now i understand an i guess many others, but
i also taking about that now with tobias recommendation i have a almost
working printer manager

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

2018-08-02 14:43 GMT-04:00 Jussi Lahtinen <jussi.lahtinen at gmail.com>:

> You did not understand the answer Lee gave to you. It does use the event,
> it's File_Read. In your case the read event is SComm_Read, because you
> named so.
> Very basics of events.
>
>
> Jussi
>
> On Thu, Aug 2, 2018 at 7:07 PM, PICCORO McKAY Lenz <mckaygerhard at gmail.com
> > wrote:
>
>> 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 ]----
>>>
>>
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>>
>
>
> ----[ 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/1dd84ed5/attachment-0001.html>


More information about the User mailing list