ntw-devel Mailing List for Network Transparent Widgets (ntw)
Status: Beta
Brought to you by:
drblast
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(28) |
Aug
(37) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(9) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(30) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Ian L. <dr...@gm...> - 2007-03-13 07:02:46
|
I've fixed a few bugs tonight, and added the GRAPHSIZE command, which changes the size of the graphics window. (You can also do this via a command line option, thanks to Immo.) I've moved the GWIDTH_MAX and GHEIGHT_MAX constants to BasicGraph.h, and put the sanity checking in that class so it's not spread around in multiple places. I'll probably do a new release soon, since this feature and the UTF-8 support are fairly significant improvements. Finally, I thought it might be fun to have a programming competition for users of Basic-256, perhaps make it a monthly event. Kids would either find a way to solve a mathematical problem using BASIC, or perhaps it could be more open-ended, like a "Game month" where the best game would be shown on the web site and offered for download. Any other ideas are appreciated. -Ian |
From: Ian L. <dr...@gm...> - 2007-03-07 22:02:26
|
I can add the initgraphics command fairly easily, I think. And the image feature is the next thing I plan to implement. It shouldn't be too difficult at all, and should be in the next release. -Ian On 3/7/07, Immo-Gert Birn <imm...@gm...> wrote: > Hello Ian, > > it was late yesterday and and I somehow managed to forget to mention a > two things: > > Maybe we should consider adding a BASIC command to change the size of > > the graphics window at run time, too. > In fact that was my very first idea: some command like > initgraphics(width,height) could be used to set up the graphics output > area. But I felt that in a first step it would be easiest for me to > have the command line option. Still I think it would be good to have > such a command, and I will probably try to implement it. > > The feature "my kids" would like to have most (after they got sound ;) > is to be able to display an image in the graphics output window: > IMAGE x,y,width,height,angle > This would be really a great feature for the next release. > > Best regards, Immo > > > Am Tue, 6 Mar 2007 14:19:28 -0800 > schrieb "Ian Larsen" <dr...@gm...>: > > > Immo, > > > > No, there's no cron job. It's a good idea to set one up though, I'll > > do that. > > > > And I'll review your changes. > > > > -Ian > > > > On 3/6/07, Immo-Gert Birn <imm...@gm...> wrote: > > > Hello, > > > > > > I committed the changes. There was a bug when loading a file from > > > command line that I fixed, too. It would be great if you could > > > review the changes. > > > BTW, is there a cron job running that refreshes the web site from > > > the svn repository? > > > > > > Best regards, Immo > > > > > > > > > Am Mon, 5 Mar 2007 16:42:43 -0800 > > > schrieb "Ian Larsen" <dr...@gm...>: > > > > > > > Immo, > > > > > > > > Please go ahead and use trunk for commits. I think the chances > > > > of any of us interfering with each other are slim now that most > > > > of the big features have been added. > > > > > > > > And any examples you contribute are welcome. > > > > > > > > I don't think there are any reasons the graphics window shouldn't > > > > be adjustable in size. If you've got it working, great. Maybe > > > > we should consider adding a BASIC command to change the size of > > > > the graphics window at run time, too. > > > > > > > > -Ian > > > > > > > > > > > > > > > > On 3/5/07, Immo-Gert Birn <imm...@gm...> wrote: > > > > > Hello Ian, > > > > > > > > > > first of all thank you for providing the documentation script > > > > > and for releasing 0.9.2. I used self compiled pre-releases in > > > > > my class for some time in order to have sound capabilities, and > > > > > then the kids wondered why it did not work at home with the > > > > > downloaded BASIC256. > > > > > > > > > > I prepared a small change that allows to set the size of the > > > > > graphics output window via command line. I promised this to my > > > > > kids > > > > > - we want to program a game where a bigger graphics window > > > > > would be great. Shall I commit the change to trunk or do you > > > > > prefer that I use branches/devel. I hope there are no principal > > > > > reasons against the feature. > > > > > > > > > > Finally, I would like to add two basic scripts to the examples: > > > > > a) A program to calculate the square root according to Heron. > > > > > b) A 2-dimensional collision program - collision of two "balls". > > > > > Again the question would be whether this is ok and whether I > > > > > shall use trunk. > > > > > > > > > > Thank you in advance, > > > > > Immo > > > > > > > > > |
From: Ian L. <dr...@gm...> - 2007-03-06 22:31:46
|
All, I've added a cron job to the Sourceforge web page, so that cahnges to the web page in subversion under htdocs will be copied to the actual web server every half hour. Also, a gentleman from Russia has contributed a Russian translation and a patch that allows UTF-8 coded strings in any basic256 program, so you can finally write Hello World in the language of your choice. -Ian |
From: Ian L. <dr...@gm...> - 2007-03-06 00:43:47
|
Immo, Please go ahead and use trunk for commits. I think the chances of any of us interfering with each other are slim now that most of the big features have been added. And any examples you contribute are welcome. I don't think there are any reasons the graphics window shouldn't be adjustable in size. If you've got it working, great. Maybe we should consider adding a BASIC command to change the size of the graphics window at run time, too. -Ian On 3/5/07, Immo-Gert Birn <imm...@gm...> wrote: > Hello Ian, > > first of all thank you for providing the documentation script and for > releasing 0.9.2. I used self compiled pre-releases in my class for some > time in order to have sound capabilities, and then the kids wondered > why it did not work at home with the downloaded BASIC256. > > I prepared a small change that allows to set the size of the graphics > output window via command line. I promised this to my kids - we want to > program a game where a bigger graphics window would be great. Shall I > commit the change to trunk or do you prefer that I use branches/devel. > I hope there are no principal reasons against the feature. > > Finally, I would like to add two basic scripts to the examples: > a) A program to calculate the square root according to Heron. > b) A 2-dimensional collision program - collision of two "balls". > Again the question would be whether this is ok and whether I shall use > trunk. > > Thank you in advance, > Immo > |
From: Ian L. <dr...@gm...> - 2007-03-01 22:04:10
|
Hello everyone, I made the 0.9.2 release of Basic-256 today. Almost everything is up to date, I think. I've deleted the devel branch and moved everything back to trunk, since everything has stabilized and I don't expect large changes after this point. There's a new command line option (-l) to select the language at run time, for those that need to do that. (May aid translation) Thanks for everyone's work that's made this possible, Ian |
From: Ian L. <dr...@gm...> - 2006-07-08 06:38:08
|
All, The NTW common lisp server now supports clisp (http://clisp.cons.org) in addition to CMUCL and SBCL. I haven't extensively tested the Clisp server for robustness in the face of poorly behaved/malicious clients yet, so I can't recommend it for "production" use. I still have to test whether the reads from the sockets time out properly. It seems that they are, but it's hard to tell without actually writing a malicious client. -Ian |
From: Ian L. <dr...@gm...> - 2006-07-06 02:40:35
|
All, I've been working on the Lisp server a lot lately. Now, by default, it will run the application that you specify on port 12345 and will also run a server monitor application on port 19879. So the regular clients can connect, but you can also monitor the activity by connecting a client to the other port. All it shows right now is what client ip addresses are connected to what file descriptor, but I'm going to add buttons so you can kick clients off, get info on how long they've been connected, set variable for the server like maximum number of clients, etc. It's like if Apache had a web interface where you could read the logs in real time and change the server configuration as it runs. -Ian |
From: Yua C. <ca...@gz...> - 2006-07-05 04:00:52
|
A java applet would be a nice way to go about it, Ian. :) The only problem would be client-side file loading... I still believe that NTW needs to have a way for customers to load files to be worked on... like the text editor widget is almost useless because there's no way for the customer to load/save files. A good example would be something like Open Office/MS Office. ;) lol. On a more serious note? I think a solitaire program or a tic-tac-toe program would be fairly trivial to write up. :) What WOULD be a nice example would be a multi-user application, like a "Chat Wall" program that stores text messages in a MySQL db and periodically sends the 25 latest messages to the users. :) Yua Ca Van ----- Original Message ----- From: "Ian Larsen" <dr...@gm...> To: "Yua CaVan" <ca...@gz...> Cc: "NTW Mailing List" <ntw...@li...> Sent: Tuesday, July 04, 2006 3:16 AM Subject: Re: [Ntw-devel] Web Site > Yua, > > Unfortunately, I'm out of my area of expertise when it comes to > Windows specific things like this, but it's very intriguing. If you > can get anything working I'd be happy to put it in CVS and give you > access. Even supporting just a window, button, and label for a basic > hello world app would be a big start, I could probably add to it from > there. > > Another possibility for browser embedding is a Java applet client, > which would be cross-platform and has the advantage that most people > already have Java installed. I tried to keep Swing in mind when > designing NTW, so a Swing client should be relatively straightforward. > > I'll probably work on that after I finish the Lisp server (the end is > in sight) and either the Java or Python server. I also want to do a > catchy demo app, like a game, that would show off some of NTW's > capabilities. > > -Ian > > > On 7/3/06, Yua CaVan <ca...@gz...> wrote: >> I have written an ActiveX component. :) But that was using MFC. :) I'll >> look into it more deeply, but, yes... the ActiveX component would only >> work >> with IE under Windoze, that's why I recommended looking into making the >> client a Mozilla extension as well. :) >> >> The other benefit to making the client an ActiveX component, on the >> Windoze >> side, is that the client could be embedded into ANYTHING that supports >> ActiveX components... ie, any of the Office products. ;) ...as well as >> any >> new applications to be developed. >> >> I think that, like the current client, any other client should require up >> to >> 5 parameters (properties): >> 1. IP Address * REQUIRED * obviously. ;) >> 2. Port # - OPTIONAL - >> 3. location of .ntw file for 1 & 2 above - OPTIONAL - >> 4. Width - OPTIONAL - >> 5. Height - OPTIONAL - >> >> The methods we would need would be, other than the accessing of the 5 >> properties, Connect and Disconnect... so 12 total methods: >> 1. Connect() - connect to the IP Address/port >> 2. Disconnect() - disconnect from the connection >> >> 3-12: Get/Set methods for the various properties. >> >> Other than that, the code in the client.c would be the primary makeup of >> the >> component. :-D >> >> Yua Ca Van >> >> This transmission many contain information that is privileged, >> confidential >> and exempt from disclosure under applicable law. If you are not the >> intended >> recipient, you are hereby notified that any disclosure, copying, >> distribution or use of the information contained herein (including any >> reliance thereon) is STRICTLY PROHIBITED. If you received this >> transmission >> in error, please immediately contact the sender and destroy the material >> in >> its entirety, whether in electronic or hard copy format. >> <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> >> ----- Original Message ----- >> From: "Ian Larsen" <dr...@gm...> >> To: "Yua CaVan" <ca...@gz...> >> Cc: "NTW Mailing List" <ntw...@li...> >> Sent: Monday, July 03, 2006 2:40 PM >> Subject: Re: [Ntw-devel] Web Site >> >> >> > That's a fantastic idea, you could do some really interesting things >> > with >> > that. >> > >> > I don't know anything about ActiveX other than it's IE specific, and >> > I've never written an ActiveX control. Are you familiar with it? >> > >> > -Ian >> > >> > On 7/3/06, Yua CaVan <ca...@gz...> wrote: >> >> Very nice fixup to the web site. :) >> >> >> >> Just had a thought... what do you think about an ActiveX client ( and >> >> later >> >> a Mozilla extension ) so we could "embed" the client into a web page? >> >> I >> >> believe the C# could be used with Gtk# ( Gtk bindings for C# ) to >> >> create >> >> an >> >> ActiveX component. Obvious plus would be that the consumers ( users >> >> of >> >> the >> >> clients ) would not have to dl and install the component in a seperate >> >> step... >> >> >> >> thoughts? >> >> >> >> Yua Ca Van >> >> >> >> This transmission many contain information that is privileged, >> >> confidential >> >> and exempt from disclosure under applicable law. If you are not the >> >> intended >> >> recipient, you are hereby notified that any disclosure, copying, >> >> distribution or use of the information contained herein (including any >> >> reliance thereon) is STRICTLY PROHIBITED. If you received this >> >> transmission >> >> in error, please immediately contact the sender and destroy the >> >> material >> >> in >> >> its entirety, whether in electronic or hard copy format. >> >> <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> >> >> ----- Original Message ----- >> >> From: "Ian Larsen" <dr...@gm...> >> >> To: "NTW Mailing List" <ntw...@li...> >> >> Sent: Wednesday, June 28, 2006 7:11 PM >> >> Subject: [Ntw-devel] Web Site >> >> >> >> >> >> > All, >> >> > >> >> > I've done a rather large update to the NTW web site, so it should be >> >> > a >> >> > lot more clear. Hopefully it will be easier to find information on >> >> > there, and the documentation for the C server is now up to date, >> >> > too. >> >> > >> >> > -Ian >> >> > >> >> > Using Tomcat but need to do more? Need to support web services, >> >> > security? >> >> > Get stuff done quickly with pre-integrated technology to make your >> >> > job >> >> > easier >> >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache >> >> > Geronimo >> >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> >> > _______________________________________________ >> >> > Ntw-devel mailing list >> >> > Ntw...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel >> >> > >> >> > >> >> >> >> >> >> >> > >> > >> >> >> > > |
From: Ian L. <dr...@gm...> - 2006-07-04 08:16:31
|
Yua, Unfortunately, I'm out of my area of expertise when it comes to Windows specific things like this, but it's very intriguing. If you can get anything working I'd be happy to put it in CVS and give you access. Even supporting just a window, button, and label for a basic hello world app would be a big start, I could probably add to it from there. Another possibility for browser embedding is a Java applet client, which would be cross-platform and has the advantage that most people already have Java installed. I tried to keep Swing in mind when designing NTW, so a Swing client should be relatively straightforward. I'll probably work on that after I finish the Lisp server (the end is in sight) and either the Java or Python server. I also want to do a catchy demo app, like a game, that would show off some of NTW's capabilities. -Ian On 7/3/06, Yua CaVan <ca...@gz...> wrote: > I have written an ActiveX component. :) But that was using MFC. :) I'll > look into it more deeply, but, yes... the ActiveX component would only work > with IE under Windoze, that's why I recommended looking into making the > client a Mozilla extension as well. :) > > The other benefit to making the client an ActiveX component, on the Windoze > side, is that the client could be embedded into ANYTHING that supports > ActiveX components... ie, any of the Office products. ;) ...as well as any > new applications to be developed. > > I think that, like the current client, any other client should require up to > 5 parameters (properties): > 1. IP Address * REQUIRED * obviously. ;) > 2. Port # - OPTIONAL - > 3. location of .ntw file for 1 & 2 above - OPTIONAL - > 4. Width - OPTIONAL - > 5. Height - OPTIONAL - > > The methods we would need would be, other than the accessing of the 5 > properties, Connect and Disconnect... so 12 total methods: > 1. Connect() - connect to the IP Address/port > 2. Disconnect() - disconnect from the connection > > 3-12: Get/Set methods for the various properties. > > Other than that, the code in the client.c would be the primary makeup of the > component. :-D > > Yua Ca Van > > This transmission many contain information that is privileged, confidential > and exempt from disclosure under applicable law. If you are not the intended > recipient, you are hereby notified that any disclosure, copying, > distribution or use of the information contained herein (including any > reliance thereon) is STRICTLY PROHIBITED. If you received this transmission > in error, please immediately contact the sender and destroy the material in > its entirety, whether in electronic or hard copy format. > <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> > ----- Original Message ----- > From: "Ian Larsen" <dr...@gm...> > To: "Yua CaVan" <ca...@gz...> > Cc: "NTW Mailing List" <ntw...@li...> > Sent: Monday, July 03, 2006 2:40 PM > Subject: Re: [Ntw-devel] Web Site > > > > That's a fantastic idea, you could do some really interesting things with > > that. > > > > I don't know anything about ActiveX other than it's IE specific, and > > I've never written an ActiveX control. Are you familiar with it? > > > > -Ian > > > > On 7/3/06, Yua CaVan <ca...@gz...> wrote: > >> Very nice fixup to the web site. :) > >> > >> Just had a thought... what do you think about an ActiveX client ( and > >> later > >> a Mozilla extension ) so we could "embed" the client into a web page? I > >> believe the C# could be used with Gtk# ( Gtk bindings for C# ) to create > >> an > >> ActiveX component. Obvious plus would be that the consumers ( users of > >> the > >> clients ) would not have to dl and install the component in a seperate > >> step... > >> > >> thoughts? > >> > >> Yua Ca Van > >> > >> This transmission many contain information that is privileged, > >> confidential > >> and exempt from disclosure under applicable law. If you are not the > >> intended > >> recipient, you are hereby notified that any disclosure, copying, > >> distribution or use of the information contained herein (including any > >> reliance thereon) is STRICTLY PROHIBITED. If you received this > >> transmission > >> in error, please immediately contact the sender and destroy the material > >> in > >> its entirety, whether in electronic or hard copy format. > >> <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> > >> ----- Original Message ----- > >> From: "Ian Larsen" <dr...@gm...> > >> To: "NTW Mailing List" <ntw...@li...> > >> Sent: Wednesday, June 28, 2006 7:11 PM > >> Subject: [Ntw-devel] Web Site > >> > >> > >> > All, > >> > > >> > I've done a rather large update to the NTW web site, so it should be a > >> > lot more clear. Hopefully it will be easier to find information on > >> > there, and the documentation for the C server is now up to date, too. > >> > > >> > -Ian > >> > > >> > Using Tomcat but need to do more? Need to support web services, > >> > security? > >> > Get stuff done quickly with pre-integrated technology to make your job > >> > easier > >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache > >> > Geronimo > >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> > _______________________________________________ > >> > Ntw-devel mailing list > >> > Ntw...@li... > >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel > >> > > >> > > >> > >> > >> > > > > > > > |
From: Yua C. <ca...@gz...> - 2006-07-03 20:53:14
|
I have written an ActiveX component. :) But that was using MFC. :) I'll= =20 look into it more deeply, but, yes... the ActiveX component would only wo= rk=20 with IE under Windoze, that's why I recommended looking into making the=20 client a Mozilla extension as well. :) The other benefit to making the client an ActiveX component, on the Windo= ze=20 side, is that the client could be embedded into ANYTHING that supports=20 ActiveX components... ie, any of the Office products. ;) ...as well as a= ny=20 new applications to be developed. I think that, like the current client, any other client should require up= to=20 5 parameters (properties): 1. IP Address * REQUIRED * obviously. ;) 2. Port # - OPTIONAL - 3. location of .ntw file for 1 & 2 above - OPTIONAL - 4. Width - OPTIONAL - 5. Height - OPTIONAL - The methods we would need would be, other than the accessing of the 5=20 properties, Connect and Disconnect... so 12 total methods: 1. Connect() - connect to the IP Address/port 2. Disconnect() - disconnect from the connection 3-12: Get/Set methods for the various properties. Other than that, the code in the client.c would be the primary makeup of = the=20 component. :-D Yua Ca Van This transmission many contain information that is privileged, confidenti= al=20 and exempt from disclosure under applicable law. If you are not the inten= ded=20 recipient, you are hereby notified that any disclosure, copying,=20 distribution or use of the information contained herein (including any=20 reliance thereon) is STRICTLY PROHIBITED. If you received this transmissi= on=20 in error, please immediately contact the sender and destroy the material = in=20 its entirety, whether in electronic or hard copy format. <----- GZ Link, Inc. =A9 2006 All Rights Reserved ------> ----- Original Message -----=20 From: "Ian Larsen" <dr...@gm...> To: "Yua CaVan" <ca...@gz...> Cc: "NTW Mailing List" <ntw...@li...> Sent: Monday, July 03, 2006 2:40 PM Subject: Re: [Ntw-devel] Web Site > That's a fantastic idea, you could do some really interesting things wi= th=20 > that. > > I don't know anything about ActiveX other than it's IE specific, and > I've never written an ActiveX control. Are you familiar with it? > > -Ian > > On 7/3/06, Yua CaVan <ca...@gz...> wrote: >> Very nice fixup to the web site. :) >> >> Just had a thought... what do you think about an ActiveX client ( and=20 >> later >> a Mozilla extension ) so we could "embed" the client into a web page? = I >> believe the C# could be used with Gtk# ( Gtk bindings for C# ) to crea= te=20 >> an >> ActiveX component. Obvious plus would be that the consumers ( users o= f=20 >> the >> clients ) would not have to dl and install the component in a seperate >> step... >> >> thoughts? >> >> Yua Ca Van >> >> This transmission many contain information that is privileged,=20 >> confidential >> and exempt from disclosure under applicable law. If you are not the=20 >> intended >> recipient, you are hereby notified that any disclosure, copying, >> distribution or use of the information contained herein (including any >> reliance thereon) is STRICTLY PROHIBITED. If you received this=20 >> transmission >> in error, please immediately contact the sender and destroy the materi= al=20 >> in >> its entirety, whether in electronic or hard copy format. >> <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> >> ----- Original Message ----- >> From: "Ian Larsen" <dr...@gm...> >> To: "NTW Mailing List" <ntw...@li...> >> Sent: Wednesday, June 28, 2006 7:11 PM >> Subject: [Ntw-devel] Web Site >> >> >> > All, >> > >> > I've done a rather large update to the NTW web site, so it should be= a >> > lot more clear. Hopefully it will be easier to find information on >> > there, and the documentation for the C server is now up to date, too. >> > >> > -Ian >> > >> > Using Tomcat but need to do more? Need to support web services,=20 >> > security? >> > Get stuff done quickly with pre-integrated technology to make your j= ob >> > easier >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache=20 >> > Geronimo >> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&= dat=3D121642 >> > _______________________________________________ >> > Ntw-devel mailing list >> > Ntw...@li... >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel >> > >> > >> >> >> > >=20 |
From: Ian L. <dr...@gm...> - 2006-07-03 19:40:44
|
That's a fantastic idea, you could do some really interesting things with that. I don't know anything about ActiveX other than it's IE specific, and I've never written an ActiveX control. Are you familiar with it? -Ian On 7/3/06, Yua CaVan <ca...@gz...> wrote: > Very nice fixup to the web site. :) > > Just had a thought... what do you think about an ActiveX client ( and later > a Mozilla extension ) so we could "embed" the client into a web page? I > believe the C# could be used with Gtk# ( Gtk bindings for C# ) to create an > ActiveX component. Obvious plus would be that the consumers ( users of the > clients ) would not have to dl and install the component in a seperate > step... > > thoughts? > > Yua Ca Van > > This transmission many contain information that is privileged, confidential > and exempt from disclosure under applicable law. If you are not the intended > recipient, you are hereby notified that any disclosure, copying, > distribution or use of the information contained herein (including any > reliance thereon) is STRICTLY PROHIBITED. If you received this transmission > in error, please immediately contact the sender and destroy the material in > its entirety, whether in electronic or hard copy format. > <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> > ----- Original Message ----- > From: "Ian Larsen" <dr...@gm...> > To: "NTW Mailing List" <ntw...@li...> > Sent: Wednesday, June 28, 2006 7:11 PM > Subject: [Ntw-devel] Web Site > > > > All, > > > > I've done a rather large update to the NTW web site, so it should be a > > lot more clear. Hopefully it will be easier to find information on > > there, and the documentation for the C server is now up to date, too. > > > > -Ian > > > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Ntw-devel mailing list > > Ntw...@li... > > https://lists.sourceforge.net/lists/listinfo/ntw-devel > > > > > > > |
From: Yua C. <ca...@gz...> - 2006-07-03 19:27:31
|
Very nice fixup to the web site. :) Just had a thought... what do you think about an ActiveX client ( and lat= er=20 a Mozilla extension ) so we could "embed" the client into a web page? I=20 believe the C# could be used with Gtk# ( Gtk bindings for C# ) to create = an=20 ActiveX component. Obvious plus would be that the consumers ( users of t= he=20 clients ) would not have to dl and install the component in a seperate=20 step... thoughts? Yua Ca Van This transmission many contain information that is privileged, confidenti= al=20 and exempt from disclosure under applicable law. If you are not the inten= ded=20 recipient, you are hereby notified that any disclosure, copying,=20 distribution or use of the information contained herein (including any=20 reliance thereon) is STRICTLY PROHIBITED. If you received this transmissi= on=20 in error, please immediately contact the sender and destroy the material = in=20 its entirety, whether in electronic or hard copy format. <----- GZ Link, Inc. =A9 2006 All Rights Reserved ------> ----- Original Message -----=20 From: "Ian Larsen" <dr...@gm...> To: "NTW Mailing List" <ntw...@li...> Sent: Wednesday, June 28, 2006 7:11 PM Subject: [Ntw-devel] Web Site > All, > > I've done a rather large update to the NTW web site, so it should be a > lot more clear. Hopefully it will be easier to find information on > there, and the documentation for the C server is now up to date, too. > > -Ian > > Using Tomcat but need to do more? Need to support web services, securit= y? > Get stuff done quickly with pre-integrated technology to make your job=20 > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron= imo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Ntw-devel mailing list > Ntw...@li... > https://lists.sourceforge.net/lists/listinfo/ntw-devel > >=20 |
From: Ian L. <dr...@gm...> - 2006-06-29 00:11:35
|
All, I've done a rather large update to the NTW web site, so it should be a lot more clear. Hopefully it will be easier to find information on there, and the documentation for the C server is now up to date, too. -Ian |
From: Yua C. <ca...@gz...> - 2006-06-26 23:43:47
|
I know that I can call resetTimer directly from the button callback, but it seems to be a duplication, since closing/destroying the window already has an event tied to it. I understand the whole infinite loop thing with regular events, but the final events DESTROY/DELETE should always fire for a widget so the programmer can do some garbage cleanup. In this case, closing the dialog widget "normally" by clicking on the 'X' does send the DESTROY/DELETE event and the timer is reset in the cleanup callback. Mebbe we should add in ntw_dialog/window_close(ntwWidget* widget) to do the same thing as the 'X'? Like I said, I'm a big fan of garbage cleanup. ;) Yua Ca Van ----- Original Message ----- From: "Ian Larsen" <dr...@gm...> To: "Yua CaVan" <ca...@gz...> Cc: "NTW Mailing List" <ntw...@li...> Sent: Monday, June 26, 2006 6:37 PM Subject: Re: [Ntw-devel] Timers > No, neither of those will fire. > > The reason is that if you have events fire in response to server > changes, you can get caught in ugly loops where the state is > undetermined. > > For example, if I change the text of an entry widget, and it fires an > entry-text-changed event, the server will change the text accordingly, > which will send another message to the client, which will change the > text and fire yet another event... > > To avoid this sort of thing, events are only fired based on input from > the actual user of the client, (except for timer events). This keeps > things simpler conceptually for the application programmer. > > In this case, you could call resetTimer directly. > > If you think this is the wrong approach, please let me know. > > -Ian > > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: >> gotcha. makes sense now. :) >> >> it looks like the resetTimer callback for dlg is never called when the >> dialog is destroyed. I had expected the DESTROY_EVENT or the DELETE_EVENT >> would fire when I called ntw_widget_destroy(). >> >> Yua Ca Van >> ----- Original Message ----- >> From: "Ian Larsen" <dr...@gm...> >> To: "Yua CaVan" <ca...@gz...> >> Cc: "NTW Mailing List" <ntw...@li...> >> Sent: Monday, June 26, 2006 6:01 PM >> Subject: Re: [Ntw-devel] Timers >> >> >> > Whoops, >> > >> > That callback declaration should be: >> > >> > void >> > ping (struct ntw_event_data *edata, ntwWidget *userdata){ >> > >> > } >> > >> > A pointer is passed to the event data, not the event data itself. >> > >> > -Ian >> > >> > On 6/26/06, Ian Larsen <dr...@gm...> wrote: >> >> At first glance, it looks like you're omitting the event data >> >> structure in your callback declaration. >> >> >> >> It should look like this: >> >> >> >> void >> >> ping(struct ntw_event_data, ntwWidget *userdata){ >> >> //ping callback function >> >> } >> >> >> >> The problem is that the helloworld.c example isn't clear that this is >> >> the proper declaration for a callback function, you'd have to look at >> >> ntwtest for that. I'll fix that in the docs so nobody else falls into >> >> the same trap. >> >> >> >> By the way, the ntw_event_data structure looks like this: >> >> >> >> struct ntw_event_data { >> >> int32 id; >> >> int32 event; >> >> int32 synchronized; >> >> char data[]; >> >> } >> >> >> >> With the last char data[] being any applicable data that the client >> >> sends back, such as the new text for an ENTRY_TEXT_CHANGED event, for >> >> example. >> >> >> >> Hope that helps, >> >> Ian >> >> >> >> On 6/26/06, Yua CaVan <ca...@gz...> wrote: >> >> > I've modified the helloworld.c to add in a timer to test something >> >> > out >> >> > and >> >> > realized that we don't have a clean way of closing out dialog >> >> > windows... >> >> > >> >> > I've created a callback function called ping as well as setting the >> >> > window >> >> > and timer variables to static: >> >> > >> >> > static ntwWidget * pMainWnd; /* is the main window */ >> >> > static ntwWidget * pMainTimer; /* is the timer */ >> >> > >> >> > void >> >> > ping (ntwWidget * user_data) { >> >> > ntwWidget *dlg; >> >> > ntwWidget *layout; >> >> > ntwWidget *label; >> >> > ntwWidget *button; >> >> > ntwWidget *btnLabel; >> >> > >> >> > dlg = ntw_dialog_new( >> >> > pMainWnd, /* parent window */ >> >> > 100, /* width */ >> >> > 80, /* height */ >> >> > TRUE, /* Modality */ >> >> > "PING!!!!!" /* Title */ >> >> > ); >> >> > >> >> > layout = ntw_grid_new(3,2,FALSE); >> >> > >> >> > ntw_container_add(dlg,layout); >> >> > >> >> > label = ntw_label_new("A timer event has just occured.\n" >> >> > "Please click the OK button"); >> >> > ntw_grid_add( >> >> > layout, >> >> > label, >> >> > 1, >> >> > 2, >> >> > 1, >> >> > 2, >> >> > 0, >> >> > 0, >> >> > 0, >> >> > 0 >> >> > ); >> >> > >> >> > button = ntw_button_new(); >> >> > btnLabel = ntw_label_new("OK"); >> >> > >> >> > ntw_container_add(button,btnLabel); >> >> > >> >> > ntw_grid_add( >> >> > layout, >> >> > button, >> >> > 1, >> >> > 2, >> >> > 2, >> >> > 3, >> >> > 0, >> >> > 0, >> >> > 0, >> >> > 0 >> >> > ); >> >> > >> >> > ntw_add_callback(button, BUTTON_CLICKED, >> >> > (func_ptr)&closePing,dlg,ASYNC); >> >> > ntw_add_callback(dlg, DESTROY_EVENT, >> >> > (func_ptr)&resetPing,NULL,ASYNC); >> >> > ntw_add_callback(dlg, >> >> > DELETE_EVENT,(func_ptr)&resetPing,NULL,ASYNC); >> >> > >> >> > ntw_widget_show(dlg); >> >> > } >> >> > >> >> > now, the dialog will pop up and the timer will be reset when the >> >> > dialog >> >> > is >> >> > closed using the close button ( 'X' in the upper-right ), but the >> >> > closePing >> >> > function: >> >> > >> >> > void >> >> > closePing(ntwWidget * user_data) { >> >> > ntw_widget_destroy(user_data); /* should be dlg */ >> >> > } >> >> > >> >> > seems to destroy the BUTTON, rather than the dialog even though >> >> > dlg's >> >> > pointer is the user data. Any clues? >> >> > >> >> > for completeness, here's resetPing: >> >> > >> >> > void >> >> > resetPing() { >> >> > ntw_timer_reset(pMainTimer); >> >> > } >> >> > >> >> > and the timer is set up as: >> >> > ... >> >> > pMainTimer = ntw_timer_add(10 /* seconds */,ASYNC); >> >> > ntw_timer_set_callback(pMainTimer, (func_ptr)&ping, timer); >> >> > >> >> > Yua Ca Van >> >> > ----- Original Message ----- >> >> > From: "Ian Larsen" <dr...@gm...> >> >> > To: "Yua CaVan" <ca...@gz...> >> >> > Cc: "NTW Mailing List" <ntw...@li...> >> >> > Sent: Monday, June 26, 2006 2:21 PM >> >> > Subject: Re: [Ntw-devel] Timers >> >> > >> >> > >> >> > > Oh yeah...thanks. Done. :-) >> >> > > >> >> > > -Ian >> >> > > >> >> > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: >> >> > >> You need to update the Makefile.mingw for the Server and Client >> >> > >> to >> >> > >> add >> >> > >> timer.o to the list of objects to be compiled. :) >> >> > >> >> >> > >> Yua Ca Van >> >> > >> ----- Original Message ----- >> >> > >> From: "Ian Larsen" <dr...@gm...> >> >> > >> To: "NTW Mailing List" <ntw...@li...> >> >> > >> Sent: Sunday, June 25, 2006 2:38 PM >> >> > >> Subject: [Ntw-devel] Timers >> >> > >> >> >> > >> >> >> > >> > All, >> >> > >> > >> >> > >> > I've added a timer widget to the C server and client. The >> >> > >> > latest >> >> > >> > is >> >> > >> > in CVS. It seems to work well, but I haven't tested it very >> >> > >> > much >> >> > >> > yet. >> >> > >> > >> >> > >> > The code is in the files timer.c and timer.h, in both the >> >> > >> > Client >> >> > >> > and >> >> > >> > Server directories. >> >> > >> > >> >> > >> > -Ian >> >> > >> > >> >> > >> > Using Tomcat but need to do more? Need to support web services, >> >> > >> > security? >> >> > >> > Get stuff done quickly with pre-integrated technology to make >> >> > >> > your >> >> > >> > job >> >> > >> > easier >> >> > >> > Download IBM WebSphere Application Server v.1.0.1 based on >> >> > >> > Apache >> >> > >> > Geronimo >> >> > >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> >> > >> > _______________________________________________ >> >> > >> > Ntw-devel mailing list >> >> > >> > Ntw...@li... >> >> > >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel >> >> > >> > >> >> > >> > >> >> > >> >> >> > >> >> >> > >> >> >> > > >> >> > > >> >> > >> >> > >> >> > >> >> >> > >> > >> >> >> > > |
From: Ian L. <dr...@gm...> - 2006-06-26 23:37:36
|
No, neither of those will fire. The reason is that if you have events fire in response to server changes, you can get caught in ugly loops where the state is undetermined. For example, if I change the text of an entry widget, and it fires an entry-text-changed event, the server will change the text accordingly, which will send another message to the client, which will change the text and fire yet another event... To avoid this sort of thing, events are only fired based on input from the actual user of the client, (except for timer events). This keeps things simpler conceptually for the application programmer. In this case, you could call resetTimer directly. If you think this is the wrong approach, please let me know. -Ian On 6/26/06, Yua CaVan <ca...@gz...> wrote: > gotcha. makes sense now. :) > > it looks like the resetTimer callback for dlg is never called when the > dialog is destroyed. I had expected the DESTROY_EVENT or the DELETE_EVENT > would fire when I called ntw_widget_destroy(). > > Yua Ca Van > ----- Original Message ----- > From: "Ian Larsen" <dr...@gm...> > To: "Yua CaVan" <ca...@gz...> > Cc: "NTW Mailing List" <ntw...@li...> > Sent: Monday, June 26, 2006 6:01 PM > Subject: Re: [Ntw-devel] Timers > > > > Whoops, > > > > That callback declaration should be: > > > > void > > ping (struct ntw_event_data *edata, ntwWidget *userdata){ > > > > } > > > > A pointer is passed to the event data, not the event data itself. > > > > -Ian > > > > On 6/26/06, Ian Larsen <dr...@gm...> wrote: > >> At first glance, it looks like you're omitting the event data > >> structure in your callback declaration. > >> > >> It should look like this: > >> > >> void > >> ping(struct ntw_event_data, ntwWidget *userdata){ > >> //ping callback function > >> } > >> > >> The problem is that the helloworld.c example isn't clear that this is > >> the proper declaration for a callback function, you'd have to look at > >> ntwtest for that. I'll fix that in the docs so nobody else falls into > >> the same trap. > >> > >> By the way, the ntw_event_data structure looks like this: > >> > >> struct ntw_event_data { > >> int32 id; > >> int32 event; > >> int32 synchronized; > >> char data[]; > >> } > >> > >> With the last char data[] being any applicable data that the client > >> sends back, such as the new text for an ENTRY_TEXT_CHANGED event, for > >> example. > >> > >> Hope that helps, > >> Ian > >> > >> On 6/26/06, Yua CaVan <ca...@gz...> wrote: > >> > I've modified the helloworld.c to add in a timer to test something out > >> > and > >> > realized that we don't have a clean way of closing out dialog > >> > windows... > >> > > >> > I've created a callback function called ping as well as setting the > >> > window > >> > and timer variables to static: > >> > > >> > static ntwWidget * pMainWnd; /* is the main window */ > >> > static ntwWidget * pMainTimer; /* is the timer */ > >> > > >> > void > >> > ping (ntwWidget * user_data) { > >> > ntwWidget *dlg; > >> > ntwWidget *layout; > >> > ntwWidget *label; > >> > ntwWidget *button; > >> > ntwWidget *btnLabel; > >> > > >> > dlg = ntw_dialog_new( > >> > pMainWnd, /* parent window */ > >> > 100, /* width */ > >> > 80, /* height */ > >> > TRUE, /* Modality */ > >> > "PING!!!!!" /* Title */ > >> > ); > >> > > >> > layout = ntw_grid_new(3,2,FALSE); > >> > > >> > ntw_container_add(dlg,layout); > >> > > >> > label = ntw_label_new("A timer event has just occured.\n" > >> > "Please click the OK button"); > >> > ntw_grid_add( > >> > layout, > >> > label, > >> > 1, > >> > 2, > >> > 1, > >> > 2, > >> > 0, > >> > 0, > >> > 0, > >> > 0 > >> > ); > >> > > >> > button = ntw_button_new(); > >> > btnLabel = ntw_label_new("OK"); > >> > > >> > ntw_container_add(button,btnLabel); > >> > > >> > ntw_grid_add( > >> > layout, > >> > button, > >> > 1, > >> > 2, > >> > 2, > >> > 3, > >> > 0, > >> > 0, > >> > 0, > >> > 0 > >> > ); > >> > > >> > ntw_add_callback(button, BUTTON_CLICKED, > >> > (func_ptr)&closePing,dlg,ASYNC); > >> > ntw_add_callback(dlg, DESTROY_EVENT, > >> > (func_ptr)&resetPing,NULL,ASYNC); > >> > ntw_add_callback(dlg, DELETE_EVENT,(func_ptr)&resetPing,NULL,ASYNC); > >> > > >> > ntw_widget_show(dlg); > >> > } > >> > > >> > now, the dialog will pop up and the timer will be reset when the dialog > >> > is > >> > closed using the close button ( 'X' in the upper-right ), but the > >> > closePing > >> > function: > >> > > >> > void > >> > closePing(ntwWidget * user_data) { > >> > ntw_widget_destroy(user_data); /* should be dlg */ > >> > } > >> > > >> > seems to destroy the BUTTON, rather than the dialog even though dlg's > >> > pointer is the user data. Any clues? > >> > > >> > for completeness, here's resetPing: > >> > > >> > void > >> > resetPing() { > >> > ntw_timer_reset(pMainTimer); > >> > } > >> > > >> > and the timer is set up as: > >> > ... > >> > pMainTimer = ntw_timer_add(10 /* seconds */,ASYNC); > >> > ntw_timer_set_callback(pMainTimer, (func_ptr)&ping, timer); > >> > > >> > Yua Ca Van > >> > ----- Original Message ----- > >> > From: "Ian Larsen" <dr...@gm...> > >> > To: "Yua CaVan" <ca...@gz...> > >> > Cc: "NTW Mailing List" <ntw...@li...> > >> > Sent: Monday, June 26, 2006 2:21 PM > >> > Subject: Re: [Ntw-devel] Timers > >> > > >> > > >> > > Oh yeah...thanks. Done. :-) > >> > > > >> > > -Ian > >> > > > >> > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: > >> > >> You need to update the Makefile.mingw for the Server and Client to > >> > >> add > >> > >> timer.o to the list of objects to be compiled. :) > >> > >> > >> > >> Yua Ca Van > >> > >> ----- Original Message ----- > >> > >> From: "Ian Larsen" <dr...@gm...> > >> > >> To: "NTW Mailing List" <ntw...@li...> > >> > >> Sent: Sunday, June 25, 2006 2:38 PM > >> > >> Subject: [Ntw-devel] Timers > >> > >> > >> > >> > >> > >> > All, > >> > >> > > >> > >> > I've added a timer widget to the C server and client. The latest > >> > >> > is > >> > >> > in CVS. It seems to work well, but I haven't tested it very much > >> > >> > yet. > >> > >> > > >> > >> > The code is in the files timer.c and timer.h, in both the Client > >> > >> > and > >> > >> > Server directories. > >> > >> > > >> > >> > -Ian > >> > >> > > >> > >> > Using Tomcat but need to do more? Need to support web services, > >> > >> > security? > >> > >> > Get stuff done quickly with pre-integrated technology to make your > >> > >> > job > >> > >> > easier > >> > >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache > >> > >> > Geronimo > >> > >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> > >> > _______________________________________________ > >> > >> > Ntw-devel mailing list > >> > >> > Ntw...@li... > >> > >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel > >> > >> > > >> > >> > > >> > >> > >> > >> > >> > >> > >> > > > >> > > > >> > > >> > > >> > > >> > > > > > > > |
From: Yua C. <ca...@gz...> - 2006-06-26 23:20:24
|
gotcha. makes sense now. :) it looks like the resetTimer callback for dlg is never called when the dialog is destroyed. I had expected the DESTROY_EVENT or the DELETE_EVENT would fire when I called ntw_widget_destroy(). Yua Ca Van ----- Original Message ----- From: "Ian Larsen" <dr...@gm...> To: "Yua CaVan" <ca...@gz...> Cc: "NTW Mailing List" <ntw...@li...> Sent: Monday, June 26, 2006 6:01 PM Subject: Re: [Ntw-devel] Timers > Whoops, > > That callback declaration should be: > > void > ping (struct ntw_event_data *edata, ntwWidget *userdata){ > > } > > A pointer is passed to the event data, not the event data itself. > > -Ian > > On 6/26/06, Ian Larsen <dr...@gm...> wrote: >> At first glance, it looks like you're omitting the event data >> structure in your callback declaration. >> >> It should look like this: >> >> void >> ping(struct ntw_event_data, ntwWidget *userdata){ >> //ping callback function >> } >> >> The problem is that the helloworld.c example isn't clear that this is >> the proper declaration for a callback function, you'd have to look at >> ntwtest for that. I'll fix that in the docs so nobody else falls into >> the same trap. >> >> By the way, the ntw_event_data structure looks like this: >> >> struct ntw_event_data { >> int32 id; >> int32 event; >> int32 synchronized; >> char data[]; >> } >> >> With the last char data[] being any applicable data that the client >> sends back, such as the new text for an ENTRY_TEXT_CHANGED event, for >> example. >> >> Hope that helps, >> Ian >> >> On 6/26/06, Yua CaVan <ca...@gz...> wrote: >> > I've modified the helloworld.c to add in a timer to test something out >> > and >> > realized that we don't have a clean way of closing out dialog >> > windows... >> > >> > I've created a callback function called ping as well as setting the >> > window >> > and timer variables to static: >> > >> > static ntwWidget * pMainWnd; /* is the main window */ >> > static ntwWidget * pMainTimer; /* is the timer */ >> > >> > void >> > ping (ntwWidget * user_data) { >> > ntwWidget *dlg; >> > ntwWidget *layout; >> > ntwWidget *label; >> > ntwWidget *button; >> > ntwWidget *btnLabel; >> > >> > dlg = ntw_dialog_new( >> > pMainWnd, /* parent window */ >> > 100, /* width */ >> > 80, /* height */ >> > TRUE, /* Modality */ >> > "PING!!!!!" /* Title */ >> > ); >> > >> > layout = ntw_grid_new(3,2,FALSE); >> > >> > ntw_container_add(dlg,layout); >> > >> > label = ntw_label_new("A timer event has just occured.\n" >> > "Please click the OK button"); >> > ntw_grid_add( >> > layout, >> > label, >> > 1, >> > 2, >> > 1, >> > 2, >> > 0, >> > 0, >> > 0, >> > 0 >> > ); >> > >> > button = ntw_button_new(); >> > btnLabel = ntw_label_new("OK"); >> > >> > ntw_container_add(button,btnLabel); >> > >> > ntw_grid_add( >> > layout, >> > button, >> > 1, >> > 2, >> > 2, >> > 3, >> > 0, >> > 0, >> > 0, >> > 0 >> > ); >> > >> > ntw_add_callback(button, BUTTON_CLICKED, >> > (func_ptr)&closePing,dlg,ASYNC); >> > ntw_add_callback(dlg, DESTROY_EVENT, >> > (func_ptr)&resetPing,NULL,ASYNC); >> > ntw_add_callback(dlg, DELETE_EVENT,(func_ptr)&resetPing,NULL,ASYNC); >> > >> > ntw_widget_show(dlg); >> > } >> > >> > now, the dialog will pop up and the timer will be reset when the dialog >> > is >> > closed using the close button ( 'X' in the upper-right ), but the >> > closePing >> > function: >> > >> > void >> > closePing(ntwWidget * user_data) { >> > ntw_widget_destroy(user_data); /* should be dlg */ >> > } >> > >> > seems to destroy the BUTTON, rather than the dialog even though dlg's >> > pointer is the user data. Any clues? >> > >> > for completeness, here's resetPing: >> > >> > void >> > resetPing() { >> > ntw_timer_reset(pMainTimer); >> > } >> > >> > and the timer is set up as: >> > ... >> > pMainTimer = ntw_timer_add(10 /* seconds */,ASYNC); >> > ntw_timer_set_callback(pMainTimer, (func_ptr)&ping, timer); >> > >> > Yua Ca Van >> > ----- Original Message ----- >> > From: "Ian Larsen" <dr...@gm...> >> > To: "Yua CaVan" <ca...@gz...> >> > Cc: "NTW Mailing List" <ntw...@li...> >> > Sent: Monday, June 26, 2006 2:21 PM >> > Subject: Re: [Ntw-devel] Timers >> > >> > >> > > Oh yeah...thanks. Done. :-) >> > > >> > > -Ian >> > > >> > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: >> > >> You need to update the Makefile.mingw for the Server and Client to >> > >> add >> > >> timer.o to the list of objects to be compiled. :) >> > >> >> > >> Yua Ca Van >> > >> ----- Original Message ----- >> > >> From: "Ian Larsen" <dr...@gm...> >> > >> To: "NTW Mailing List" <ntw...@li...> >> > >> Sent: Sunday, June 25, 2006 2:38 PM >> > >> Subject: [Ntw-devel] Timers >> > >> >> > >> >> > >> > All, >> > >> > >> > >> > I've added a timer widget to the C server and client. The latest >> > >> > is >> > >> > in CVS. It seems to work well, but I haven't tested it very much >> > >> > yet. >> > >> > >> > >> > The code is in the files timer.c and timer.h, in both the Client >> > >> > and >> > >> > Server directories. >> > >> > >> > >> > -Ian >> > >> > >> > >> > Using Tomcat but need to do more? Need to support web services, >> > >> > security? >> > >> > Get stuff done quickly with pre-integrated technology to make your >> > >> > job >> > >> > easier >> > >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache >> > >> > Geronimo >> > >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> > >> > _______________________________________________ >> > >> > Ntw-devel mailing list >> > >> > Ntw...@li... >> > >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel >> > >> > >> > >> > >> > >> >> > >> >> > >> >> > > >> > > >> > >> > >> > >> > > |
From: Ian L. <dr...@gm...> - 2006-06-26 23:01:19
|
Whoops, That callback declaration should be: void ping (struct ntw_event_data *edata, ntwWidget *userdata){ } A pointer is passed to the event data, not the event data itself. -Ian On 6/26/06, Ian Larsen <dr...@gm...> wrote: > At first glance, it looks like you're omitting the event data > structure in your callback declaration. > > It should look like this: > > void > ping(struct ntw_event_data, ntwWidget *userdata){ > //ping callback function > } > > The problem is that the helloworld.c example isn't clear that this is > the proper declaration for a callback function, you'd have to look at > ntwtest for that. I'll fix that in the docs so nobody else falls into > the same trap. > > By the way, the ntw_event_data structure looks like this: > > struct ntw_event_data { > int32 id; > int32 event; > int32 synchronized; > char data[]; > } > > With the last char data[] being any applicable data that the client > sends back, such as the new text for an ENTRY_TEXT_CHANGED event, for > example. > > Hope that helps, > Ian > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: > > I've modified the helloworld.c to add in a timer to test something out and > > realized that we don't have a clean way of closing out dialog windows... > > > > I've created a callback function called ping as well as setting the window > > and timer variables to static: > > > > static ntwWidget * pMainWnd; /* is the main window */ > > static ntwWidget * pMainTimer; /* is the timer */ > > > > void > > ping (ntwWidget * user_data) { > > ntwWidget *dlg; > > ntwWidget *layout; > > ntwWidget *label; > > ntwWidget *button; > > ntwWidget *btnLabel; > > > > dlg = ntw_dialog_new( > > pMainWnd, /* parent window */ > > 100, /* width */ > > 80, /* height */ > > TRUE, /* Modality */ > > "PING!!!!!" /* Title */ > > ); > > > > layout = ntw_grid_new(3,2,FALSE); > > > > ntw_container_add(dlg,layout); > > > > label = ntw_label_new("A timer event has just occured.\n" > > "Please click the OK button"); > > ntw_grid_add( > > layout, > > label, > > 1, > > 2, > > 1, > > 2, > > 0, > > 0, > > 0, > > 0 > > ); > > > > button = ntw_button_new(); > > btnLabel = ntw_label_new("OK"); > > > > ntw_container_add(button,btnLabel); > > > > ntw_grid_add( > > layout, > > button, > > 1, > > 2, > > 2, > > 3, > > 0, > > 0, > > 0, > > 0 > > ); > > > > ntw_add_callback(button, BUTTON_CLICKED, (func_ptr)&closePing,dlg,ASYNC); > > ntw_add_callback(dlg, DESTROY_EVENT, (func_ptr)&resetPing,NULL,ASYNC); > > ntw_add_callback(dlg, DELETE_EVENT,(func_ptr)&resetPing,NULL,ASYNC); > > > > ntw_widget_show(dlg); > > } > > > > now, the dialog will pop up and the timer will be reset when the dialog is > > closed using the close button ( 'X' in the upper-right ), but the closePing > > function: > > > > void > > closePing(ntwWidget * user_data) { > > ntw_widget_destroy(user_data); /* should be dlg */ > > } > > > > seems to destroy the BUTTON, rather than the dialog even though dlg's > > pointer is the user data. Any clues? > > > > for completeness, here's resetPing: > > > > void > > resetPing() { > > ntw_timer_reset(pMainTimer); > > } > > > > and the timer is set up as: > > ... > > pMainTimer = ntw_timer_add(10 /* seconds */,ASYNC); > > ntw_timer_set_callback(pMainTimer, (func_ptr)&ping, timer); > > > > Yua Ca Van > > ----- Original Message ----- > > From: "Ian Larsen" <dr...@gm...> > > To: "Yua CaVan" <ca...@gz...> > > Cc: "NTW Mailing List" <ntw...@li...> > > Sent: Monday, June 26, 2006 2:21 PM > > Subject: Re: [Ntw-devel] Timers > > > > > > > Oh yeah...thanks. Done. :-) > > > > > > -Ian > > > > > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: > > >> You need to update the Makefile.mingw for the Server and Client to add > > >> timer.o to the list of objects to be compiled. :) > > >> > > >> Yua Ca Van > > >> ----- Original Message ----- > > >> From: "Ian Larsen" <dr...@gm...> > > >> To: "NTW Mailing List" <ntw...@li...> > > >> Sent: Sunday, June 25, 2006 2:38 PM > > >> Subject: [Ntw-devel] Timers > > >> > > >> > > >> > All, > > >> > > > >> > I've added a timer widget to the C server and client. The latest is > > >> > in CVS. It seems to work well, but I haven't tested it very much yet. > > >> > > > >> > The code is in the files timer.c and timer.h, in both the Client and > > >> > Server directories. > > >> > > > >> > -Ian > > >> > > > >> > Using Tomcat but need to do more? Need to support web services, > > >> > security? > > >> > Get stuff done quickly with pre-integrated technology to make your job > > >> > easier > > >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > >> > Geronimo > > >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > >> > _______________________________________________ > > >> > Ntw-devel mailing list > > >> > Ntw...@li... > > >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel > > >> > > > >> > > > >> > > >> > > >> > > > > > > > > > > > > > |
From: Ian L. <dr...@gm...> - 2006-06-26 22:55:53
|
At first glance, it looks like you're omitting the event data structure in your callback declaration. It should look like this: void ping(struct ntw_event_data, ntwWidget *userdata){ //ping callback function } The problem is that the helloworld.c example isn't clear that this is the proper declaration for a callback function, you'd have to look at ntwtest for that. I'll fix that in the docs so nobody else falls into the same trap. By the way, the ntw_event_data structure looks like this: struct ntw_event_data { int32 id; int32 event; int32 synchronized; char data[]; } With the last char data[] being any applicable data that the client sends back, such as the new text for an ENTRY_TEXT_CHANGED event, for example. Hope that helps, Ian On 6/26/06, Yua CaVan <ca...@gz...> wrote: > I've modified the helloworld.c to add in a timer to test something out and > realized that we don't have a clean way of closing out dialog windows... > > I've created a callback function called ping as well as setting the window > and timer variables to static: > > static ntwWidget * pMainWnd; /* is the main window */ > static ntwWidget * pMainTimer; /* is the timer */ > > void > ping (ntwWidget * user_data) { > ntwWidget *dlg; > ntwWidget *layout; > ntwWidget *label; > ntwWidget *button; > ntwWidget *btnLabel; > > dlg = ntw_dialog_new( > pMainWnd, /* parent window */ > 100, /* width */ > 80, /* height */ > TRUE, /* Modality */ > "PING!!!!!" /* Title */ > ); > > layout = ntw_grid_new(3,2,FALSE); > > ntw_container_add(dlg,layout); > > label = ntw_label_new("A timer event has just occured.\n" > "Please click the OK button"); > ntw_grid_add( > layout, > label, > 1, > 2, > 1, > 2, > 0, > 0, > 0, > 0 > ); > > button = ntw_button_new(); > btnLabel = ntw_label_new("OK"); > > ntw_container_add(button,btnLabel); > > ntw_grid_add( > layout, > button, > 1, > 2, > 2, > 3, > 0, > 0, > 0, > 0 > ); > > ntw_add_callback(button, BUTTON_CLICKED, (func_ptr)&closePing,dlg,ASYNC); > ntw_add_callback(dlg, DESTROY_EVENT, (func_ptr)&resetPing,NULL,ASYNC); > ntw_add_callback(dlg, DELETE_EVENT,(func_ptr)&resetPing,NULL,ASYNC); > > ntw_widget_show(dlg); > } > > now, the dialog will pop up and the timer will be reset when the dialog is > closed using the close button ( 'X' in the upper-right ), but the closePing > function: > > void > closePing(ntwWidget * user_data) { > ntw_widget_destroy(user_data); /* should be dlg */ > } > > seems to destroy the BUTTON, rather than the dialog even though dlg's > pointer is the user data. Any clues? > > for completeness, here's resetPing: > > void > resetPing() { > ntw_timer_reset(pMainTimer); > } > > and the timer is set up as: > ... > pMainTimer = ntw_timer_add(10 /* seconds */,ASYNC); > ntw_timer_set_callback(pMainTimer, (func_ptr)&ping, timer); > > Yua Ca Van > ----- Original Message ----- > From: "Ian Larsen" <dr...@gm...> > To: "Yua CaVan" <ca...@gz...> > Cc: "NTW Mailing List" <ntw...@li...> > Sent: Monday, June 26, 2006 2:21 PM > Subject: Re: [Ntw-devel] Timers > > > > Oh yeah...thanks. Done. :-) > > > > -Ian > > > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: > >> You need to update the Makefile.mingw for the Server and Client to add > >> timer.o to the list of objects to be compiled. :) > >> > >> Yua Ca Van > >> ----- Original Message ----- > >> From: "Ian Larsen" <dr...@gm...> > >> To: "NTW Mailing List" <ntw...@li...> > >> Sent: Sunday, June 25, 2006 2:38 PM > >> Subject: [Ntw-devel] Timers > >> > >> > >> > All, > >> > > >> > I've added a timer widget to the C server and client. The latest is > >> > in CVS. It seems to work well, but I haven't tested it very much yet. > >> > > >> > The code is in the files timer.c and timer.h, in both the Client and > >> > Server directories. > >> > > >> > -Ian > >> > > >> > Using Tomcat but need to do more? Need to support web services, > >> > security? > >> > Get stuff done quickly with pre-integrated technology to make your job > >> > easier > >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache > >> > Geronimo > >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> > _______________________________________________ > >> > Ntw-devel mailing list > >> > Ntw...@li... > >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel > >> > > >> > > >> > >> > >> > > > > > > > |
From: Yua C. <ca...@gz...> - 2006-06-26 22:29:36
|
I've modified the helloworld.c to add in a timer to test something out and realized that we don't have a clean way of closing out dialog windows... I've created a callback function called ping as well as setting the window and timer variables to static: static ntwWidget * pMainWnd; /* is the main window */ static ntwWidget * pMainTimer; /* is the timer */ void ping (ntwWidget * user_data) { ntwWidget *dlg; ntwWidget *layout; ntwWidget *label; ntwWidget *button; ntwWidget *btnLabel; dlg = ntw_dialog_new( pMainWnd, /* parent window */ 100, /* width */ 80, /* height */ TRUE, /* Modality */ "PING!!!!!" /* Title */ ); layout = ntw_grid_new(3,2,FALSE); ntw_container_add(dlg,layout); label = ntw_label_new("A timer event has just occured.\n" "Please click the OK button"); ntw_grid_add( layout, label, 1, 2, 1, 2, 0, 0, 0, 0 ); button = ntw_button_new(); btnLabel = ntw_label_new("OK"); ntw_container_add(button,btnLabel); ntw_grid_add( layout, button, 1, 2, 2, 3, 0, 0, 0, 0 ); ntw_add_callback(button, BUTTON_CLICKED, (func_ptr)&closePing,dlg,ASYNC); ntw_add_callback(dlg, DESTROY_EVENT, (func_ptr)&resetPing,NULL,ASYNC); ntw_add_callback(dlg, DELETE_EVENT,(func_ptr)&resetPing,NULL,ASYNC); ntw_widget_show(dlg); } now, the dialog will pop up and the timer will be reset when the dialog is closed using the close button ( 'X' in the upper-right ), but the closePing function: void closePing(ntwWidget * user_data) { ntw_widget_destroy(user_data); /* should be dlg */ } seems to destroy the BUTTON, rather than the dialog even though dlg's pointer is the user data. Any clues? for completeness, here's resetPing: void resetPing() { ntw_timer_reset(pMainTimer); } and the timer is set up as: ... pMainTimer = ntw_timer_add(10 /* seconds */,ASYNC); ntw_timer_set_callback(pMainTimer, (func_ptr)&ping, timer); Yua Ca Van ----- Original Message ----- From: "Ian Larsen" <dr...@gm...> To: "Yua CaVan" <ca...@gz...> Cc: "NTW Mailing List" <ntw...@li...> Sent: Monday, June 26, 2006 2:21 PM Subject: Re: [Ntw-devel] Timers > Oh yeah...thanks. Done. :-) > > -Ian > > On 6/26/06, Yua CaVan <ca...@gz...> wrote: >> You need to update the Makefile.mingw for the Server and Client to add >> timer.o to the list of objects to be compiled. :) >> >> Yua Ca Van >> ----- Original Message ----- >> From: "Ian Larsen" <dr...@gm...> >> To: "NTW Mailing List" <ntw...@li...> >> Sent: Sunday, June 25, 2006 2:38 PM >> Subject: [Ntw-devel] Timers >> >> >> > All, >> > >> > I've added a timer widget to the C server and client. The latest is >> > in CVS. It seems to work well, but I haven't tested it very much yet. >> > >> > The code is in the files timer.c and timer.h, in both the Client and >> > Server directories. >> > >> > -Ian >> > >> > Using Tomcat but need to do more? Need to support web services, >> > security? >> > Get stuff done quickly with pre-integrated technology to make your job >> > easier >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache >> > Geronimo >> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> > _______________________________________________ >> > Ntw-devel mailing list >> > Ntw...@li... >> > https://lists.sourceforge.net/lists/listinfo/ntw-devel >> > >> > >> >> >> > > |
From: Ian L. <dr...@gm...> - 2006-06-26 19:21:05
|
Oh yeah...thanks. Done. :-) -Ian On 6/26/06, Yua CaVan <ca...@gz...> wrote: > You need to update the Makefile.mingw for the Server and Client to add > timer.o to the list of objects to be compiled. :) > > Yua Ca Van > ----- Original Message ----- > From: "Ian Larsen" <dr...@gm...> > To: "NTW Mailing List" <ntw...@li...> > Sent: Sunday, June 25, 2006 2:38 PM > Subject: [Ntw-devel] Timers > > > > All, > > > > I've added a timer widget to the C server and client. The latest is > > in CVS. It seems to work well, but I haven't tested it very much yet. > > > > The code is in the files timer.c and timer.h, in both the Client and > > Server directories. > > > > -Ian > > > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Ntw-devel mailing list > > Ntw...@li... > > https://lists.sourceforge.net/lists/listinfo/ntw-devel > > > > > > > |
From: Yua C. <ca...@gz...> - 2006-06-26 16:13:37
|
You need to update the Makefile.mingw for the Server and Client to add timer.o to the list of objects to be compiled. :) Yua Ca Van ----- Original Message ----- From: "Ian Larsen" <dr...@gm...> To: "NTW Mailing List" <ntw...@li...> Sent: Sunday, June 25, 2006 2:38 PM Subject: [Ntw-devel] Timers > All, > > I've added a timer widget to the C server and client. The latest is > in CVS. It seems to work well, but I haven't tested it very much yet. > > The code is in the files timer.c and timer.h, in both the Client and > Server directories. > > -Ian > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Ntw-devel mailing list > Ntw...@li... > https://lists.sourceforge.net/lists/listinfo/ntw-devel > > |
From: Ian L. <dr...@gm...> - 2006-06-25 19:38:52
|
All, I've added a timer widget to the C server and client. The latest is in CVS. It seems to work well, but I haven't tested it very much yet. The code is in the files timer.c and timer.h, in both the Client and Server directories. -Ian |
From: Ian L. <dr...@gm...> - 2006-06-24 00:56:04
|
Yua, There are a few abstract widgets that would be good examples of widgets that aren't "real" GTK widgets, but are NTW widgets. These are the list_model, tree_model, radio_group, cached_image and image_buffer. If you mean that a "real widget" will have to be added to the server, client, and in the protocol, then yes, you're right. I'd imagine it would look something like this: struct timer_data { int32 id; int32 parent_id; int32 type; int32 timeout_seconds; }; #define TIMER_EVENT_COUNT 0 So this structure would get created on the server, and the id would get saved in the lookup table along with the callback. That info would get sent to the server which would create a timer, save the id info to its own lookup table, and send the event after the timeout. The client callback would be a static function (i.e. send_timer_event) with the id of the timer passed as data. -Ian On 6/23/06, Yua CaVan <ca...@gz...> wrote: > My main problem is trying to fit this into the current framework ( less work > overall, but more thinking. :)) ) > > Right now, it's easy enough to create a timer id using > g_timeout_add(interval, callback fn, data) where: > 1. interval is set by the user > 2. callback fn could be the sync/async _event_handler > 3. data is NULL ( since it's just a timer ) > > If we were to use sync/async _event_handler, we would need to make the > widget a "real" widget somehow with real events and such. > > ie, event_send(wt->address, TRUE/FALSE, eventid, NULL, 0); > > where wt ( the Widget Table ) address points to a "real" widget somewhere > and eventid is some int32. > > Any clues? > > Yua Ca Van > ----- Original Message ----- > From: "Ian Larsen" <dr...@gm...> > To: "Yua CaVan" <ca...@gz...> > Cc: <ntw...@li...> > Sent: Thursday, June 22, 2006 7:24 PM > Subject: Re: NTW mod for setting port value using -p > > > > Sorry, wrong link. > > > > Take a look at g_timeout_add. That's the new way to add a timed event > > to the main event loop, and has a callback. > > > > -Ian > > > > > > On 6/22/06, Yua CaVan <ca...@gz...> wrote: > >> I don't know if I'm a fan of the g_timer_* stuff. There aren't any > >> callbacks and we have to explicitly check each timer value. > >> > >> Yua Ca Van > >> ----- Original Message ----- > >> From: "Ian Larsen" <dr...@gm...> > >> To: "Yua CaVan" <ca...@gz...> > >> Cc: <ntw...@li...> > >> Sent: Thursday, June 22, 2006 4:59 PM > >> Subject: Re: NTW mod for setting port value using -p > >> > >> > >> > That looks about right, > >> > > >> > It's really not any different than many of the widgets that have > >> > "default" events associated with them, like the text entry widget. > >> > Everytime the text of an entry widget changes, an event is fired and > >> > the new text is sent to the server. > >> > > >> > So the timer wouldn't require any special handling. The glib timer > >> > functions make it all pretty simple. (These have been moved from GTK > >> > to GLib) > >> > > >> > http://www.gtk.org/api/2.6/glib/glib-Timers.html > >> > > >> > -Ian > >> > > >> > > >> > > >> > > >> > > >> > > >> > On 6/22/06, Yua CaVan <ca...@gz...> wrote: > >> >> I've thought about this some... if we were to do the timer > >> >> client-side, > >> >> we > >> >> would need to write up a special timer function to send a request to > >> >> the > >> >> server to run the callback function, am I right? > >> >> > >> >> ie... > >> >> [ client side timer widget ] > >> >> struct __timerData { > >> >> GtkFunction * cbFn; > >> >> gpointer * cbData; > >> >> } timerData; > >> >> > >> >> timerData td; > >> >> > >> >> function run_timer_callback(gpointer * data) { > >> >> /* > >> >> * Send request back to server to run the callback function > >> >> */ > >> >> } > >> >> > >> >> function make_timer_widget(ntwWidget* widget, gint timeout, > >> >> GtkFunction * > >> >> callback, gpointer * data) { > >> >> td.cbFn = callback; > >> >> td.cbData = data; > >> >> > >> >> widget = gtk_timeout_add(timeout, (GtkFunction*)run_timer_callback, > >> >> (gpointer*)&td); > >> >> // add this widget to the widget table > >> >> } > >> >> ----- Original Message ----- > >> >> From: "Ian Larsen" <dr...@gm...> > >> >> To: "Yua CaVan" <ca...@gz...> > >> >> Sent: Monday, June 19, 2006 5:00 PM > >> >> Subject: Re: NTW mod for setting port value using -p > >> >> > >> >> > >> >> > I'll keep that in mind. What do you think of having the timer stop > >> >> > automatically, and only start again when the server issues a > >> >> > "restart" > >> >> > message? That way a server wouldn't get bogged down with unhandled > >> >> > timer messages. > >> >> > > >> >> > -Ian > >> >> > > >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> >> sounds like a plan. :) I haven't used timers under GTK or QT, but > >> >> >> if > >> >> >> there's already an implementation, then it's silly not to use it. > >> >> >> :) > >> >> >> > >> >> >> I still think that it'd be a good idea to supply the "stop timer" > >> >> >> and > >> >> >> "change timeout" messages so the client can stop and/or change > >> >> >> timeout > >> >> >> values. ie, very time intensive code would require a "stop timer" > >> >> >> to > >> >> >> be > >> >> >> issued until completion of the task. That's my normal > >> >> >> modus-operendus > >> >> >> when > >> >> >> doing async timeouts. After the task is completed, I restart the > >> >> >> timer. > >> >> >> > >> >> >> Sometimes, you may want to change the timeouts... ie, if this is an > >> >> >> email > >> >> >> application, the user may want the option to change the frequency > >> >> >> in > >> >> >> which > >> >> >> s/he grabs email from the mail server. > >> >> >> > >> >> >> Yua Ca Van > >> >> >> ----- Original Message ----- > >> >> >> From: "Ian Larsen" <dr...@gm...> > >> >> >> To: "Yua CaVan" <ca...@gz...> > >> >> >> Sent: Monday, June 19, 2006 4:45 PM > >> >> >> Subject: Re: NTW mod for setting port value using -p > >> >> >> > >> >> >> > >> >> >> > Originally, my thought was to do the timer as a server side > >> >> >> > widget > >> >> >> > like that, but I thought it might be better to have a client side > >> >> >> > timer, that sends an event to the server. > >> >> >> > > >> >> >> > The reasons are that properly handling multiple timers on a > >> >> >> > multithreaded server serving many clients is hard. Also, with > >> >> >> > the > >> >> >> > network latency being a factor, I don't think the millisecond > >> >> >> > latency > >> >> >> > would ever be necessary. Finally, I'm sure there are some > >> >> >> > programming > >> >> >> > languages where supporting timer interrupts would be non-trivial > >> >> >> > or > >> >> >> > impossible. (The Common Lisp server uses a select-based event > >> >> >> > loop > >> >> >> > to > >> >> >> > distribute processing among clients, a timer would be very > >> >> >> > difficult > >> >> >> > to do there.) > >> >> >> > > >> >> >> > Since GTK and QT both have timers already, I thought that a > >> >> >> > client-side timer widget would be extremely easy to implement, > >> >> >> > wouldn't complicate the server at all, and would be usable by any > >> >> >> > programming language. It would simply send a "NTW_TIMEOUT" event > >> >> >> > at > >> >> >> > a > >> >> >> > specified interval. That way, all servers could handle that > >> >> >> > event > >> >> >> > with a callback as with any other event. > >> >> >> > > >> >> >> > Let me know if I'm missing something. > >> >> >> > > >> >> >> > -Ian > >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> >> >> lol. I was just thinking about that as well. :) > >> >> >> >> > >> >> >> >> The primary concern for a Timer widget is threading. PThreads > >> >> >> >> should > >> >> >> >> work > >> >> >> >> under all OSes. > >> >> >> >> The Timer Widget could be created with the timeout in > >> >> >> >> milliseconds > >> >> >> >> and > >> >> >> >> you > >> >> >> >> can add a callback via ntw_add_callback(), ie: > >> >> >> >> > >> >> >> >> ntwWidget * timer1; > >> >> >> >> ntwWidget * timer1Timeout; > >> >> >> >> > >> >> >> >> timer1 = ntw_timer_new(1000); > >> >> >> >> ntw_add_callback(timer1, TIMER_EVENT, (func_ptr)&timer_ping, > >> >> >> >> timer, > >> >> >> >> ASYNC); > >> >> >> >> > >> >> >> >> the Timer widget could have pause() and set() functions to stop > >> >> >> >> the > >> >> >> >> timer > >> >> >> >> and to change the timeout. > >> >> >> >> > >> >> >> >> What do you think? > >> >> >> >> ----- Original Message ----- > >> >> >> >> From: "Ian Larsen" <dr...@gm...> > >> >> >> >> To: "Yua CaVan" <ca...@gz...> > >> >> >> >> Sent: Monday, June 19, 2006 4:03 PM > >> >> >> >> Subject: Re: NTW mod for setting port value using -p > >> >> >> >> > >> >> >> >> > >> >> >> >> > Yua, > >> >> >> >> > > >> >> >> >> > Thanks for the kind words. The file upload and download would > >> >> >> >> > be > >> >> >> >> > a > >> >> >> >> > great addition. The reason it's not in there already is > >> >> >> >> > because > >> >> >> >> > I > >> >> >> >> > figured it would be a security issue and didn't want to deal > >> >> >> >> > with > >> >> >> >> > that > >> >> >> >> > until I had plenty of time. But it wouldn't be hard to do at > >> >> >> >> > all -- > >> >> >> >> > the buffered images would be a good starting point, as they > >> >> >> >> > save > >> >> >> >> > to > >> >> >> >> > disk on the client side already. > >> >> >> >> > > >> >> >> >> > But as for going beta, the only other thing I'd really like to > >> >> >> >> > add > >> >> >> >> > is > >> >> >> >> > a timer widget that would cause an event every N seconds. > >> >> >> >> > > >> >> >> >> > -Ian > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> >> >> >> No problem, Ian. Just happened to notice that a network > >> >> >> >> >> framework > >> >> >> >> >> is > >> >> >> >> >> kinda > >> >> >> >> >> useless if people aren't able to specify which port they can > >> >> >> >> >> run > >> >> >> >> >> their > >> >> >> >> >> servers on. ;) > >> >> >> >> >> > >> >> >> >> >> btw, I totally LOVE this framework. :) > >> >> >> >> >> > >> >> >> >> >> I would like to see how we could implement file upload ( > >> >> >> >> >> loading > >> >> >> >> >> files > >> >> >> >> >> to > >> >> >> >> >> work on, if someone were to write a word processor ) and file > >> >> >> >> >> download > >> >> >> >> >> ( > >> >> >> >> >> saving files as in the afforementioned word processor ). At > >> >> >> >> >> that > >> >> >> >> >> point, > >> >> >> >> >> the > >> >> >> >> >> framework could very easily go Beta and you could have MS > >> >> >> >> >> buying > >> >> >> >> >> this > >> >> >> >> >> widget > >> >> >> >> >> system from you. lol. J/K! :D > >> >> >> >> >> > >> >> >> >> >> Yua Ca Van > >> >> >> >> >> ----- Original Message ----- > >> >> >> >> >> From: "Ian Larsen" <dr...@gm...> > >> >> >> >> >> To: "Yua CaVan" <ca...@gz...> > >> >> >> >> >> Sent: Monday, June 19, 2006 2:59 PM > >> >> >> >> >> Subject: Re: NTW mod for setting port value using -p > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > Yua, > >> >> >> >> >> > > >> >> >> >> >> > Thank you very much for the patch. I'll put it in and > >> >> >> >> >> > alter > >> >> >> >> >> > the > >> >> >> >> >> > documentation as you recomended. > >> >> >> >> >> > > >> >> >> >> >> > Thanks again, > >> >> >> >> >> > Ian Larsen > >> >> >> >> >> > > >> >> >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> >> >> >> >> Please find attached: > >> >> >> >> >> >> 1. ntw_port_mod.tgz > >> >> >> >> >> >> > >> >> >> >> >> >> This tar-gzipped file contains 4 files: > >> >> >> >> >> >> 1. network.h > >> >> >> >> >> >> 2. network.c > >> >> >> >> >> >> 3. ntw.c > >> >> >> >> >> >> 4. PORTMOD > >> >> >> >> >> >> > >> >> >> >> >> >> This mod allows a person to set the port to run the server > >> >> >> >> >> >> on > >> >> >> >> >> >> by > >> >> >> >> >> >> using > >> >> >> >> >> >> the > >> >> >> >> >> >> following syntax: > >> >> >> >> >> >> serverprogram -p port > >> >> >> >> >> >> > >> >> >> >> >> >> ie, ntwserver -p 1024 > >> >> >> >> >> >> > >> >> >> >> >> >> I would also put in the documentation to remove -DDEBUG > >> >> >> >> >> >> from > >> >> >> >> >> >> the > >> >> >> >> >> >> Makefile > >> >> >> >> >> >> if > >> >> >> >> >> >> the person running ntw wishes to run the server as a > >> >> >> >> >> >> forking > >> >> >> >> >> >> server. > >> >> >> >> >> >> :) > >> >> >> >> >> >> > >> >> >> >> >> >> These files were modded from the ntw-0.3 release. > >> >> >> >> >> >> > >> >> >> >> >> >> Yua Ca Van > >> >> >> >> >> >> > >> >> >> >> >> >> This transmission many contain information that is > >> >> >> >> >> >> privileged, > >> >> >> >> >> >> confidential > >> >> >> >> >> >> and exempt from disclosure under applicable law. If you > >> >> >> >> >> >> are > >> >> >> >> >> >> not > >> >> >> >> >> >> the > >> >> >> >> >> >> intended > >> >> >> >> >> >> recipient, you are hereby notified that any disclosure, > >> >> >> >> >> >> copying, > >> >> >> >> >> >> distribution or use of the information contained herein > >> >> >> >> >> >> (including > >> >> >> >> >> >> any > >> >> >> >> >> >> reliance thereon) is STRICTLY PROHIBITED. If you received > >> >> >> >> >> >> this > >> >> >> >> >> >> transmission > >> >> >> >> >> >> in error, please immediately contact the sender and > >> >> >> >> >> >> destroy > >> >> >> >> >> >> the > >> >> >> >> >> >> material > >> >> >> >> >> >> in > >> >> >> >> >> >> its entirety, whether in electronic or hard copy format. > >> >> >> >> >> >> <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> > >> >> >> >> >> >> > >> >> >> >> >> >> > >> >> >> >> >> >> > >> >> >> >> >> > > >> >> >> >> >> > > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >> >> >> >> > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > >> >> > >> >> > >> > > >> > > >> > >> > >> > > > > > > > |
From: Yua C. <ca...@gz...> - 2006-06-23 18:13:13
|
My main problem is trying to fit this into the current framework ( less work overall, but more thinking. :)) ) Right now, it's easy enough to create a timer id using g_timeout_add(interval, callback fn, data) where: 1. interval is set by the user 2. callback fn could be the sync/async _event_handler 3. data is NULL ( since it's just a timer ) If we were to use sync/async _event_handler, we would need to make the widget a "real" widget somehow with real events and such. ie, event_send(wt->address, TRUE/FALSE, eventid, NULL, 0); where wt ( the Widget Table ) address points to a "real" widget somewhere and eventid is some int32. Any clues? Yua Ca Van ----- Original Message ----- From: "Ian Larsen" <dr...@gm...> To: "Yua CaVan" <ca...@gz...> Cc: <ntw...@li...> Sent: Thursday, June 22, 2006 7:24 PM Subject: Re: NTW mod for setting port value using -p > Sorry, wrong link. > > Take a look at g_timeout_add. That's the new way to add a timed event > to the main event loop, and has a callback. > > -Ian > > > On 6/22/06, Yua CaVan <ca...@gz...> wrote: >> I don't know if I'm a fan of the g_timer_* stuff. There aren't any >> callbacks and we have to explicitly check each timer value. >> >> Yua Ca Van >> ----- Original Message ----- >> From: "Ian Larsen" <dr...@gm...> >> To: "Yua CaVan" <ca...@gz...> >> Cc: <ntw...@li...> >> Sent: Thursday, June 22, 2006 4:59 PM >> Subject: Re: NTW mod for setting port value using -p >> >> >> > That looks about right, >> > >> > It's really not any different than many of the widgets that have >> > "default" events associated with them, like the text entry widget. >> > Everytime the text of an entry widget changes, an event is fired and >> > the new text is sent to the server. >> > >> > So the timer wouldn't require any special handling. The glib timer >> > functions make it all pretty simple. (These have been moved from GTK >> > to GLib) >> > >> > http://www.gtk.org/api/2.6/glib/glib-Timers.html >> > >> > -Ian >> > >> > >> > >> > >> > >> > >> > On 6/22/06, Yua CaVan <ca...@gz...> wrote: >> >> I've thought about this some... if we were to do the timer >> >> client-side, >> >> we >> >> would need to write up a special timer function to send a request to >> >> the >> >> server to run the callback function, am I right? >> >> >> >> ie... >> >> [ client side timer widget ] >> >> struct __timerData { >> >> GtkFunction * cbFn; >> >> gpointer * cbData; >> >> } timerData; >> >> >> >> timerData td; >> >> >> >> function run_timer_callback(gpointer * data) { >> >> /* >> >> * Send request back to server to run the callback function >> >> */ >> >> } >> >> >> >> function make_timer_widget(ntwWidget* widget, gint timeout, >> >> GtkFunction * >> >> callback, gpointer * data) { >> >> td.cbFn = callback; >> >> td.cbData = data; >> >> >> >> widget = gtk_timeout_add(timeout, (GtkFunction*)run_timer_callback, >> >> (gpointer*)&td); >> >> // add this widget to the widget table >> >> } >> >> ----- Original Message ----- >> >> From: "Ian Larsen" <dr...@gm...> >> >> To: "Yua CaVan" <ca...@gz...> >> >> Sent: Monday, June 19, 2006 5:00 PM >> >> Subject: Re: NTW mod for setting port value using -p >> >> >> >> >> >> > I'll keep that in mind. What do you think of having the timer stop >> >> > automatically, and only start again when the server issues a >> >> > "restart" >> >> > message? That way a server wouldn't get bogged down with unhandled >> >> > timer messages. >> >> > >> >> > -Ian >> >> > >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: >> >> >> sounds like a plan. :) I haven't used timers under GTK or QT, but >> >> >> if >> >> >> there's already an implementation, then it's silly not to use it. >> >> >> :) >> >> >> >> >> >> I still think that it'd be a good idea to supply the "stop timer" >> >> >> and >> >> >> "change timeout" messages so the client can stop and/or change >> >> >> timeout >> >> >> values. ie, very time intensive code would require a "stop timer" >> >> >> to >> >> >> be >> >> >> issued until completion of the task. That's my normal >> >> >> modus-operendus >> >> >> when >> >> >> doing async timeouts. After the task is completed, I restart the >> >> >> timer. >> >> >> >> >> >> Sometimes, you may want to change the timeouts... ie, if this is an >> >> >> email >> >> >> application, the user may want the option to change the frequency >> >> >> in >> >> >> which >> >> >> s/he grabs email from the mail server. >> >> >> >> >> >> Yua Ca Van >> >> >> ----- Original Message ----- >> >> >> From: "Ian Larsen" <dr...@gm...> >> >> >> To: "Yua CaVan" <ca...@gz...> >> >> >> Sent: Monday, June 19, 2006 4:45 PM >> >> >> Subject: Re: NTW mod for setting port value using -p >> >> >> >> >> >> >> >> >> > Originally, my thought was to do the timer as a server side >> >> >> > widget >> >> >> > like that, but I thought it might be better to have a client side >> >> >> > timer, that sends an event to the server. >> >> >> > >> >> >> > The reasons are that properly handling multiple timers on a >> >> >> > multithreaded server serving many clients is hard. Also, with >> >> >> > the >> >> >> > network latency being a factor, I don't think the millisecond >> >> >> > latency >> >> >> > would ever be necessary. Finally, I'm sure there are some >> >> >> > programming >> >> >> > languages where supporting timer interrupts would be non-trivial >> >> >> > or >> >> >> > impossible. (The Common Lisp server uses a select-based event >> >> >> > loop >> >> >> > to >> >> >> > distribute processing among clients, a timer would be very >> >> >> > difficult >> >> >> > to do there.) >> >> >> > >> >> >> > Since GTK and QT both have timers already, I thought that a >> >> >> > client-side timer widget would be extremely easy to implement, >> >> >> > wouldn't complicate the server at all, and would be usable by any >> >> >> > programming language. It would simply send a "NTW_TIMEOUT" event >> >> >> > at >> >> >> > a >> >> >> > specified interval. That way, all servers could handle that >> >> >> > event >> >> >> > with a callback as with any other event. >> >> >> > >> >> >> > Let me know if I'm missing something. >> >> >> > >> >> >> > -Ian >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: >> >> >> >> lol. I was just thinking about that as well. :) >> >> >> >> >> >> >> >> The primary concern for a Timer widget is threading. PThreads >> >> >> >> should >> >> >> >> work >> >> >> >> under all OSes. >> >> >> >> The Timer Widget could be created with the timeout in >> >> >> >> milliseconds >> >> >> >> and >> >> >> >> you >> >> >> >> can add a callback via ntw_add_callback(), ie: >> >> >> >> >> >> >> >> ntwWidget * timer1; >> >> >> >> ntwWidget * timer1Timeout; >> >> >> >> >> >> >> >> timer1 = ntw_timer_new(1000); >> >> >> >> ntw_add_callback(timer1, TIMER_EVENT, (func_ptr)&timer_ping, >> >> >> >> timer, >> >> >> >> ASYNC); >> >> >> >> >> >> >> >> the Timer widget could have pause() and set() functions to stop >> >> >> >> the >> >> >> >> timer >> >> >> >> and to change the timeout. >> >> >> >> >> >> >> >> What do you think? >> >> >> >> ----- Original Message ----- >> >> >> >> From: "Ian Larsen" <dr...@gm...> >> >> >> >> To: "Yua CaVan" <ca...@gz...> >> >> >> >> Sent: Monday, June 19, 2006 4:03 PM >> >> >> >> Subject: Re: NTW mod for setting port value using -p >> >> >> >> >> >> >> >> >> >> >> >> > Yua, >> >> >> >> > >> >> >> >> > Thanks for the kind words. The file upload and download would >> >> >> >> > be >> >> >> >> > a >> >> >> >> > great addition. The reason it's not in there already is >> >> >> >> > because >> >> >> >> > I >> >> >> >> > figured it would be a security issue and didn't want to deal >> >> >> >> > with >> >> >> >> > that >> >> >> >> > until I had plenty of time. But it wouldn't be hard to do at >> >> >> >> > all -- >> >> >> >> > the buffered images would be a good starting point, as they >> >> >> >> > save >> >> >> >> > to >> >> >> >> > disk on the client side already. >> >> >> >> > >> >> >> >> > But as for going beta, the only other thing I'd really like to >> >> >> >> > add >> >> >> >> > is >> >> >> >> > a timer widget that would cause an event every N seconds. >> >> >> >> > >> >> >> >> > -Ian >> >> >> >> > >> >> >> >> > >> >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: >> >> >> >> >> No problem, Ian. Just happened to notice that a network >> >> >> >> >> framework >> >> >> >> >> is >> >> >> >> >> kinda >> >> >> >> >> useless if people aren't able to specify which port they can >> >> >> >> >> run >> >> >> >> >> their >> >> >> >> >> servers on. ;) >> >> >> >> >> >> >> >> >> >> btw, I totally LOVE this framework. :) >> >> >> >> >> >> >> >> >> >> I would like to see how we could implement file upload ( >> >> >> >> >> loading >> >> >> >> >> files >> >> >> >> >> to >> >> >> >> >> work on, if someone were to write a word processor ) and file >> >> >> >> >> download >> >> >> >> >> ( >> >> >> >> >> saving files as in the afforementioned word processor ). At >> >> >> >> >> that >> >> >> >> >> point, >> >> >> >> >> the >> >> >> >> >> framework could very easily go Beta and you could have MS >> >> >> >> >> buying >> >> >> >> >> this >> >> >> >> >> widget >> >> >> >> >> system from you. lol. J/K! :D >> >> >> >> >> >> >> >> >> >> Yua Ca Van >> >> >> >> >> ----- Original Message ----- >> >> >> >> >> From: "Ian Larsen" <dr...@gm...> >> >> >> >> >> To: "Yua CaVan" <ca...@gz...> >> >> >> >> >> Sent: Monday, June 19, 2006 2:59 PM >> >> >> >> >> Subject: Re: NTW mod for setting port value using -p >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > Yua, >> >> >> >> >> > >> >> >> >> >> > Thank you very much for the patch. I'll put it in and >> >> >> >> >> > alter >> >> >> >> >> > the >> >> >> >> >> > documentation as you recomended. >> >> >> >> >> > >> >> >> >> >> > Thanks again, >> >> >> >> >> > Ian Larsen >> >> >> >> >> > >> >> >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: >> >> >> >> >> >> Please find attached: >> >> >> >> >> >> 1. ntw_port_mod.tgz >> >> >> >> >> >> >> >> >> >> >> >> This tar-gzipped file contains 4 files: >> >> >> >> >> >> 1. network.h >> >> >> >> >> >> 2. network.c >> >> >> >> >> >> 3. ntw.c >> >> >> >> >> >> 4. PORTMOD >> >> >> >> >> >> >> >> >> >> >> >> This mod allows a person to set the port to run the server >> >> >> >> >> >> on >> >> >> >> >> >> by >> >> >> >> >> >> using >> >> >> >> >> >> the >> >> >> >> >> >> following syntax: >> >> >> >> >> >> serverprogram -p port >> >> >> >> >> >> >> >> >> >> >> >> ie, ntwserver -p 1024 >> >> >> >> >> >> >> >> >> >> >> >> I would also put in the documentation to remove -DDEBUG >> >> >> >> >> >> from >> >> >> >> >> >> the >> >> >> >> >> >> Makefile >> >> >> >> >> >> if >> >> >> >> >> >> the person running ntw wishes to run the server as a >> >> >> >> >> >> forking >> >> >> >> >> >> server. >> >> >> >> >> >> :) >> >> >> >> >> >> >> >> >> >> >> >> These files were modded from the ntw-0.3 release. >> >> >> >> >> >> >> >> >> >> >> >> Yua Ca Van >> >> >> >> >> >> >> >> >> >> >> >> This transmission many contain information that is >> >> >> >> >> >> privileged, >> >> >> >> >> >> confidential >> >> >> >> >> >> and exempt from disclosure under applicable law. If you >> >> >> >> >> >> are >> >> >> >> >> >> not >> >> >> >> >> >> the >> >> >> >> >> >> intended >> >> >> >> >> >> recipient, you are hereby notified that any disclosure, >> >> >> >> >> >> copying, >> >> >> >> >> >> distribution or use of the information contained herein >> >> >> >> >> >> (including >> >> >> >> >> >> any >> >> >> >> >> >> reliance thereon) is STRICTLY PROHIBITED. If you received >> >> >> >> >> >> this >> >> >> >> >> >> transmission >> >> >> >> >> >> in error, please immediately contact the sender and >> >> >> >> >> >> destroy >> >> >> >> >> >> the >> >> >> >> >> >> material >> >> >> >> >> >> in >> >> >> >> >> >> its entirety, whether in electronic or hard copy format. >> >> >> >> >> >> <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> >> >> >> >> >> >> >> >> > >> >> > >> >> >> >> >> >> >> > >> > >> >> >> > > |
From: Ian L. <dr...@gm...> - 2006-06-23 00:24:11
|
Sorry, wrong link. Take a look at g_timeout_add. That's the new way to add a timed event to the main event loop, and has a callback. -Ian On 6/22/06, Yua CaVan <ca...@gz...> wrote: > I don't know if I'm a fan of the g_timer_* stuff. There aren't any > callbacks and we have to explicitly check each timer value. > > Yua Ca Van > ----- Original Message ----- > From: "Ian Larsen" <dr...@gm...> > To: "Yua CaVan" <ca...@gz...> > Cc: <ntw...@li...> > Sent: Thursday, June 22, 2006 4:59 PM > Subject: Re: NTW mod for setting port value using -p > > > > That looks about right, > > > > It's really not any different than many of the widgets that have > > "default" events associated with them, like the text entry widget. > > Everytime the text of an entry widget changes, an event is fired and > > the new text is sent to the server. > > > > So the timer wouldn't require any special handling. The glib timer > > functions make it all pretty simple. (These have been moved from GTK > > to GLib) > > > > http://www.gtk.org/api/2.6/glib/glib-Timers.html > > > > -Ian > > > > > > > > > > > > > > On 6/22/06, Yua CaVan <ca...@gz...> wrote: > >> I've thought about this some... if we were to do the timer client-side, > >> we > >> would need to write up a special timer function to send a request to the > >> server to run the callback function, am I right? > >> > >> ie... > >> [ client side timer widget ] > >> struct __timerData { > >> GtkFunction * cbFn; > >> gpointer * cbData; > >> } timerData; > >> > >> timerData td; > >> > >> function run_timer_callback(gpointer * data) { > >> /* > >> * Send request back to server to run the callback function > >> */ > >> } > >> > >> function make_timer_widget(ntwWidget* widget, gint timeout, GtkFunction * > >> callback, gpointer * data) { > >> td.cbFn = callback; > >> td.cbData = data; > >> > >> widget = gtk_timeout_add(timeout, (GtkFunction*)run_timer_callback, > >> (gpointer*)&td); > >> // add this widget to the widget table > >> } > >> ----- Original Message ----- > >> From: "Ian Larsen" <dr...@gm...> > >> To: "Yua CaVan" <ca...@gz...> > >> Sent: Monday, June 19, 2006 5:00 PM > >> Subject: Re: NTW mod for setting port value using -p > >> > >> > >> > I'll keep that in mind. What do you think of having the timer stop > >> > automatically, and only start again when the server issues a "restart" > >> > message? That way a server wouldn't get bogged down with unhandled > >> > timer messages. > >> > > >> > -Ian > >> > > >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> sounds like a plan. :) I haven't used timers under GTK or QT, but if > >> >> there's already an implementation, then it's silly not to use it. :) > >> >> > >> >> I still think that it'd be a good idea to supply the "stop timer" and > >> >> "change timeout" messages so the client can stop and/or change timeout > >> >> values. ie, very time intensive code would require a "stop timer" to > >> >> be > >> >> issued until completion of the task. That's my normal modus-operendus > >> >> when > >> >> doing async timeouts. After the task is completed, I restart the > >> >> timer. > >> >> > >> >> Sometimes, you may want to change the timeouts... ie, if this is an > >> >> email > >> >> application, the user may want the option to change the frequency in > >> >> which > >> >> s/he grabs email from the mail server. > >> >> > >> >> Yua Ca Van > >> >> ----- Original Message ----- > >> >> From: "Ian Larsen" <dr...@gm...> > >> >> To: "Yua CaVan" <ca...@gz...> > >> >> Sent: Monday, June 19, 2006 4:45 PM > >> >> Subject: Re: NTW mod for setting port value using -p > >> >> > >> >> > >> >> > Originally, my thought was to do the timer as a server side widget > >> >> > like that, but I thought it might be better to have a client side > >> >> > timer, that sends an event to the server. > >> >> > > >> >> > The reasons are that properly handling multiple timers on a > >> >> > multithreaded server serving many clients is hard. Also, with the > >> >> > network latency being a factor, I don't think the millisecond > >> >> > latency > >> >> > would ever be necessary. Finally, I'm sure there are some > >> >> > programming > >> >> > languages where supporting timer interrupts would be non-trivial or > >> >> > impossible. (The Common Lisp server uses a select-based event loop > >> >> > to > >> >> > distribute processing among clients, a timer would be very difficult > >> >> > to do there.) > >> >> > > >> >> > Since GTK and QT both have timers already, I thought that a > >> >> > client-side timer widget would be extremely easy to implement, > >> >> > wouldn't complicate the server at all, and would be usable by any > >> >> > programming language. It would simply send a "NTW_TIMEOUT" event at > >> >> > a > >> >> > specified interval. That way, all servers could handle that event > >> >> > with a callback as with any other event. > >> >> > > >> >> > Let me know if I'm missing something. > >> >> > > >> >> > -Ian > >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> >> lol. I was just thinking about that as well. :) > >> >> >> > >> >> >> The primary concern for a Timer widget is threading. PThreads > >> >> >> should > >> >> >> work > >> >> >> under all OSes. > >> >> >> The Timer Widget could be created with the timeout in milliseconds > >> >> >> and > >> >> >> you > >> >> >> can add a callback via ntw_add_callback(), ie: > >> >> >> > >> >> >> ntwWidget * timer1; > >> >> >> ntwWidget * timer1Timeout; > >> >> >> > >> >> >> timer1 = ntw_timer_new(1000); > >> >> >> ntw_add_callback(timer1, TIMER_EVENT, (func_ptr)&timer_ping, timer, > >> >> >> ASYNC); > >> >> >> > >> >> >> the Timer widget could have pause() and set() functions to stop the > >> >> >> timer > >> >> >> and to change the timeout. > >> >> >> > >> >> >> What do you think? > >> >> >> ----- Original Message ----- > >> >> >> From: "Ian Larsen" <dr...@gm...> > >> >> >> To: "Yua CaVan" <ca...@gz...> > >> >> >> Sent: Monday, June 19, 2006 4:03 PM > >> >> >> Subject: Re: NTW mod for setting port value using -p > >> >> >> > >> >> >> > >> >> >> > Yua, > >> >> >> > > >> >> >> > Thanks for the kind words. The file upload and download would be > >> >> >> > a > >> >> >> > great addition. The reason it's not in there already is because > >> >> >> > I > >> >> >> > figured it would be a security issue and didn't want to deal with > >> >> >> > that > >> >> >> > until I had plenty of time. But it wouldn't be hard to do at > >> >> >> > all -- > >> >> >> > the buffered images would be a good starting point, as they save > >> >> >> > to > >> >> >> > disk on the client side already. > >> >> >> > > >> >> >> > But as for going beta, the only other thing I'd really like to > >> >> >> > add > >> >> >> > is > >> >> >> > a timer widget that would cause an event every N seconds. > >> >> >> > > >> >> >> > -Ian > >> >> >> > > >> >> >> > > >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> >> >> No problem, Ian. Just happened to notice that a network > >> >> >> >> framework > >> >> >> >> is > >> >> >> >> kinda > >> >> >> >> useless if people aren't able to specify which port they can run > >> >> >> >> their > >> >> >> >> servers on. ;) > >> >> >> >> > >> >> >> >> btw, I totally LOVE this framework. :) > >> >> >> >> > >> >> >> >> I would like to see how we could implement file upload ( loading > >> >> >> >> files > >> >> >> >> to > >> >> >> >> work on, if someone were to write a word processor ) and file > >> >> >> >> download > >> >> >> >> ( > >> >> >> >> saving files as in the afforementioned word processor ). At > >> >> >> >> that > >> >> >> >> point, > >> >> >> >> the > >> >> >> >> framework could very easily go Beta and you could have MS buying > >> >> >> >> this > >> >> >> >> widget > >> >> >> >> system from you. lol. J/K! :D > >> >> >> >> > >> >> >> >> Yua Ca Van > >> >> >> >> ----- Original Message ----- > >> >> >> >> From: "Ian Larsen" <dr...@gm...> > >> >> >> >> To: "Yua CaVan" <ca...@gz...> > >> >> >> >> Sent: Monday, June 19, 2006 2:59 PM > >> >> >> >> Subject: Re: NTW mod for setting port value using -p > >> >> >> >> > >> >> >> >> > >> >> >> >> > Yua, > >> >> >> >> > > >> >> >> >> > Thank you very much for the patch. I'll put it in and alter > >> >> >> >> > the > >> >> >> >> > documentation as you recomended. > >> >> >> >> > > >> >> >> >> > Thanks again, > >> >> >> >> > Ian Larsen > >> >> >> >> > > >> >> >> >> > On 6/19/06, Yua CaVan <ca...@gz...> wrote: > >> >> >> >> >> Please find attached: > >> >> >> >> >> 1. ntw_port_mod.tgz > >> >> >> >> >> > >> >> >> >> >> This tar-gzipped file contains 4 files: > >> >> >> >> >> 1. network.h > >> >> >> >> >> 2. network.c > >> >> >> >> >> 3. ntw.c > >> >> >> >> >> 4. PORTMOD > >> >> >> >> >> > >> >> >> >> >> This mod allows a person to set the port to run the server on > >> >> >> >> >> by > >> >> >> >> >> using > >> >> >> >> >> the > >> >> >> >> >> following syntax: > >> >> >> >> >> serverprogram -p port > >> >> >> >> >> > >> >> >> >> >> ie, ntwserver -p 1024 > >> >> >> >> >> > >> >> >> >> >> I would also put in the documentation to remove -DDEBUG from > >> >> >> >> >> the > >> >> >> >> >> Makefile > >> >> >> >> >> if > >> >> >> >> >> the person running ntw wishes to run the server as a forking > >> >> >> >> >> server. > >> >> >> >> >> :) > >> >> >> >> >> > >> >> >> >> >> These files were modded from the ntw-0.3 release. > >> >> >> >> >> > >> >> >> >> >> Yua Ca Van > >> >> >> >> >> > >> >> >> >> >> This transmission many contain information that is > >> >> >> >> >> privileged, > >> >> >> >> >> confidential > >> >> >> >> >> and exempt from disclosure under applicable law. If you are > >> >> >> >> >> not > >> >> >> >> >> the > >> >> >> >> >> intended > >> >> >> >> >> recipient, you are hereby notified that any disclosure, > >> >> >> >> >> copying, > >> >> >> >> >> distribution or use of the information contained herein > >> >> >> >> >> (including > >> >> >> >> >> any > >> >> >> >> >> reliance thereon) is STRICTLY PROHIBITED. If you received > >> >> >> >> >> this > >> >> >> >> >> transmission > >> >> >> >> >> in error, please immediately contact the sender and destroy > >> >> >> >> >> the > >> >> >> >> >> material > >> >> >> >> >> in > >> >> >> >> >> its entirety, whether in electronic or hard copy format. > >> >> >> >> >> <----- GZ Link, Inc. (c) 2006 All Rights Reserved ------> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > >> >> >> >> > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > >> >> > >> >> > >> > > >> > > >> > >> > >> > > > > > > > |