Timestamps are in GMT/BST.
| 00:16:32 | | Fordcars Quit (Ping timeout: 245 seconds) |
| 00:55:49 | | Watusimoto Quit (Ping timeout: 264 seconds) |
| 07:06:45 | | kodaws has joined |
| 07:14:44 | | kodaws Quit (Ping timeout: 240 seconds) |
| 07:52:31 | | kodaws has joined |
| 08:40:59 | | kodaws Quit (Read error: Connection reset by peer) |
| 09:06:03 | | watusimoto has joined |
| 09:06:03 | | ChanServ sets mode +o watusimoto |
| 10:39:38 | | sam686 Quit (Ping timeout: 245 seconds) |
| 10:41:18 | | sam686 has joined |
| 10:41:18 | | ChanServ sets mode +v sam686 |
| 10:48:18 | | sam686 Quit (Ping timeout: 245 seconds) |
| 10:49:43 | | LordDVG has joined |
| 10:54:59 | | LordDVG Quit (Remote host closed the connection) |
| 11:09:36 | | Martinski has joined |
| 11:11:45 | Martinski | hello guys :) |
| 12:39:56 | | Darrel has joined |
| 13:06:56 | | Darrel_ has joined |
| 13:06:56 | | Darrel Quit (Read error: Connection reset by peer) |
| 13:32:39 | | Darrel_ Quit (Read error: Connection reset by peer) |
| 13:32:56 | | Darrel_ has joined |
| 13:36:28 | | Darrel_ is now known as Darrel |
| 13:49:29 | Martinski | hi |
| 14:22:48 | | Darrel Quit (Read error: Connection reset by peer) |
| 14:53:18 | watusimoto | hi |
| 14:53:43 | watusimoto | just fyi -- I will be out most of the evening... so if you don't hear from me, don't feel bad :-) |
| 14:55:48 | Martinski | watusimoto here now ? |
| 15:02:08 | Martinski | I'm having a bit problems with this toastbox |
| 15:02:16 | Martinski | because it has different events on which depends the popup itself |
| 15:02:24 | Martinski | and I want to say when to start the popup |
| 15:41:16 | Martinski | that's very hard |
| 15:41:25 | Martinski | the popup shows only on mouseclick |
| 15:41:40 | Martinski | and I can't understand how to show it when I want in the code ... |
| 15:42:17 | watusimoto | sorry, here and there |
| 15:42:32 | Martinski | ? |
| 15:42:46 | watusimoto | so you want to know how to trigger it manually? |
| 15:43:39 | watusimoto | The sample here: |
| 15:43:39 | watusimoto | http://xoomer.virgilio.it/infinity77/AGW_Docs/toasterbox_module.html |
| 15:43:49 | watusimoto | shows it being triggered with wx.CallLater |
| 15:44:06 | watusimoto | I imagine there must be a wx.Call or some more immediate way to trigger it |
| 15:44:08 | Martinski | I'm using different sample |
| 15:44:12 | Martinski | second |
| 15:44:17 | Martinski | I'll show you |
| 15:45:21 | watusimoto | ok, but I think this is just a question of finding the right wx call to launch the thing |
| 15:47:02 | Martinski | https://bitbucket.org/driscollis/mousevspython/src/200d057d054e/wxpython_by_example/AGW%20Series/toaster.py |
| 15:47:04 | Martinski | take a look at this |
| 15:47:12 | Martinski | in Bind |
| 15:47:25 | Martinski | the event is a button |
| 15:50:28 | watusimoto | I'd get rid of that; what about calling tb.Play() when you are ready to display the thing? |
| 15:51:04 | watusimoto | you do your processing of the json, decide you need to popup, create the display, and "play" it |
| 15:53:44 | Martinski | I'll try |
| 15:53:50 | Martinski | to get the tbPlay out of the class |
| 15:53:56 | Martinski | and to run it when I want |
| 15:54:01 | Martinski | but the problem is that |
| 15:54:03 | Martinski | there are some |
| 15:54:12 | Martinski | MainLoop() |
| 15:54:17 | Martinski | and stuff which are very complicated |
| 15:54:30 | Martinski | and the execution of onButton isn,t very clear |
| 15:54:41 | watusimoto | you have your main loop which checks the json from time to time |
| 15:54:50 | Martinski | nono |
| 15:54:52 | Martinski | MainLoop() |
| 15:55:04 | Martinski | is some kind of part of wx.PySimpleApp() |
| 15:55:18 | watusimoto | ah, ok, probably some sort of event listenting thingy? |
| 15:56:15 | Martinski | I read lots of things about those events |
| 15:56:19 | Martinski | but it's a total mess :D |
| 15:56:19 | watusimoto | ok, maybe I see how this works |
| 15:56:27 | watusimoto | app.MainLoop takes control of everything |
| 15:56:38 | watusimoto | you set up your listeners, then let mainLoop run |
| 15:56:45 | watusimoto | is that more or less correct? |
| 15:56:53 | Martinski | I think that's correct |
| 15:57:00 | watusimoto | ok, so you need some sort of timer event |
| 15:57:13 | watusimoto | that you can use to check the json every, say, 5 seconds |
| 15:57:19 | watusimoto | (or whatever) |
| 15:57:29 | Martinski | I would say some kind of boolean event handler |
| 15:57:32 | Martinski | if it's true |
| 15:57:34 | Martinski | display something |
| 15:57:37 | Martinski | if now - don;t popup |
| 15:57:40 | Martinski | don't* |
| 15:57:46 | watusimoto | right, but you only display something if json changes |
| 15:57:54 | Martinski | exactly |
| 15:58:04 | watusimoto | so I would see if there is a timer event |
| 15:58:16 | watusimoto | when that event triggers, you reset the timer, and check the json |
| 15:58:27 | Martinski | http://docs.wxwidgets.org/trunk/classwx_timer_event.html |
| 15:58:31 | Martinski | there is something like that |
| 15:58:36 | watusimoto | if the json has changed, you run the play method on your toaster |
| 15:58:40 | Martinski | but I can't understand a bit of this :( |
| 15:59:21 | watusimoto | Try using that code as is, with a print statement in the onTimer() method |
| 15:59:34 | watusimoto | every 10 seconds a message should be printed |
| 16:00:14 | watusimoto | well, add that to your code that has the MainLoop in it |
| 16:00:18 | Martinski | you mean, to try the code |
| 16:00:23 | Martinski | in a different file |
| 16:00:25 | Martinski | just this one ? |
| 16:00:33 | watusimoto | I'd try it in your existing code |
| 16:00:43 | watusimoto | in either case you'll need a mainloop somewhere |
| 16:00:45 | Martinski | in the parsing code ? |
| 16:00:48 | watusimoto | no |
| 16:01:04 | Martinski | in the popup code ? |
| 16:01:17 | watusimoto | so the code you showed me before had something that set up an event listener that responded when a button was clicked |
| 16:01:28 | Martinski | yes |
| 16:01:40 | Martinski | oh, that's c++ code |
| 16:01:40 | Martinski | :D |
| 16:02:01 | watusimoto | I feel like an idiot |
| 16:02:05 | Martinski | me too :D |
| 16:02:28 | watusimoto | but the principle still holds |
| 16:02:38 | Martinski | http://wiki.wxpython.org/Timer |
| 16:02:38 | Martinski | here |
| 16:02:41 | Martinski | this is the python one |
| 16:02:46 | watusimoto | instead of a button click listener, you want to have a timer-went-off listener |
| 16:03:00 | watusimoto | http://www.blog.pythonlibrary.org/2009/08/25/wxpython-using-wx-timers/ |
| 16:03:11 | watusimoto | a stand alone prog that uses timers |
| 16:03:12 | Martinski | ok for example |
| 16:03:15 | Martinski | 5 seconds passed |
| 16:03:20 | Martinski | and then the event is triggered |
| 16:03:26 | Martinski | but I don't want to display the popup |
| 16:03:29 | watusimoto | no |
| 16:03:30 | Martinski | because there are no new players |
| 16:03:31 | watusimoto | yes |
| 16:03:33 | watusimoto | right |
| 16:03:45 | watusimoto | so the timer goes off after 5 seconds |
| 16:03:52 | watusimoto | then you go and fetch the json |
| 16:03:55 | watusimoto | then you parse it |
| 16:04:16 | watusimoto | then if you want to display the popup, you do it with the play method |
| 16:04:33 | watusimoto | then you reset the timer (if that's needed) and wait for another 5 secs to expire |
| 16:04:38 | watusimoto | repeat |
| 16:05:15 | Martinski | found this |
| 16:05:17 | Martinski | http://www.blog.pythonlibrary.org/2009/08/25/wxpython-using-wx-timers/ |
| 16:05:21 | Martinski | it's similar to my code |
| 16:05:32 | watusimoto | it's also the link I pasted at 05:03 :-) |
| 16:05:41 | Martinski | oh :D:D |
| 16:05:42 | Martinski | sorry ;d |
| 16:05:46 | watusimoto | no worries |
| 16:05:57 | watusimoto | that looks like it's at least a slightly relevant example |
| 16:06:27 | Martinski | I'll try to integrate it in the popup program and change the onButton function with the time function, so for example the popup shows every 5 sec |
| 16:06:36 | watusimoto | yes |
| 16:06:39 | Martinski | if that works, I'll have to make it just to show if there are changes |
| 16:06:44 | watusimoto | yes |
| 16:06:47 | watusimoto | exactly |
| 16:06:58 | Martinski | ok I am going to try again |
| 16:09:53 | Martinski | do you know what is going to be my Christmas wish ? |
| 16:09:53 | Martinski | :D |
| 16:10:50 | watusimoto | snow? |
| 16:10:54 | Martinski | popup = wx.PopupWindow() |
| 16:10:58 | Martinski | popup.trigger() |
| 16:10:58 | Martinski | :D |
| 16:11:04 | watusimoto | ha |
| 16:11:20 | Martinski | oh, we have snow now actually :D |
| 16:15:32 | watusimoto | I'm leaving in a couple of minutes for a few hours... any quick questions before I go? |
| 16:15:45 | Martinski | when will you be here :D |
| 16:15:58 | watusimoto | I'm guessing 10 or 11PM tonight |
| 16:16:05 | watusimoto | probably after your bedtime |
| 16:16:07 | watusimoto | :-) |
| 16:16:12 | Martinski | I'll wait because |
| 16:16:16 | Martinski | this is a mustdo |
| 16:16:16 | Martinski | :D |
| 16:16:21 | Martinski | and do you know if raptor |
| 16:16:22 | Martinski | will be here ? |
| 16:16:29 | watusimoto | he won't be |
| 16:16:47 | watusimoto | you're stuck with just me for a few days |
| 16:16:49 | Martinski | ok, I'll work and try to finish |
| 16:17:08 | Martinski | no problem, you'r enough helpful :) |
| 16:17:20 | watusimoto | ok; don't wait up too late for me. I'll read the irc logs when I can, so you can leave a msg for me here |
| 16:17:33 | Martinski | ok |
| 16:18:11 | Martinski | bye for now :) |
| 16:28:07 | watusimoto | bye |
| 16:32:38 | | watusimoto Quit (Ping timeout: 265 seconds) |
| 16:46:38 | Martinski | this is super confusing |
| 16:51:05 | Martinski | the problem is that is uses classes |
| 16:51:15 | Martinski | and I can't tell it when exactly to popup |
| 16:51:24 | Martinski | there is no control, because of the mainloop thing ... |
| 17:27:36 | | Watusimoto has joined |
| 17:50:29 | | Watusimoto Quit (Ping timeout: 260 seconds) |
| 17:57:21 | Martinski | ok, I have some progress |
| 17:57:29 | Martinski | put everything out of classes |
| 17:57:38 | Martinski | it's now much more simple looking |
| 17:57:48 | Martinski | and I just have to learn wx.Timer |
| 17:57:50 | Martinski | and how to use id |
| 17:57:52 | Martinski | it* |
| 17:59:49 | Martinski | to have a timer which every 5 seconds (for example) gets the info about new players and if there are any, popups the notification |
| 18:35:42 | Martinski | the problem is I can't understand how Timer works |
| 18:36:03 | Martinski | no information, super complicated and when I try to do timer.Start(1000) |
| 18:36:15 | Martinski | it doesn't wait 1000 mseconds |
| 18:36:22 | Martinski | just instantly runs everything ... |
| 19:07:35 | | Watusimoto has joined |
| 19:18:40 | Martinski | Watusimoto |
| 19:28:59 | Martinski | I think I am very close |
| 19:29:22 | Martinski | but I am desperate |
| 19:32:29 | Martinski | Can't make up with the timer stuff |
| 19:55:45 | | LordDVG has joined |
| 20:01:13 | | Watusimoto Quit (Ping timeout: 255 seconds) |
| 20:18:11 | | CrazyLinuxNerd Quit (Quit: Leaving) |
| 21:14:29 | | LordDVG Quit (Remote host closed the connection) |
| 21:19:47 | Martinski | Watusimoto I am going to bed now |
| 21:20:19 | Martinski | tomorrow I'll try to write you, maybe will change the tactics ;d |
| 21:20:24 | | Martinski Quit () |
| 21:28:14 | | koda has joined |
| 23:41:26 | | Watusimoto has joined |