It's possible I may have asked this before, but this is with renewed enthusiasm and some spare time...
Getting back in to weaving, I was looking for mac apps to experiment with weaving patterns - there's only one, and it's ridiculously expensive and intended for running industrial-size patterns. Trying out the available/affordable winxx apps, they're basically pretty crap, and I think I could make a much more usable app on the mac.
The problem is, I've never written an app before, never coded in cocoa or whatever, and don't really know where to start. Can anyone suggest good books/resources for someone starting from scratch writing a cocoa app that uses quite a lot of (probably fairly simple) graphics? the basic idea of the app is to create a graphical matrix that shows what a particular tie-up and treadling sequence with particular warp/weft colours will look like as a cloth. Here's an example of a cheap/bad winxx app trying to it (sorry about this):
I'm not completely new to coding, I've written a lot of code in a proprietary sort of BASIC that belonged in a pre-windows 4G database app called Advanced Revelation, and I've done some Fox BASIC and some fairly intricate LISP (also for a GUI app).
I assume that having leopard, I already have the xcode development kit on my DVD (though I'll need to d/l an up-to-date version) - but for me it'll be like wandering around the LHC without a map...
(Actually, I find myself wondering whether there's any mileage in considering developing it in webkit form - would that be terribly slow for large arrays?)
- padmavyuha
_________________________ If it's brokenless, don't suffix it...
That's where I suggest you start. Create an account and copy/paste your post into their developer forums. They have been quite helpful to me in the past.
Also, there is a LOT of documentation that comes with Xcode ...good luck
#395252 - 11/09/0806:40 PMRe: Writing a mac app - where to start?
[Re: padmavyuha]
Svend
Científico aficionado
Registered: 06/12/08
Posts: 649
Loc: América del Norte
Go to your local book store. In the computers section there are probably several how to get started books. Look through them, pick the one that works best for you.
Something like this, maybe -
I believe your idea of a first app, your weaving program, is way to ambitious of an undertaking to start with.
_________________________ Yo soy un hombre sincero de los alpes suecos. Con los pobres de la tierra, quiero yo mi suerte echar.
Thanks... Yes, it's ambitious, but in my experience it's much easier to get motivated to learn how to do something if you have a genuine project you want to bring to fruition, rather than some vague idea of learning in the abstract.
I've got some idea of what might be involved through sitting down and beginning to scope out what I want the app to do. There's a lot of interesting logic to work out in order to make the coding behind display of the weaving pattern array as 'elegant' as possible in as few lines of code as possible. The image I posted above just dips its toe into what's possible even on a 4-shaft loom, never mind on the 8-shaft one I'm actually using at home. I've basically got to create a resizeable visual array whose contents/colours are determined by switches and colour selectors for each warp/weft. It's nowhere near as complex as, say, creating a game arena, because there's no interaction with the actual weaving display itself, just tweaking it from the edges. I'll worry about more fancy things like 3D effects later on .
This is also going to help me with my own weaving, and understanding more deeply how weaving patterns work. It's then going to be fun adding all the functionality like selecting blocks of pattern and copying them, changing one colour to another globally or within a selected range (something a lot of the other apps don't do, stupidly enough), how best to print the thing out, and opening from/saving to the existing .WIF file format that other weave apps use, which offer users a lot of preformatted templates.
Fun and headache, I'm not expecting to get this done any time soon. Meanwhile, I've been hunting around on the net, and people have pointed me to two books: 'Programming in Objective C' by Stephen Kochan (for learning Obj-C from scratch) and Cocoa 'Programming for Mac OS X' by Aaron Hillegass (for the cocoa- and OSX-specific stuff, including using xcode etc.)
Lots of forum etc. help available, I just need to crack into it.
- padmavyuha
_________________________ If it's brokenless, don't suffix it...
I'd also consider RealBASIC, which I think has a free trial.
And there are a zillion open-source 2D game engines, some of which are less technical to learn than others. One of those might lend itself to weaving!
i made a simple app using RealBASIC about 4 years ago or so. i kept the code pretty short, yet RB added a lot of bloat and my app was huge. if i get back into it, it's Cocoa all the way for me.
#395545 - 11/10/0811:33 PMRe: Writing a mac app - where to start?
[Re: FSM]
Nagromme
Carpal Tunnel
Registered: 01/10/08
Posts: 890
Loc: USA
FIle size isn't too critical these days. Maybe my 10MB app could have been 2MB, but no harm done. (Plus being able to deploy instantly to Windows and Linux was nice.)
I've just started working my way through Programming in Objective-C - it's very well written so far, functioning as an introduction to programming for someone who's never really learned it systematically before (and no object-oriented stuff anyway). I've opted for writing the test programs in TextWrangler and compiling/running them in Terminal for the moment, because I tried using Xcode and it felt like climbing into the flight cabin of a Concorde in order to cross the road . The book is a little out of date in that area, in that it walks you through using Xcode's predecessor, Project Builder. This means that something as basic as running a 15-line program and actually seeing the output from it is currently beyond me. I'll need to know how at some point, but the TW/Terminal combo suits me fine for now.
The author is doing a good job of explaining the basics of objects/instances/methods etc. - I've had folk try to tell me about this before, but this is the first time it's started to make sense.
I'm finding this strangely exciting - I suppose it's because I've been using computers for 22 years now, and now I'm peeking under the bonnet properly for the first time. Plus I love languages!
There is already a wee corner of my mind that is starting to mull over how one might define graphical objects that will end up displaying an array that resembles a weave pattern - and of course, there's another slightly larger corner of my mind that is already considering what would be a cool name for my app . I have (just) enough dignity to avoid any Trekkie names such as 'WarpFactor'.
- padmavyuha
_________________________ If it's brokenless, don't suffix it...