- Pointers and the asterisk: http://stackoverflow.com/questions/1105815/placement-of-the-asterisk-in-objective-c
- The type “id” is always a pointer, so no asterisk there
- Strange effects happen when you “#inport” .h files with cyclical references. I didn’t find a better solution than having id instead of the Type I wanted to use in one of my classes
- There are no null pointer exceptions. This means you’ll all the time miss the initialization of some object or some reference and won’t recognize it. Since recognizing this, I love null pointers exceptions. But this is language design in Objective C. So if you definitely need to be sure, throw an exception if you want to be sure and / or add some unit tests.
- When the application crashes, you won’t get meaningful answers from the console often times. To get some more information you’ll need to set a breakpoint in the last thrown exception statement. You can find out more here.
- When you want to use a simple integer like 5 and get the warning / error “makes Pointer from integer without a cast”, you need to use [NSNumber numberFromInt:5]
- Always correct header file first, implemetation file second and always correct from top to bottom, as the compiler does this too. When the compiler sees an error in the header file for example, it might make up 50 more errors somewhere below. This is literally top-down debugging.
- Don’t try to mess with XML too much yourself. Use this nice, free and fast XML framework instead.
- There are great resources for iOS development out there, for example the full open source Canabalt game or framework-like libraries that could make some things easier, if you see it before you’ve implemented all such things yourself.
- To find such resources, I’d read this blog and follow it’s writer on Twitter.
- Oh yeah, and Google and Stackoverflow should fix the rest.
Should you use Eclipse and Maven and the Maven plugin for Eclipse, you maybe came around this exception. An update of the Eclipse plugin brought me this problem.
Just to tell you the quick fix of this problem: goto “Windows –> Preferences –> Maven –> Installations”, and if you see there’s an Embedded Snapshot used after the last update of the plugin, click “Add…” and browse to the path of your local maven2 installation that you used before.
Really completely random thoughts here – just don’t read them. Its just on my mind, and it needs to be written out somewhere.
Since 10 days I’m now working on a MacMini with OSX. This is my first time encounter with OSX, and have have been a Windows user all my life. On the Mac Mini, I use a windows keyboard – which has the wrong letters printed on it for OSX. This is unbelievable bad, if you try to program on that thing. The keybindings on OSX are also strange, but argueably better than the usual windows bindings. I just miss my POS1 and End of Line keys – but using CTRL Left or CTRL right seems even more “natural”. Having a control key that doesn’t pop up a menu when accidentally pressed without another key in the Apple-key instead of the windows key is also a big bonus. The mouse speed really sucks – I needed to install an external tool to fix that.
I’m using Xcode with Objective C now on that machine and my main comparisons are Eclipse + Java and Visual Studio + C#. Xcode is a lot less comfortable, as it doesn’t autoinclude much stuff for you – well I guess there are some secret hotkeys that I didn’t find so far, but visual indication of actions does not exist. The autocompletion is nicer, but I didn’t find a way so far to autocomplete if I want to send a message to an object and forgot the [ before the objects reference. Any hints, someone? I always jump back, make the [ and jump to the end where I now get the methods all lined up. The language syntax looks weird, but it also has its upsides. Differing the methods syntactically from properties just sucks anyways.
The “interface designer” is pretty pointless compared to Visual Studio – okay, maybe its because there’s not too much space in that iPhone display, but aside from clicking together the underlying main GUI and then make the rest in code there’s not much use to it, as I see it so far … well thins all may change, as I really only tried it 10 days now, and that we no full 8 hours every day.
Then I somehow don’t see all the helper classes that I seem to be writing on the go. Are there helper classes in the Foundation framework somewhere? Or a place where the most useful are compiled in a tutorial? Memory management is a lot less pain than I thought. In fact, learning the third “higher” language seems to be pretty easy, and the reference counting isn’t too hard to grasp. My main problems are all the little things. But we’ll get that soon. In fact I can see myself using Mac OS soon, I quickly find myself falling in love with this systems basic principles more and more each day. Signing off for today – if somebody has any great hints for me, please let me know :-)
When the Visual Studio 2008 / 2010 designer shows you the forms and controls, it executes certain code to show them to you. When it crashes, you should look on which form it crashed and then inspect this form very closely, including all their fields.
The error can be in the constructor of the form, in the constructor of the custom controls you’re using and in the OnPaint() events of either forms and controls. Make sure you’re either encapsulating all these with try-catch-blocks so you can at least track down the problem and not have Visual Studio crash on you each time you try.
Grade wollte ich mir bei Scribd dieses längere und scheinbar sehr interessante TechnoPhilosophische Paper zum Thema Risiken von künstlicher Intelligenz runterladen, als ein Popup auftachte, dass ich dafür was hochladen solle. Aber was?
Bei Ascora / Abelssoft machen wir jeden Monat eine interne Veranstaltung um uns etwas weiterzubilden und schöne neue Technologien kennenzulernen. Diesen Monat war ich dran und habe was zum Thema Struts2 erzählt, DEM aufstrebenden Java Webframework.
Also, für den Fall dass sich jemand einleiten lassen möchte (oder dass ich diesen Vortrag nochmal woanders halten möchte, wo es eine Internetanbindung gibt), hier die Präsentationsfolien. Aber Vorsicht, ohne Erklärungen machen zuminstest die Codebeispiele wenig Sinn.