Search results

  1. G

    Main programming question/ a few misc. questions..

    Yeah, indentation is good :) Do you know that project builder can check your syntax for you? It's just an apple-k away! Really, Project Builder is going to be a lot easier to use in the long run, but it's up to you. I did a lot of my early code (some still) using pico, but it can become a...
  2. G

    selector not recognized

    I say we need more information =D If you defined your methods (selectors are ways of selected methods to call) in Interface Builder slightly differently than you did in Project Builder, you'll get those warnings at run time (as nib files are only loaded at runtime). Any easy way to avoid...
  3. G

    Main programming question/ a few misc. questions..

    Okay, here's what you had before with my commentary: #include stdio.h //html doesn't like alligators, so I'll leave them //out for now //this is our main method int main() { //initialize an integer to the value 0 int a = 0; //initialize an integer to the value 5 int...
  4. G

    Cocoa Questions Thread

    I've never tried sending an object an explicit dealloc message, but it sounds like something fun to try out sometime =D I think it would probably be better to stick to releases and retains. I'm not sure why'd you'd ever want to explicitly call dealloc. If your retain count is soo high that...
  5. G

    Main programming question/ a few misc. questions..

    Really? I didn't think they moved that quickly. Although, I already new Java before I learned C, and they're very similiar. To compile your C code, create a file like so: name_of_my_source_file.c All your source files (where you put your code) should have that general form. To compile...
  6. G

    Main programming question/ a few misc. questions..

    Uhmm... in your code, you never defined the type of your variables. it should be something like this: #include <stdio.h> int main() { int a = 0; int b = 5; while (a < b) { printf("%d\n", a); a = a + 1; } } If you compile that, you...
  7. G

    Cocoa Questions Thread

    I think it would be better to say Object Oriented Programming is all about objects. In ObjC, you send messages to objects, while in other languages its refered to (although it's really the same thing) as calling methods or functions off of an object. Cocoa is just a set of API's that apple put...
  8. G

    Beginners guide to Java

    It only takes an afternoon to learn obj-C? Maybe if you've learned another object oriented language, but probably not if this is your first OO language. I think Java is an easier language to start off with, as it does garbage collection for you, and I think the syntax is slightly more readable...
  9. G

    Some Java Questions

    Go to your home directory and edit your .login file (if it exists) and make an alias like so: alias javaDock ''java -Xdock:name=' Then you just have to type the name of your app javaDock "Name of App" myApp. Edit yo your hearts content. HTH, F-bacher
  10. G

    java or objective c?

    Hold on a second. Does UBB not like S-U-C-K? I think that's what I typed initially, I think. Now, about speed. How could you possibly say that speed is not an issue? There are levels at which speed is not an issue. I even think that using an object oriented model is going to be slower...
  11. G

    java or objective c?

    I think there are programs that compile java to a C stack, but they cost money. I developerd using Cocoa-Java for over a year, and was very happy to move to Cocoa-Objc. Here's why. 1) SPEED. 2) Better documentation and implementation. Some whole classes and many methods don't cross over...
  12. G

    Cocoa Newbie needs help with Document Window

    [self setLevelOfConfusion:NSHigh]; Uhmm... could you rephrase your question, please? I'm really lost on what your missing. What do you mean by changing your view? Do you mean changing the name of your subclass of NSView? Or changing an instance of a subclass of NSView from one type of...
  13. G

    AppleStudentDevelopers.org

    tht's just umichmug.org ;) Cool site (which I'm a moderator for), although there just isn't enough people to keep discussion lively, like there is here. They get a little more technica over there, and have specific sections for every different programming topic you could imagine (related to OS...
  14. G

    Do comments slow down your program?

    I could see that slowing down actual compiling (like a microsecond), but not the executable. It's interpreted just like whitespace. On the other hand, if you have lots of NSLog's everywhere, that will slow down your program considerably (if there's enough of them in wuick repetition) F-bacher
  15. G

    Windows, C, Java & X

    Sign up to be an ADC memeber and you can download them from apple. http://developer.apple.com. HTH, F-bacher
  16. G

    Why? Why? [ ] Why? Why not . ???

    It bothered me at first to, but you get use to it. It's not that hard, and although it maybe simpler to use dots, it is a lot clearer what's going on with brackets. Every language has it's weirdness. Using dollar signs for variables in perl is really strange, and that whole -> reference...
  17. G

    wait until a methd has finished?

    If I'm understanding you right, the answer is ALWAYS yes. If that wasn't the way things worked, it would be incredibly hard to write code, as you would have to take into account the amount of a time for a method to run. Look at this code: int i = 0; i = [self foo:i]; i = [self foo:i]...
  18. G

    String manipulation in Cocoa

    You've just been spoiled. The way perl (heck even java!) deals with Strings is a lot easier. But not all is lost! You can do simple define statements to make your life a lot easier. I'm not great at this, so let's see if I remember... #define concat(x,y) [x stringByAppendingString:y]...
  19. G

    NSTextView- how to use?

    Uhmmm, how about myTextView.insertText("Whatever you want to insert");? You have to be careful though; that inserts text where the cursor was last, so if the text view is selectable, and the user changes the cursor location, you can have text inserted in places that you didn't intend. I...
  20. G

    break; from an action

    -(IBAction)checkData:(NSButton*)sender { NSString* ref; if([self isValid:(ref=[textField1 stringValue])]) [self randomFunct:ref]; if([self isValid:(ref=[textField2 stringValue])]) [self randomFunct:ref]; if([self isValid:(ref=[textField3 stringValue])]) [self...
Back
Top