KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Can two completely different KF.NET apps talk to each other?
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Thu Aug 16, 2007 9:21 pm    Post subject: Can two completely different KF.NET apps talk to each other? Reply with quote

What's the best way for two completely different KF.NET apps to talk to each other?

*and I don't mean invoking one application from the other.

For example:

Let's say I have different applications running on different machines. If one application updates a certain data file that all applications use, I want all applications to update itself (w/o the use of the Timer) with the latest changes.

Basically, I want synchronization across all applications opened.

I'm thinking of two possible ways:

1.) MSMQ (it's possible right?)
2.) KF Socket

Your suggestion/advice is welcome, thanks.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 17, 2007 1:11 am    Post subject: Reply with quote

msmq might be one option. never used myself so cant comment too much. wonder if the .Net FileSystemWatcher object might be useful here. Check it out and advise - doesn't look to tough to implement in kf quickly.

Here is a link:

FileSystemWatcher
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri Aug 17, 2007 7:51 pm    Post subject: Reply with quote

Thanks Shawn, I'll look into it and let you know. Smile
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri Aug 17, 2007 9:08 pm    Post subject: Reply with quote

Shawn,

How do I create the FileSystemWatcher object?

This is what I tried:

Code:

$System = CreateObject("KiXforms.System")

$FSW = $System.FileSystemWatcher


FileSystemWatcher is not listed in the drop-down (forget what it's called)
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Aug 17, 2007 9:47 pm    Post subject: Reply with quote

Its not there. It hasn't been added yet. Just suggested that if it looked promising, would implement it - don't think it would take long.
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri Aug 17, 2007 9:49 pm    Post subject: Reply with quote

Yes, this looks promising. Since all applications are used in the same domain, having a folder in a centralized server that all applications have access to, will help me accomplish what I want to do.

I can't wait to work on it!
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Aug 18, 2007 12:46 am    Post subject: Reply with quote

Got a preliminary build coming. Standby if your going to be around little longer.
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Sat Aug 18, 2007 12:49 am    Post subject: Reply with quote

I'll be here Wink
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Aug 18, 2007 1:06 am    Post subject: Reply with quote

Its not done yet - enough to start experimenting with. Currently getting 3 events per change - trying to figure that one out - think its normal - just need to implement one more property i think. The NotifyFilter property.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Aug 18, 2007 1:07 am    Post subject: Reply with quote

In a nutshell, here's the syntax. But you'll be the first to really give it a try ...

$PATH = "c:\"
$FILTER = ""

$FileSystemWatcher = $System.FileSystemWatcher()
$FileSystemWatcher.Path = $PATH
$FileSystemWatcher.Filter = $FILTER
$FileSystemWatcher.Changed = "FileSystemWatcher_Changed($$System.Sender, $$System.EventArgs)"
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Sat Aug 18, 2007 1:26 am    Post subject: Reply with quote

Awesome! Thanks for making a quick build. I'm going to play around with this when I get home tonight.

I look forward to the NotifyFilter property as I will need that to check on the file that I will be writing using NotifyFilters.LastWrite.

Are you also going to implement InternalBufferSize? I'm not sure if the buffer will ever be an issue...

Anyway, no rush. I know it's Friday, so have a great weekend!

Btw, in the history notes, it says

$System.EnableVisualStyles was added. What's the difference between that and $System.Application.EnableVisualStyles?
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Aug 18, 2007 1:35 am    Post subject: Reply with quote

I'm moving (duplicating) the Application methods and properties in the Application namespace into the system namepsace, because to me - system IS the application namespace. I won't be removing application.

I will be working on this tonight will be posting another build in a hour or so. Yeah, will be definitely implementing those - doing it now in fact.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Aug 18, 2007 1:37 am    Post subject: Reply with quote

p.s. make sure to turn on FileSystemWatcher events after setting things up:

$FileSystemWatcher.EnableRaisingEvents = 1
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Sat Aug 18, 2007 1:56 am    Post subject: Reply with quote

Ahh thanks. I just got home. I will start messing around with this now and test my application on the new build.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Aug 18, 2007 2:14 am    Post subject: Reply with quote

Going to post a new build shortly...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group