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