[03:23] hey guys. is it possible to drag and drop onto a Calendar? i can't seem to get it working and the documentation mentions nothing [03:31] hey guys. is it possible to drag and drop onto a Calendar? i can't seem to get it working and the documentation mentions nothing [03:32] oops, that was a mistake! [03:32] sorry about that everyone. i'm going to move this terminal to a different workspace so i don't mistake it for my quickly run window [03:56] is there anything special i need to do to get drag and drop between two treeviews working? the documentation is pretty sparse [11:10] hello [11:11] QUESTION: is there any way I can get confirmation my application has been submitted successfully and is actually participating in the App Showdown contest? https://myapps.developer.ubuntu.com/dev/apps/1151/ [12:39] hey guys. i'm really struggling to get drag and drop between two different tree views working in python and gtk [12:40] it worked very sporadically, once or twice, and the drag_motion signals fire off. but other than that, nothing. it's like voodoo and i was just wondering if anyone had either some calm soothing words or knew some useful documentation (i can't seem to find much regarding treeview drag and drop, gtk3 and python) [12:58] Will123: I only needed drop myself (to drop files into an application), but I found the example on: http://python-gtk-3-tutorial.readthedocs.org/en/latest/drag_and_drop.html very useful. Run the example, modify and play. But again, I'm not the best to tell you. [12:59] sigurdga: did you use tree views at all? [12:59] they behave differently with drag and drop and need different function calls [13:00] by now (i didn't get much sleep last night!) i'm more familiar with those docs than the back of my own hand (although when drag and drop didn't work i did spend a lot of time looking at my hands and weeping, so you can understand exactly how familiar i am with the docs now) [13:03] Will123: Sorry. No. I didn't use treeviews. [13:05] Will123: But unfortunately, treeviews with drag and drop is also om my todo list. [13:09] sugurdga: feel free to share your ideas and progress with me [13:09] so far i've managed to get it working only once or twice (the destination tree view highlighted and showed lines where i could drop my dragged entries) [13:09] then at other times (even with the same code? hard to tell) nothing would happen at all [13:10] i've been dragged and dropped into a kind of GUI limbo [13:56] okay, so i can completely confirm that with the same code, sometimes drag and drop works and sometimes it doesn't [13:56] is there any possible thing that could be causing this behaviour? [16:49] hi all [16:50] I'd have a question concerning multiple Threads in a pygtk application, created from a quickly template [16:51] I started with the Hello world example, and added a button. I d like to run some code in a thread when the button is pressed. Thing is the thread doesn't run until the main frame has closed [16:54] The code is here : https://github.com/jlengrand/Ivolution/blob/master/ivolution/IvolutionWindow.py [17:47] hello.. can anyone tell me how to make an object move in 'quickly' app? [17:55] hello.. can anyone tell me how to make an object move in 'quickly' app? [17:56] is there anyone who is familiar with 'quickly' ? [17:56] please help me [19:43] Just discovered the app showdown a few hours ago [19:43] Will finish [19:43] Totally got this, I want my free tshirt [21:33] how strict will the jury be on allowing apps into the software centre, thus allowing me to receive my free tshirt? [22:00] SirSkidmore: they rejected my submission, Abused Dog Legion [22:01] apparently it wasn't novel enough and i just copied my idea from iOS [22:03] argh i just wasted half an hour debugging code because the gtk calendar gives you a date in terms of month counting from 0 and day counting from 1 [22:04] python was telling me that july the 6th (friday) was the third weekday [22:04] i thought i was actually going completely insane [22:06] I might not finish this app then [22:06] I was going to make a text-based RPG [22:06] haha [22:06] that's not novel in the slightest [22:08] SirSkidmore: i was just joking about Abused Dog Legion. :P i think a text-based RPG is a great idea [22:08] Since I started a few hours ago, I'm not sure how far I can get [22:08] infact i'd prefer to play a text-based RPG than level up in yet another RSS reader [22:08] I might have to make it "Episode 1" haha [22:09] I also learned Python today [22:09] So I'm moving at like the speed of light [22:09] I can imagine :P i was in more or less the same boat [22:09] i started thinking of ideas a week before the contest was announced, then i procrastinated for the first week (it was my birthday), then i learnt a bit of python in the second week, then i put it off for a bit, then I played around in glade [22:09] then I realised I had 3 days left [22:09] and I haven't slept since [22:11] SirSkidmore: what's the theme for your RPG? [22:11] Don't know yet [22:11] simply working on the engine [22:11] I have to figure out how to make save games :P [22:13] I'm worrying about saving and loading in my app too [22:13] there's only one kind of save file format you can create in 1 day [22:13] and that is a bad one [22:14] they recommend using sqlite [22:14] I have no idea how to use that [22:14] I'm screwed haha [22:15] but I want the tshirt :( [22:18] SirSkidmore: why do you need a save game ability? [22:18] what about an RPG that doesn't need to save [22:19] what about a randomly generated boss battle [22:19] you click a button and it dumps you into a fight [22:19] you're already a random level, with random gear, and a random heroic back story [22:19] Hmm [22:20] That could work [22:20] people don't play RPGs because they like going on long journeys and talking to boring NPCs, they do it to become a hero. this way you cut out the cruft [22:20] I need to get the engine to work haha [22:20] first, I mean [22:20] fair enough :P think of it like those chess puzzles [22:21] where you're presented with a few pieces in a specific configuration [22:24] I love those! [22:25] Will123: what are you using for an editor? [22:25] SirSkidmore: gedit [22:26] Will123: yeah, I went with vim, because that's what I used for Ruby [22:27] SirSkidmore: fancy :P i'm doing it ghetto style. that's guh-etto. like as in guh-nome. actually, no, wait that doesn't work [22:27] my project has been derailed at last minute because getting drag and drop to work with tree views is a dark and impossible art [22:28] so i'm having to make do with rubbish alternatives [22:28] i could almost taste that laptop [22:29] now its metallic tang and the sound of smooth plastic bumping against my teeth seem increasingly distant [22:29] (apparently there's going to be a "most melodramatic developer" prize after they've announced the real winners, so i'm gunning for that instead) [22:30] I just want a tshirt :P [22:30] I'm more of a Ruby guy haha [22:31] isn't ruby basically the same as python? i normally use java so as far as i'm concerned you both need more braces [22:33] ugh java [22:33] IT's kind of the same [22:35] i'm enjoying the way i can just get on with python [22:36] and say "iterate over these sorts of things" and it just does it [22:36] no endless describing of things [22:36] Yeah, Java annoys me to no end [22:36] it's not all bad. :P at least you can't trip up at runtime over silly typos [22:38] True [22:38] I have typos all over the place apparently haha [22:38] I miss having like an actual IDE, I have to admit [22:39] yeah me too. no auto complete is making remembering these arcane GTK constants a bit of a misery [22:39] incidentally using a very C-ish API sucks too [22:39] that said Swing was very java-ish and that's worse [22:40] are you not using glade? [22:40] Okay, so my engine kind of works now! :D [22:40] I am using glade, but i've had to resort to directly programming some parts of it [22:40] that's great! what does it do? [22:43] Right now? [22:43] not a whole lot [22:43] there's a bug, so you can only die or be killed after one turn [22:43] haha [22:43] I normally avoid WYSISWYG stuff, but for this weekend, it's a necessary evil [22:45] There's no caffeine in my house :( [22:45] yeah. i think it depends [22:45] for my main software project i'm writing the UI manually using openGL [22:45] Gtk is much better than swing but i don't like the undocumented C-like stuff [22:46] I can make a window with some buttons [22:46] haha [22:46] I'm not worried about GUI yet [22:47] Can I use this as my GUI? http://kivy.org/ [22:48] you can only use stuff that's in the repositories [22:48] Oh yeah [22:48] Ugh [22:48] haha [22:49] what about pygame? [22:50] though if it's text based [22:50] It'll be easy to do in glade w/ Gtk I think [22:52] btw, you'll definitely get a t-shirt if it has the cool 'ubuntu black toolbar' [22:52] http://askubuntu.com/questions/67362/what-is-the-black-header-widget-in-some-programs [22:52] I can totally do that :D [22:52] YESSSSS [22:54] SirSkidMore: by "definitely" i mean maybe. also, you can still have a Glade-created toolbar and make it black - just use the last two lines of the first answer, not all 3 lines [22:54] that's how i got mine black [22:54] I'm not running Unity, and using a non-defauly GTK theme, so mine isn't black :P [22:56] always the contrarian eh [22:56] Well, I really love Cinnamon (Mint's shell extension to GNOME 3), so that's what I'm currently using [22:59] what's so good about it? i've used mint before, but not since the cinnamon thing [23:00] I'm not using Mint, just Cinnamon [23:01] It looks like a sleeker GNOME 2 is all really [23:01] The java-ist in me wants to put every class into its own file [23:03] coming in late to comment things you said a few minutes ago: vim is nice with code completion and syntax checking (pyflakes) [23:03] I also run pep8 and occasionaly pylint [23:03] (but not on this project) [23:03] i'll have to look up pyflakes [23:04] Since I'm new to Python, what are the general accepted protocols for multiple files in one program? [23:04] i can see if I can find out which plugin connects to pyflakes [23:05] code completion is another one. only looks at open files in the same window. [23:05] SirSkidmore: that's what i've been doing, except for super small classes [23:05] Oh really? [23:05] huh [23:05] haha [23:05] I have a ton of classes all mushed into one spot [23:05] running pep8 on your code will probably tell if what you have is OK [23:06] it is fine to have more classes in one file, as long as it is meaningful [23:07] pylint complains too much, is my opininon (you have 10 public methods, only 8 is good for you) [23:07] and son on [23:07] -n [23:08] i totally forgot about public/private methods [23:08] does python have those, then? :P [23:08] This is my first day of Python coding haha [23:09] maybe syntastic is one of the vim plugins… I don't remember too much [23:10] now. off to sleep, maybe I get enough energy to have something to submit tomorrow. [23:11] see you sigurdga [23:14] well, I put everything in different files [23:14] but I've clearly done something wrong haha [23:20] SirSkidmore: i need your opinion on a screenshot I'm about to post [23:21] Go for it [23:21] http://www.locker101.co.uk/badideaorgoodidea.png [23:22] what do you think about putting the requirements before publishing in the title bar? i'm thinking it might be a terrible idea [23:24] Hmm [23:24] I'm not so sure about that.... [23:24] OKAY, question for you :P [23:24] so my game initializes in a file called rpg.py, mk? [23:25] I also have character.py, enemy.py, and player.py [23:25] can I just type import character, etc? [23:25] here's how it works [23:26] if you just do import character [23:26] then when you want to make a new character, you have to do [23:26] character = character.character() [23:26] How do I not have to do that? [23:26] haha [23:26] because it's a class called character inside the file character [23:26] erm, i think you do [23:26] from character import character [23:26] Oh [23:26] Okay [23:26] Lots of fixes to make now [23:27] so if you do from character import character, then you just need to do character = character() [23:28] btw, if you ever find yourself going insane [23:29] That broke all of my code [23:29] haha [23:29] you can check snippets of code by just firing up a python terminal [23:29] oh dear ;P [23:30] Well, I just found pydev plug-in for Eclipse [23:30] so I'm just going to use that [23:31] fair enough! [23:31] btw, quickly add dialogue [23:31] took me ages to find out about that [23:31] oh wait it's dialog :P [23:31] huh? [23:33] quickly add dialog (i think it's that) lets you easily create new dialog windows [23:37] Now it's telling me: AttributeError: 'module' object has no attribute 'Character' [23:37] but If I remove my Character = character.Character() [23:37] I get erros [23:38] errors [23:43] amd if I switch from Character = character.Character() to from character import Character [23:43] I get from character import Character [23:43] \Whoops [23:43] I get: ImportError: cannot import name Character [23:46] hold on [23:46] what's your class's name defined as [23:46] and what 's the file name? [23:47] okay, so Enemy 'extends' character [23:47] so I have enemy.py and character.py with the classes Enemy, and Character, respectively [23:47] in enemy.py [23:47] I have import character and then Character = character.Character() [23:49] and that doesn't work? bearing in mind that all my classes are capitalised. I have a Shift class, in Shift.py. and in my main program .py file I do import Shift and in the code, newShift = Shift.Shift() and it works fine [23:49] unfortunately i don't really know enough about python to instinctively figure out what's wrong there, sorry :( [23:49] Hmm [23:49] lemme mess around some more [23:52] I have no idea what's wrong at this point [23:52] you can post your code if you like. [23:52] like via pastebin? [23:53] yeah [23:55] (files are separated by comments) http://pastebin.com/Mprqn3eE [23:56] oh, yeah [23:56] when i said Character = Character.Character() [23:56] i meant that code creates a variable called Character [23:57] shit [23:57] duh [23:57] haha [23:57] and assigns to it a new object of class Character from the module (file) Character [23:57] i should have explained better :P [23:57] sorry dude, you spent all that time renaming things!