Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #8276
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.swapon.de!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | "Willie Moore" <williem@wmconsulting.com> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Translate code from C# to Vulcab |
| Date | Tue, 14 Jul 2015 15:36:18 -0500 |
| Organization | Aioe.org NNTP Server |
| Lines | 51 |
| Message-ID | <mo3rs2$3qq$1@speranza.aioe.org> (permalink) |
| References | <67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com> |
| NNTP-Posting-Host | TaQOZCgRZe/VI2dEhTDEAg.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="iso-8859-1"; reply-type=original |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| X-MimeOLE | Produced By Microsoft MimeOLE V15.4.3555.308 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| X-Newsreader | Microsoft Windows Live Mail 15.4.3555.308 |
| Importance | Normal |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com comp.lang.clipper.visual-objects:8276 |
Show key headers only | View raw
Gary,
You will need a delegate. You also need it from c# but it creates it behind
the scene. If you use reflector you will see the additional code. I will see
if I can put together a small sample of setting up the event and calling it
from Vulcan. It will give you a good idea of how to translate your code.
Regards,
Willie
Vulcan VIP
Grafx Development Team
"Gary" wrote in message
news:67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com...
I have some C# code I am having a difficult time translating to Vulcan.Net
// Inside a class (spManager - serial port manager)
public event EventHandler<SerialDataEventArgs> NewSerialDataRecieved;
// Inside an event handler:
NewSerialDataRecieved(this, new SerialDataEventArgs(data))
// An additional class
public class SerialDataEventArgs : EventArgs
{
public SerialDataEventArgs(byte[] dataInByteArray)
{
Data = dataInByteArray;
}
}
// Instantiate spManager class
mySPManager = new SPManager();
mySPManager.NewSerialDataRecieved += new
EventHandler<SerialDataEventArgs>(mySPManagerNewSerialDataRecieved);
// Process data received from the com port
PRIVATE METHOD mySerialPortDataReceived( sender AS System.Object, e AS
SerialDataReceivedEventArgs ) AS System.Void
I am having a difficult time understanding and translating the
<SerialDataEventArgs> when the event is defined and when the event handler
is assigned. Do I need to use a delegate?
Any help would be greatly appreciated.
Thanks
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Translate code from C# to Vulcab Gary <gkeefe109@gmail.com> - 2015-07-10 06:52 -0700
Re: Translate code from C# to Vulcab D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-07-13 12:53 +0200
Re: Translate code from C# to Vulcab "Willie Moore" <williem@wmconsulting.com> - 2015-07-14 15:36 -0500
Re: Translate code from C# to Vulcab "Willie Moore" <williem@wmconsulting.com> - 2015-07-15 11:35 -0500
Re: Translate code from C# to Vulcab Gary <gkeefe109@gmail.com> - 2015-07-18 07:30 -0700
Re: Translate code from C# to Vulcab "Willie Moore" <williem@wmconsulting.com> - 2015-07-22 08:22 -0500
Re: Translate code from C# to Vulcab Gary <gkeefe109@gmail.com> - 2015-07-23 19:21 -0700
csiph-web