Page 1 of 1 1
Topic Options
#155578 - 2006-01-18 01:04 PM COM Event problem
peaps Offline
Fresh Scripter

Registered: 2005-04-12
Posts: 25
I am attempting to get KIX to run a mini telnet server using the COM control oswinsck.dll which is a freeware winsock wrapper control. However, I am not sure how I get Kix to respond to events such as OnConnect etc. I noticed in a previous post that Shawn said events are definately not supported. If this is true, how does Kixforms respond to things like button presses etc?

Many thanks,

Andy Peaple.

Top
#155579 - 2006-01-18 02:22 PM Re: COM Event problem
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Andy. Your right - Kixforms responds to Kixforms events. Kixforms does not respond to COM events. And Kixtart (the scripting language) does not respond to any events at all.

The COM object your dealing has to provide some "mechanism" that allows Kixtart to work with it - despite the fact that Kixtart doesn't support events. That is how Kixforms works (it serializes events through the DoEvents loop). I wrote Kixforms for Kixtart, and worked around its limitations.

What you have to do is study the documentation for the COM object your working with (winsock or whatever) and find an alternate way of working with it.

Top
#155580 - 2006-01-18 02:30 PM Re: COM Event problem
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I did some work on a socket COM object a long time ago - search the board for the KiXtart "socket" library if you are interested.

Basically, as you cannot handle events you need to poll the status' of the objects you are interested in. Alternatively, the object may present an event queue that you can query instead - if I've got the terminology correct the event queue might also be called a "sink".

Some objects unfortunately seem to require that events are handled. If this is the case with your object then you will not be able to script it with KiXtart.

Top
#155581 - 2006-01-18 02:41 PM Re: COM Event problem
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Found the old posts here

The KiXtart scripts are no longer available at the URLs in the post, so if you want them drop me a line and I'll email them to you.

They use the Catalyst winsock wrapper, so you'll need that or recode for your new object.

Finally, it's worth pointing out that KiXtart cannot handle all object types that your object supports. It has a *lot* of problems with binary data (byte arrays) so if this is how your object presents input and output you may have a hard time of it. Chr(0) is the character which has caused most problems when I've attempted network stuff.

Top
#155582 - 2006-01-18 02:54 PM Re: COM Event problem
peaps Offline
Fresh Scripter

Registered: 2005-04-12
Posts: 25
Thanks richard. I think I will look at this Catalyst winsock wrapper. All I am trying to do is make a basic text message application, so byte arrays won't be an issue for me. I understand that Kix has got its limitations, but its still pretty amazing how versatile it is for a logon script processor. I'll email you about those scripts too. Cheers.
Top
#155583 - 2006-01-18 03:09 PM Re: COM Event problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
I think you should check the KiXforms too.
both KiXforms 2.3 and KF 3.1 .Net alpha have networking support.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 139 anonymous users online.
Newest Members
vertage, dimi575, Drecksnacken, Nlill, webtools321
17735 Registered Users

Generated in 0.067 seconds in which 0.046 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org