How to program this? (Description in thread)

Discussion in 'Mac Programming' started by meme1255, Jan 8, 2013.

  1. macrumors 6502

    Joined:
    Jul 15, 2012
    Location:
    Czech Republic
    #1
    Hello,
    I would need some suggestion how to program this GUI app (drawn in screenshot :D , I hope you'll understand).

    I thought about using Applescript and XCode + Interface builder, but I have no idea how could I do it.


    Thanks for any help,
    meme
    I would this app for controlling device based on CC1111 SoC - But that shloudn't matter
     

    Attached Files:

  2. macrumors 603

    Joined:
    Aug 9, 2009
    #2
    What programming languages do you know?

    Have you designed or written any GUI programs? Using what tools: Xcode? NetBeans? Delphi? Visual Studio? Flash?)

    Which OS X version do you propose developing on? I ask because you mention "Interface Builder", which has been integral to Xcode for a long time. So if you're planning to use an older OS and Xcode version, the answers may differ than if you were using newer versions.

    Have you done any design work on this other than sketching a GUI? For example, have you designed what the Model in an MVC design would be?

    It looks like a fairly simple Model to me, but if you don't know any programming languages, then you have other tasks to finish first (i.e. learn a programming language).
     
  3. meme1255, Jan 8, 2013
    Last edited: Jan 8, 2013

    thread starter macrumors 6502

    Joined:
    Jul 15, 2012
    Location:
    Czech Republic
    #3
    Well, I know C (I would say basics), a bit of bash and I tried Objective-C - I ended with app in iOS simulator that had table-like view a and showed text in cells.. - But I can't "think" much in objective languages :(
    ( And I can use Applescript )

    I have Xcode 4 and Xcode 3.

    I have Mountain Lion as primary OS, but I can boot Snow Leopard if it was necessary - But I'd like to use that app on 10.8. .

    Edit: This is GUI in Interface Builder I would like to make work.. But I don't know..
     

    Attached Files:

  4. macrumors 603

    Joined:
    Aug 9, 2009
    #4
    You need to come up with a specific plan. That plan needs to include "Learning how to do X", where X is anything you aren't already skilled in.

    If you've only used Xcode to develop an iOS app, then you need to learn how to use it to make OS X apps. More specifically, you need to learn how to make OS X apps using Xcode's Interface Builder features.

    If you've never used AppleScript Objective-C before, you need to learn how to do that. Google search terms:
    applescript objective-c
    applescript objective-c tutorial


    If you've never written serial-port programs for the Mac before, you need to add that skill. If you intend to use AppleScript for serial-port access, you need to find a suitable scripting component, or figure out how to tell another program how to send and receive on a serial-port.

    If all these things are the first time you've done them, then you should plan to write at least 2-4 smaller simpler programs using one facet from each, before attempting your final program. If you don't know how each individual facet or feature works by itself, then you won't be able to connect them together as a whole. Figure out each part, maybe by writing simple test programs, or maybe by modifying existing programs you find as examples, samples, or tutorials.


    The principle that underlies all the above is Break It Down. Write a plan, and break it down. Identify what you need to learn, and break it down. If you don't know how to break things down, then you should start there. The formal term is "decomposition" in a programming or Computer Science sense. So see what you can find out about that.
     
  5. thread starter macrumors 6502

    Joined:
    Jul 15, 2012
    Location:
    Czech Republic
    #5
    I've googling for a while and I've found a program that is capable to use AppleScripts and receive and sent data to and from them to end-device.

    So: I need
    1) Learn how to sent values from (Cocoa?) buttons to AppleScript. ( I won't have to use ttys button, as it will be selected in program which I found) [​IMG]
    2) Send the data from AppleScript to serial port (solved by program with AppleScripting support).

    Thanks for help, I can now at least imagine how it might work! :)
     
  6. r0k
    macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #6
    I'm assuming you are using a recent version of Xcode. You can tie buttons on your user interface to Applescript and you can tie Applescript "outputs" to elements on your user interface. I found a tutorial over at macscripter. There is one caveat. I'm not in front of my Mac. If your version of Xcode looks different than the version in the tutorial, look around for a tutorial for your version of Xcode. Apple has changed (improved) the way applescript is integrated into xcode projects so not every tutorial will work for your version of Xcode.
     

Share This Page