/srv/irclogs.ubuntu.com/2012/07/07/#ubuntu-app-devel.txt

Will123hey guys. is it possible to drag and drop onto a Calendar? i can't seem to get it working and the documentation mentions nothing03:23
Will123hey guys. is it possible to drag and drop onto a Calendar? i can't seem to get it working and the documentation mentions nothing03:31
Will123oops, that was a mistake!03:32
Will123sorry about that everyone. i'm going to move this terminal to a different workspace so i don't mistake it for my quickly run window03:32
Will123is there anything special i need to do to get drag and drop between two treeviews working? the documentation is pretty sparse03:56
peterlevihello11:10
peterleviQUESTION: 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
Will123hey guys. i'm really struggling to get drag and drop between two different tree views working in python and gtk12:39
Will123it 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
sigurdgaWill123: 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
Will123sigurdga: did you use tree views at all?12:59
Will123they behave differently with drag and drop and need different function calls12:59
Will123by 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
sigurdgaWill123: Sorry. No. I didn't use treeviews.13:03
sigurdgaWill123: But unfortunately, treeviews with drag and drop is also om my todo list.13:05
Will123sugurdga: feel free to share your ideas and progress with me13:09
Will123so 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
Will123then at other times (even with the same code? hard to tell) nothing would happen at all13:09
Will123i've been dragged and dropped into a kind of GUI limbo13:10
Will123okay, so i can completely confirm that with the same code, sometimes drag and drop works and sometimes it doesn't13:56
Will123is there any possible thing that could be causing this behaviour?13:56
jlengrandhi all16:49
jlengrandI'd have a question concerning multiple Threads in a pygtk application, created from a quickly template16:50
jlengrandI 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 closed16:51
jlengrandThe code is here : https://github.com/jlengrand/Ivolution/blob/master/ivolution/IvolutionWindow.py16:54
akshayhello.. can anyone tell me how to make an object move in 'quickly' app?17:47
akshayhello.. can anyone tell me how to make an object move in 'quickly' app?17:55
akshayis there anyone who is familiar with 'quickly' ?17:56
akshayplease help me17:56
SirSkidmoreJust discovered the app showdown a few hours ago19:43
SirSkidmoreWill finish19:43
SirSkidmoreTotally got this, I want my free tshirt19:43
SirSkidmorehow strict will the jury be on allowing apps into the software centre, thus allowing me to receive my free tshirt?21:33
Will123SirSkidmore: they rejected my submission, Abused Dog Legion22:00
Will123apparently it wasn't novel enough and i just copied my idea from iOS22:01
Will123argh 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 122:03
Will123python was telling me that july the 6th (friday) was the third weekday22:04
Will123i thought i was actually going completely insane22:04
SirSkidmoreI might not finish this app then22:06
SirSkidmoreI was going to make a text-based RPG22:06
SirSkidmorehaha22:06
SirSkidmorethat's not novel in the slightest22:06
Will123SirSkidmore: i was just joking about Abused Dog Legion. :P i think a text-based RPG is a great idea22:08
SirSkidmoreSince I started a few hours ago, I'm not sure how far I can get22:08
Will123infact i'd prefer to play a text-based RPG than level up in yet another RSS reader22:08
SirSkidmoreI might have to make it "Episode 1" haha22:08
SirSkidmoreI also learned Python today22:09
SirSkidmoreSo I'm moving at like the speed of light22:09
Will123I can imagine :P i was in more or less the same boat22:09
Will123i 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 glade22:09
Will123then I realised I had 3 days left22:09
Will123and I haven't slept since22:09
Will123SirSkidmore: what's the theme for your RPG?22:11
SirSkidmoreDon't know yet22:11
SirSkidmoresimply working on the engine22:11
SirSkidmoreI have to figure out how to make save games :P22:11
Will123I'm worrying about saving and loading in my app too22:13
Will123there's only one kind of save file format you can create in 1 day22:13
Will123and that is a bad one22:13
Will123they recommend using sqlite22:14
SirSkidmoreI have no idea how to use that22:14
SirSkidmoreI'm screwed haha22:14
SirSkidmorebut I want the tshirt :(22:15
Will123SirSkidmore: why do you need a save game ability?22:18
Will123what about an RPG that doesn't need to save22:18
Will123what about a randomly generated boss battle22:19
Will123you click a button and it dumps you into a fight22:19
Will123you're already a random level, with random gear, and a random heroic back story22:19
SirSkidmoreHmm22:19
SirSkidmoreThat could work22:20
Will123people 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 cruft22:20
SirSkidmoreI need to get the engine to work haha22:20
SirSkidmorefirst, I mean22:20
Will123fair enough :P think of it like those chess puzzles22:20
Will123where you're presented with a few pieces in a specific configuration22:21
SirSkidmoreI love those!22:24
SirSkidmoreWill123: what are you using for an editor?22:25
Will123SirSkidmore: gedit22:25
SirSkidmoreWill123: yeah, I went with vim, because that's what I used for Ruby22:26
Will123SirSkidmore: fancy :P i'm doing it ghetto style. that's guh-etto. like as in guh-nome. actually, no, wait that doesn't work22:27
Will123my project has been derailed at last minute because getting drag and drop to work with tree views is a dark and impossible art22:27
Will123so i'm having to make do with rubbish alternatives22:28
Will123i could almost taste that laptop22:28
Will123now its metallic tang and the sound of smooth plastic bumping against my teeth seem increasingly distant22: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
SirSkidmoreI just want a tshirt :P22:30
SirSkidmoreI'm more of a Ruby guy haha22:30
Will123isn't ruby basically the same as python? i normally use java so as far as i'm concerned you both need more braces22:31
SirSkidmoreugh java22:33
SirSkidmoreIT's kind of the same22:33
Will123i'm enjoying the way i can just get on with python22:35
Will123and say "iterate over these sorts of things" and it just does it22:36
Will123no endless describing of things22:36
SirSkidmoreYeah, Java annoys me to no end22:36
Will123it's not all bad. :P at least you can't trip up at runtime over silly typos22:36
SirSkidmoreTrue22:38
SirSkidmoreI have typos all over the place apparently haha22:38
SirSkidmoreI miss having like an actual IDE, I have to admit22:38
Will123yeah me too. no auto complete is making remembering these arcane GTK constants a bit of a misery22:39
Will123incidentally using a very C-ish API sucks too22:39
Will123that said Swing was very java-ish and that's worse22:39
SirSkidmoreare you not using glade?22:40
SirSkidmoreOkay, so my engine kind of works now! :D22:40
Will123I am using glade, but i've had to resort to directly programming some parts of it22:40
Will123that's great! what does it do?22:40
SirSkidmoreRight now?22:43
SirSkidmorenot a whole lot22:43
SirSkidmorethere's a bug, so you can only die or be killed after one turn22:43
SirSkidmorehaha22:43
SirSkidmoreI normally avoid WYSISWYG stuff, but for this weekend, it's a necessary evil22:43
SirSkidmoreThere's no caffeine in my house :(22:45
Will123yeah. i think it depends22:45
Will123for my main software project i'm writing the UI manually using openGL22:45
Will123Gtk is much better than swing but i don't like the undocumented C-like stuff22:45
SirSkidmoreI can make a window with some buttons22:46
SirSkidmorehaha22:46
SirSkidmoreI'm not worried about GUI yet22:46
SirSkidmoreCan I use this as my GUI? http://kivy.org/22:47
Will123you can only use stuff that's in the repositories22:48
SirSkidmoreOh yeah22:48
SirSkidmoreUgh22:48
SirSkidmorehaha22:48
Will123what about pygame?22:49
Will123though if it's text based22:50
SirSkidmoreIt'll be easy to do in glade w/ Gtk I think22:50
Will123btw, you'll definitely get a t-shirt if it has the cool 'ubuntu black toolbar'22:52
Will123http://askubuntu.com/questions/67362/what-is-the-black-header-widget-in-some-programs22:52
SirSkidmoreI can totally do that :D22:52
SirSkidmoreYESSSSS22:52
Will123SirSkidMore: 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 lines22:54
Will123that's how i got mine black22:54
SirSkidmoreI'm not running Unity, and using a non-defauly GTK theme, so mine isn't black :P22:54
Will123always the contrarian eh22:56
SirSkidmoreWell, I really love Cinnamon (Mint's shell extension to GNOME 3), so that's what I'm currently using22:56
Will123what's so good about it? i've used mint before, but not since the cinnamon thing22:59
SirSkidmoreI'm not using Mint, just Cinnamon23:00
SirSkidmoreIt looks like a sleeker GNOME 2 is all really23:01
SirSkidmoreThe java-ist in me wants to put every class into its own file23:01
sigurdgacoming in late to comment things you said a few minutes ago: vim is nice with code completion and syntax checking (pyflakes)23:03
sigurdgaI also run pep8 and occasionaly pylint23:03
sigurdga(but not on this project)23:03
SirSkidmorei'll have to look up pyflakes23:03
SirSkidmoreSince I'm new to Python, what are the general accepted protocols for multiple files in one program?23:04
sigurdgai can see if I can find out which plugin connects to pyflakes23:04
sigurdgacode completion is another one. only looks at open files in the same window.23:05
Will123SirSkidmore: that's what i've been doing, except for super small classes23:05
SirSkidmoreOh really?23:05
SirSkidmorehuh23:05
SirSkidmorehaha23:05
SirSkidmoreI have a ton of classes all mushed into one spot23:05
sigurdgarunning pep8 on your code will probably tell if what you have is OK23:05
sigurdgait is fine to have more classes in one file, as long as it is meaningful23:06
sigurdgapylint complains too much, is my opininon (you have 10 public methods, only 8 is good for you)23:07
sigurdgaand son on23:07
sigurdga-n23:07
Will123i totally forgot about public/private methods23:08
Will123does python have those, then? :P23:08
SirSkidmoreThis is my first day of Python coding haha23:08
sigurdgamaybe syntastic is one of the vim plugins… I don't remember too much23:09
sigurdganow. off to sleep, maybe I get enough energy to have something to submit tomorrow.23:10
Will123see you sigurdga23:11
SirSkidmorewell, I put everything in different files23:14
SirSkidmorebut I've clearly done something wrong haha23:14
Will123SirSkidmore: i need your opinion on a screenshot I'm about to post23:20
SirSkidmoreGo for it23:21
Will123http://www.locker101.co.uk/badideaorgoodidea.png23:21
Will123what do you think about putting the requirements before publishing in the title bar? i'm thinking it might be a terrible idea23:22
SirSkidmoreHmm23:24
SirSkidmoreI'm not so sure about that....23:24
SirSkidmoreOKAY, question for you :P23:24
SirSkidmoreso my game initializes in a file called rpg.py, mk?23:24
SirSkidmoreI also have character.py, enemy.py, and player.py23:25
SirSkidmorecan I just type import character, etc?23:25
Will123here's how it works23:25
Will123if you just do import character23:26
Will123then when you want to make a new character, you have to do23:26
Will123character = character.character()23:26
SirSkidmoreHow do I not have to do that?23:26
SirSkidmorehaha23:26
Will123because it's a class called character inside the file character23:26
Will123erm, i think you do23:26
Will123from character import character23:26
SirSkidmoreOh23:26
SirSkidmoreOkay23:26
SirSkidmoreLots of fixes to make now23:26
Will123so if you do from character import character, then you just need to do character = character()23:27
Will123btw, if you ever find yourself going insane23:28
SirSkidmoreThat broke all of my code23:29
SirSkidmorehaha23:29
Will123you can check snippets of code by just firing up a python terminal23:29
Will123oh dear ;P23:29
SirSkidmoreWell, I just found pydev plug-in for Eclipse23:30
SirSkidmoreso I'm just going to use that23:30
Will123fair enough!23:31
Will123btw, quickly add dialogue23:31
Will123took me ages to find out about that23:31
Will123oh wait it's dialog :P23:31
SirSkidmorehuh?23:31
Will123quickly add dialog (i think it's that) lets you easily create new dialog windows23:33
SirSkidmoreNow it's telling me: AttributeError: 'module' object has no attribute 'Character'23:37
SirSkidmorebut If I remove my Character = character.Character()23:37
SirSkidmoreI get erros23:37
SirSkidmoreerrors23:38
SirSkidmoreamd if I switch from Character = character.Character() to from character import Character23:43
SirSkidmoreI get from character import Character23:43
SirSkidmore\Whoops23:43
SirSkidmoreI get: ImportError: cannot import name Character23:43
Will123hold on23:46
Will123what's your class's name defined as23:46
Will123and what 's the file name?23:46
SirSkidmoreokay, so Enemy 'extends' character23:47
SirSkidmoreso I have enemy.py and character.py with the classes Enemy, and Character, respectively23:47
SirSkidmorein enemy.py23:47
SirSkidmoreI have import character and then Character = character.Character()23:47
Will123and 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 fine23:49
Will123unfortunately i don't really know enough about python to instinctively figure out what's wrong there, sorry :(23:49
SirSkidmoreHmm23:49
SirSkidmorelemme mess around some more23:49
SirSkidmoreI have no idea what's wrong at this point23:52
Will123you can post your code if you like.23:52
SirSkidmorelike via pastebin?23:52
Will123yeah23:53
SirSkidmore(files are separated by comments) http://pastebin.com/Mprqn3eE23:55
Will123oh, yeah23:56
Will123when i said Character = Character.Character()23:56
Will123i meant that code creates a variable called Character23:56
SirSkidmoreshit23:57
SirSkidmoreduh23:57
SirSkidmorehaha23:57
Will123and assigns to it a new object of class Character from the module (file) Character23:57
Will123i should have explained better :P23:57
Will123sorry 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!