1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Rapid GUI development like Visual Basic?

Discussion in 'Mac Programming' started by Sunnzy, Jun 10, 2009.

  1. macrumors regular

    Are there anything like Visual Basic for OS X? I don't mean like the exact replica where you actually code in BASIC, but anything that allows you to quickly create a GUI and add some lines of code to make it do stuff?

    Sometimes I want to do something like that for writing a quick and dirty app that may be just have one time use, or maybe simply just "prototyping" for a larger project.

    I actually have taken a look at XCode, it has an interface builder which was cool, I was able to come up with a GUI quickly but I just don't know where to code it!! I've tried to google tutorials but haven't got any luck so far, all the one's I have seen is either for Xcode 2 which doesn't work well for 3.0 for someone who is still trying to learn Xcode at all!! Or the 3.0 guides I've seen just stops at the coding stuff by simply saying check back later... and then there are 3.1's which apparently is very different to 3.0.
  2. macrumors 65816


    Yes, I I thinks its better.

  3. macrumors demi-god


    Depends on what language you prefer. NetBeans has a GUI builder, for you Java programmers out there. If you're coding in Python or Objective-C on the Mac, Xcode is probably the best option. I don't recommend pure C or pure C++ anymore, since Apple dropped 64-bit support for Carbon apps - that said, using a mixture of C and some other language is perfectly fine.
  4. macrumors member

    1) Go here http://developer.apple.com/iphone/index.action
    2) Follow the Videos link
    3) On iTunes go to iPhone Development Resources > Iphone Getting Started Videos
    4) Watch the "Fundamentals of Cocoa Session from WWDC"

    That is better than any tutorials :eek:
  5. macrumors regular

    Depends on what language you prefer.[/quote]

    I don't mind learning new language.

    I currently knows Java and Swing reasonably well, and I use C for command line stuff

    Oh yes I used python as well on the command line, just like C, I haven't look into Obj-C yet... so you can use python with Cocoa and build GUI Apps? Are there any tutorial/documentation to get started? I'll try and see if Google has anything. :D

    Oh... mixture of C and Obj-C seems the way to go, because I got a few C code that would be nice to write a GUI on top of ti, and that Obj-C is a superset of C, or so I heard...

    But I'll be really interested in Cocoa python at this stage.

    Hmm... iPhone? But... I want to do this on a Mac? Or is this exactly the same on the Mac? :D
  6. macrumors regular

    Realbasic is exactly what you need. Rapid GUI development better than Visual Basic.

  7. macrumors 6502

    I'd say that learning Interface Builder is the way to go. As you have noticed, the user interface has been reshuffled, including in some significant ways, since version 2, so I'm not sure where you should go now for free tutorials. The iPhone video may well be the perfect place to start — although the iPhone has a completely distinct widget set, Interface Builder is essentially the same. You still draw the widgets you want, wire them up, then head to Xcode to write actual code if necessary.

    I looked only briefly, but a Google search for "Interface Builder 3 tutorial" turned up some relevant results, such as this one.

    You are correct that Objective-C supersets C. Apple also supply Objective-C++ which allows you to freely mingle Objective-C and C++. If you have existing code or are in the habit of using useful bits from the GPL world or wherever, this can be very helpful.

    The main thing to get your head around before you launch into Interface Builder is that Objective-C is fully reflective. That means that you can query objects to find out which methods they support at runtime, or attempt to perform any method on any object, starting with just its name as a string if you want. In addition, the Mac has the concept of a first responder, which is commonly used to route any message (messages = method calls, since that's how they're implemented underneath in Objective-C) from the menubar to whichever is the frontmost window.

    What that means in practice is that the method you use to tell objects in Interface Builder what action to perform needs to be sufficiently open that you can set a button to message another widget directly (so you don't write any code whatsoever inbetween) or set the menubar to propagate a message to nobody in particular. Which all helps enormously with complicated applications, but means that it's not possible for Interface Builder to be quite as simple as VB/etc for tiny, quick things. You can't draw on a button then double click on it to be automatically taken to the code that is called when it is clicked, for example.

    General pattern is: add control to user interface, add method definition to class that you want to handle messages from the interface, control drag from the user interface control to the object with the method, select the method from the list that appears. Then go to Xcode and implement that method if necessary (which won't be if you've wired one control directly to another, for example). Sorry if that's a bit patronising, it's something that a lot of converts from tools like VB find very hard to understand the need for at first.
  8. macrumors newbie


  9. macrumors member

    Runtime Revolution

    Runtime Revolution perhaps? http://www.runrev.com/

    It's kind of like the step child of Hypercard and is even cross platorm.

  10. macrumors member


  11. macrumors demi-god


  12. macrumors regular

  13. macrumors member


    Yeah it was just released in March.
  14. macrumors 603


    Have you tried using Mono? C# is pretty darn easy and quite a nice language.

Share This Page