Using cocoa

Can somebody give me the link of a good cocoa tutorial???
I already know some c++ and I'm interested in learning cocoa too.
Thanks for your time With respect,
Koteas Apostolos

http://www.tuaw.com/2010/12/19/apple-posts-free-developer-documentation-for-iboo ks-users/
Should be 6 free dev related iBooks there...at least one for Cocoa - you'll need iBooks on iOS.
Also, see Cocoa Is My Girlfriend

Similar Messages

  • Can I develop plug-in using cocoa as UI instead of ADM?

    I'm just about to start developing illustrator on mac.
    Is it possible to use cocoa framework to design the UI instead of ADM?
    Then my plug-in code will be mixed with C++ code and objective C++ code. I don't see this from the sample code, can anyone tell me whether it is possible?
    Thanks,

    I can't say for sure, but since I know from experience it's possible to mix in other GUI toolkits, I don't see why not. You won't be able to use anything but the ADM for palettes, but for just dialogs that pop up? I can't think of a reason why not.
    It'll be your headache to parent them appropriately though. AI provides a way to get the root window for the application, but you may have to do some work to find the appropriate child of that window to use as the parent for your dialogs.

  • How to play and code .swf as screen saver using cocoa??

    Hello,
    I am facing using .swf flash file as screen saver when coding in COCOA. Any sor tof help or code snippet will help me to understand what I need to do??
    Looking for experts help.
    Thanks in advance
    PG

    pgindia wrote:
    Hello,
    I am facing using .swf flash file as screen saver when coding in COCOA. Any sor tof help or code snippet will help me to understand what I need to do??
    Looking for experts help.
    Thanks in advance
    PG
    Took 3 seconds to find a great article via google. Tricks, tips and project sample.
    But as stated, if you're looking for someone to write it for you, outsourcing code seems all the rage.

  • Memory management in plugins using Cocoa

    Hello,
    In Obj-C memory management guide stated: "If you spawn a secondary thread, you must create your own autorelease pool as soon as the thread begins executing; otherwise, you will leak objects."
    I assume that it also applies to Acrobat Plugins? What are the guidelines of using NSAutoreleasePools in plugins and is there any specific things in plugins' memory manamgement?

    If you have multiple subvis grabbing 200MB each you might try using the "Request Deallocation" function so that once a vi is done processing it releases the memory.
    LabVIEW Help: "When a top-level VI calls a subVI, LabVIEW allocates a data space
    of memory in which that subVI runs. When the subVI finishes running, LabVIEW
    usually does not deallocate the data space until the top-level VI finishes
    running or until the entire application stops, which can result in out-of-memory
    conditions and degradation of performance. Use this function to deallocate the
    data space immediately after the VI completes execution."
    Programming >> Application Control >> Memory Control >> Request Deallocation
    I think it first appeared in LabVIEW 7.1.
    Message Edited by Troy K on 07-14-2008 09:36 AM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • How to switch to "Login Window" using cocoa?

    From my cocoa application I need to programmatically switch user desktop to Login Window.
    The analog of this function is "Login Window" item near the user list menu in the status area (Fast User Switching, Session switch).
    I need this API under 10.6
    thanks!

    In the Terminal, type
    {code}/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend{code}
    So you just have to perform a system call to run this command.

  • How to create a Quicktime movie using Cocoa QTKit

    I am trying to find some example code on how to create a short Quicktime movie in a Cocoa app. The sample code I've seen so far is all for capturing the frames from an external source (e.g. camera).
    Also, I am looking for how to control the compression engine to ensure that I can create a small Quicktime file if there is a lot of frames with small amounts of change in them.
    Any pointers would be greatly appreciated.
    Charlie

    I´m looking for a solution to protect QuickTime files with a pwd that one have to enter after a specific time. Is it possible?
    No.
    (52272)

  • How i can use Cocoa framework APIs in indesign CC version

    Like NSString,NSFileManager.
    Thanks
    Qamar khan

    Add Cocoa.framework to your project, then add an Objective-C source file (with the extension ".m") to the project, and at the top, #import <Cocoa/Cocoa.h>.

  • Text looks jagged when converting PDF to image using Cocoa on Leopard

    Hello,
    I have a program that composites the pages of a PDF into a single image with each page stacked on top of each the previous one. The program works fine, but the font rendering quality is much lower when run from anything but a Snow Leopard system. In Leopard, the text looks jagged and not antialiased properly. Does anyone know a fix for this? Here is my code.
    NSString* path = [[oPanel filenames] objectAtIndex: 0];
    NSPDFImageRep *pdf = [NSPDFImageRep imageRepWithContentsOfFile: path];
    int pageHeight = 765;
    int pageWidth = 990;
    int pages = [pdf pageCount];
    int height = pageHeight * pages;
    NSImage *compositeImage = [[NSImage alloc] initWithSize:NSMakeSize(pageWidth, height)];
    [compositeImage lockFocus];
    for (int i = 0; i < pages; i++) {
    [pdf setCurrentPage: i];
    NSImage *page = [[NSImage alloc] init];
    [page addRepresentation:pdf];
    NSSize size = [pdf bounds].size;
    int width = round(pageHeight * size.width / size.height);
    [page drawInRect: NSMakeRect(0, height - pageHeight * (i + 1), width, pageHeight)
    fromRect: NSZeroRect
    operation: NSCompositeSourceOver
    fraction: 1.0];
    [page release];
    [compositeImage unlockFocus];
    NSBitmapImageRep *rep = [NSBitmapImageRep imageRepWithData: [compositeImage TIFFRepresentation]];
    NSData *imageData = [rep representationUsingType: NSJPEGFileType properties: nil];
    [imageData writeToFile:@"/Users/devongovett/Desktop/out.jpg" atomically: YES];
    Thanks for any help you might be able to give!
    Devon
    Message was edited by: devongovett
    Message was edited by: devongovett

    devongovett wrote:
    The program works fine, but the font rendering quality is much lower when run from anything but a Snow Leopard system. In Leopard, the text looks jagged and not antialiased properly.
    Without knowing anything about how to draw into a PDF in code: the problem might not be in your code but in Leopard's rendering.
    I bet you are testing just with Apple's own Preview app -- can you test with something else, for example, the Acrobat Reader, on both systems? There is a good chance your image is just fine.

  • Using perl with cocoa

    Hi
    I know some perl and have managed to make a perl/apache/mysql application. I would like to use cocoa to make a gui application that can do the same stuff.
    I have looked into camelbones and perlobjbridge and am finding it a bit difficult to decide what I should try and use.
    Basically the cocoa app needs to query a mysql database and then display information from that database or make inserts or updates. I can do all of that with perl using dbi and as far as I can tell cocoa doesnt have a mysql library for querying etc. I did find that there is a commercial framework that can be bought for the mysql stuff but I would prefer to not use "commercial" stuff.
    My knowledge of C and Objective-C is very limited ( a newbie if ever there was one). Installing framworks and libraries is not something I know anything about.
    What I would like to know is which avenue of approach is probably the best for my project. Should I delve into camelbones or perlobjbridge or is there perhaps a better way? It would be nice to be able to use my perl knowledge but since I have to learn objective-C anyway its not necessary. I would ofcourse prefer a solution that is easy to package and install on other macos-x machines.
    I'm not asking for anyone to do the project for me .. but being new its hard to make the initial choices so any pointers as to which direction I should go would be appreciated.
    Thanks

    You can always use the standard C client library that comes with MySQL. I am sure there are some freeware Objective-C wrappers out there somewhere. Still, the API is so simple that a wrapper is hardly necessary.

  • Web View not loading in Cocoa Applescript application?

    Hey guys...me again, and I need help, AGAIN, haha.
    I found a tutorial for web views in Cocoa Applescript because I couldnt find it anywhere, but it wont load.
    The web view does not display anything when the app is launching.
    I am using Cocoa Applescript.
    This is my AppDelegate.applescript I am using for the web view:
    script AppDelegate
      property parent : class "NSObject"
        property ourWebView : missing value (* This links the webview *)
              on applicationWillFinishLaunching_(aNotification)
      -- tell ourWebView to setMainFrameURL_("http://tinyurl.com/RMHTML")
              end applicationWillFinishLaunching_
              on applicationShouldTerminate_(sender)
      -- Insert code here to do any housekeeping before your application quits
                        return current application's NSTerminateNow
              end applicationShouldTerminate_
        on myButtonHandler_(sender)
            activate application "Terminal"
            tell application "System Events" to keystroke "Desktop/RecoverDevice"
            tell application "System Events" to keystroke return
            delay 1
            tell application "System Events" to keystroke "setenv auto-boot true"
            delay 1
            tell application "System Events" to keystroke return
            delay 1
            tell application "System Events" to keystroke "saveenv"
            delay 1
            tell application "System Events" to keystroke return
            delay 1
            tell application "System Events" to keystroke "reboot"
            delay 1
            tell application "System Events" to keystroke return
            delay 1
            tell application "Terminal"
                quit
            end tell
        end doMyButton_
        on myButtontwoHandler_(sender)
            open location "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YF2DKZYRH6B GA"
        end doMyButton2_
    end script
    Whoever helps me will be thanked in my apps about page...
    Thanks, Adam B

    When I launch it...it says this:
    2012-01-22 17:21:01.658 RecoverMe[96706:407] Error loading /Library/Application Support/SIMBL/Plugins/GreaseKit.bundle/Contents/MacOS/GreaseKit:  dlopen(/Library/Application Support/SIMBL/Plugins/GreaseKit.bundle/Contents/MacOS/GreaseKit, 265): no suitable image found.  Did find:
              /Library/Application Support/SIMBL/Plugins/GreaseKit.bundle/Contents/MacOS/GreaseKit: GC capability mismatch
    Does that have anything to do with it not loading the webview?

  • Painting on canvas in native cocoa

    Hi Friends,
    I need a make a java canvas in which i have to paint thumbnail images by native cocoa code.
    I had got drawing surface(ds) and drawing surface interface(dsi).Also i am able to read the thumbnail images but donot know how to paint images in canvas using cocoa.
    Please suggest and if possible give some example or code sample.
    Thanks in advance.

    the bare minimum to render to a fullscreen frame in the fastest way possible...
    Frame f = new Frame();
    f.getGraphicsConfiguration().getDefaultDevice().setFullScreenWindow(f);
    f.createBufferStrategy(2);
    BufferStrategy bs = f.getBufferStrategy();
    Random r = new Random();
    while(true)
       Graphics g = bs.getDrawGraphics();
       g.setColor(new Color(r.nextInt));
       g.fillRect(0,0,getWidth(),getHeight());
       g.dispose();
       bs.show();
    }

  • Starting with a cocoa app/plugin on mac - How?

    Hi,
    I want to start with an new app/plugin for Mac OS X. For this I need to get the image data out of Photoshop. Basicly I just need an thumbnail of what the user is seeing and then pipe this to my application. Is that possible and how should I start? Is there a good tutorial for starting with a new project? Can I use Cocoa to talk with Photoshop?
    Thanks,
    Philip

    thank u
    <header style="display:block;">
    ThinkBoldGroup ( Think Bold Group ) review
    </header>

  • Are 32-bit Cocoa plug-ins supported?

    Hello,
    [Adobe Photoshop 12.0.1, CS5 SDK, OS X 10.6.4, Xcode 3.2.4]
    I'm converting my plug-in to use Cocoa but I'm experiencing crashes after my plug-in is closed (either by cancelling or when the plug-in operations have been performed).
    I have now tried the Dissolve sample from the CS5 SDK which works fine in both 32 (Carbon) and 64-bit (Cocoa) mode. But when I change the 32-bit version to use Cocoa as well [1] I'm seeing similar crashes [2] after closing the plug-in. This is the same crash as reported in point 2 of http://forums.adobe.com/message/2848834 .
    Is using Cocoa in 32-bit not supported and should I keep on using Carbon for 32-bit? Is there a problem with the SDK sample or Photoshop?
    I also noticed that with 64-bit the plug-in doesn't seem to be unloaded (I see that global variables maintain their value upon a second call). Maybe this was done because without that behaviour 64-bit plug-ins would crash in the same way as the 32-bit ones?
    [1] By unchecking usage of DissolveUIMac.cpp, enabling DissolveUIMacCocoa.cpp and changing the "#if __LP64__" in the latter source to "#if 1".
    [2] Call stack:
    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0   libobjc.A.dylib                   0x94fb6ed7 objc_msgSend + 23
    1   com.apple.AppKit                  0x970b4c5f -[NSView(NSDrag) _addDragTypesTo:] + 62
    2   com.apple.CoreFoundation          0x95f64718 -[NSArray makeObjectsPerformSelector:withObject:] + 600
    3   com.apple.AppKit                  0x970b4c5f -[NSView(NSDrag) _addDragTypesTo:] + 62
    4   com.apple.AppKit                  0x970b4aa6 -[NSWindow(NSDrag) _registerDragTypes:] + 121
    5   com.apple.Foundation              0x94b14ad5 __NSFireDelayedPerform + 537
    6   com.apple.CoreFoundation          0x95f3470b __CFRunLoopRun + 8059
    7   com.apple.CoreFoundation          0x95f32094 CFRunLoopRunSpecific + 452
    8   com.apple.CoreFoundation          0x95f31ec1 CFRunLoopRunInMode + 97
    9   com.apple.HIToolbox               0x95815f9c RunCurrentEventLoopInMode + 392
    10  com.apple.HIToolbox               0x95815d51 ReceiveNextEventCommon + 354
    11  com.apple.HIToolbox               0x95815bd6 BlockUntilNextEventMatchingListInMode + 81
    12  com.apple.AppKit                  0x97084a89 _DPSNextEvent + 847
    13  com.apple.AppKit                  0x970842ca -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
    14  com.apple.AppKit                  0x9704655b -[NSApplication run] + 821
    15  com.adobe.Photoshop               0x013c9bcc AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 17597284
    16  com.adobe.Photoshop               0x013ca7bc AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 17600340
    17  com.adobe.Photoshop               0x0006e05a 0x1000 + 446554
    18  com.adobe.Photoshop               0x0025665f 0x1000 + 2446943
    19  com.adobe.Photoshop               0x00256708 0x1000 + 2447112
    20  com.adobe.Photoshop               0x00003186 0x1000 + 8582

    Hi All
    I hoped that Cocoa plug-in should work under CS2,CS3,CS4. But unfortunatelly, it is not so. I tried the trick http://stackoverflow.com/questions/1108550/how-to-implement-a-cocoa-based-adobe-photoshop- plugin but have met a problem.
    I rebuild my cocoa plug-in as Cocoa_bundle.bundle with identifier xxx.com.cocoa and included this into plug-in resource folder.
    But the line:
    testControllerClass = [cocoaBundle classNamed:@"MyWindowController"];
    gives me nil if I load cocoaBundle with identified xxx.com.cocoa.
    This bundle can load the code section and conteins properly code architectures.
    Maybe some body have an idea why classNamed method return nil?
    I very dont like to re-write too complecate Cocoa UI with Carbon.
    Maxim

  • Carbon in Cocoa Crashing: EXC_BAD_ACCESS after NSAutoreleasePool is released

    I'm developing a Cocoa user interface for a Photoshop CS3 plugin using Bindings. (Carbon in Cocoa, since PS is a Carbon app) I'm getting a EXC_BAD_ACCESS error when I close my modal NSWindowand the NSAutoreleasePool releases.
    I've spent hours now with Instruments trying to figure out which object might be getting released early (or double released) and cannot find it.
    Now my thoughts are that maybe there is something I'm missing about running a modal window within an NSAutoreleasePool while using Cocoa Bindings. Like maybe there is something I'm supposed to do before closing the window to "finalize" all the bindings to prevent them from sending messages to released objects.
    Here is a basic code example of what I'm doing:
    NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];   
    NSApplicationLoad();
    ExportWindowController *controller = [[ExportWindowController alloc] initWithWindowNibName:EXPORT_CONTROLLER_NIB_NAME];
    [controller showWindow:nil];
    [NSApp runModalForWindow:[controller window]];
    [controller close];
    [controller release];
    [localPool release];
    The modal window is closed by a call to:
    [NSApp stopModal];
    Here is a stack trace:
    #0  0x97793869 in _cache_getMethod
    #1  0x9779c6da in lookUpMethod
    #2  0x97793da7 in _class_lookupMethodAndLoadCache
    #3  0x97793953 in objc_msgSend
    #4  0x96501151 in -[NSBinder releaseConnectionWithSynchronizePeerBinders:]
    #5  0x96a10390 in -[NSValueBinder releaseConnectionWithSynchronizePeerBinders:]
    #6  0x963ac895 in -[NSObject(_NSBindingAdaptorAccess) _releaseBindingAdaptor]
    #7  0x964062f5 in -[NSView _releaseBindingAdaptor]
    #8  0x96405784 in -[NSView _finalizeWithReferenceCounting]
    #9  0x96404e2f in -[NSView dealloc]
    #10 0x964ef163 in -[NSControl dealloc]
    #11 0x9099a9d8 in CFRelease
    #12 0x909c75bd in _CFAutoreleasePoolPop
    .... more
    Turning on NSZombieEnabled did not turn up any double-released objects (although there was 1 from Photoshop itself)
    Any ideas?

    not using bindings seems to have fixed it, but if any of you have insights as to why this would be crashing with Bindings, I'd appreciate it.
    Thanks

  • Anyone help ol' man with Cocoa project, please?

    Hi all,
    I recently volunteered to help transcribe Birth, Marriage and Death (BMD) records dating back to 1837 for FreeBMD -- a registered charity -- to help folks trace their family trees online. Unfortunately, while the Mac software has some nifty features, it's still really s-l-o-o-w and tedious to use and I reckon the speed and accuracy could be increased 3x using a slightly different approach.
    I was reasonably okay with 'C' in the old days but never quite managed to get my head around OOP yet (probably due to my age). The app I have in mind consists of an ultra-simple text editor (a la Apple's 15 minute example project) with combined bare-bones image/PDF viewer plus a few extra bells and whistles, and I've already designed the interface -- about as far as I can get for now
    I see a lot of really knowledgeable folks replying to postings in this discussion group, many with huge numbers of posts under their belts, and I reckon this would be considered a fairly 'trivial' app that could be knocked out during a long coffee break for anyone experienced in Cocoa programming.
    If you feel you'd like to help with this charitable, not-for-profit project, please email me at "ojisanATadamDOTcomDOTau" and I'll send you what I've got, together with some good sample code that clearly addresses most of the problems.
    Your input will help me get a handle on what eludes me about OOP (I learn really well by example), make life easier for all the Mac volunteer transcribers out there, help MILLIONS of hobbyists trace their ancestors quicker (genealogy is the #1 hobby in the US, and probably also in Australia, UK, and Canada etc.), and help level the playing field with Windows (their transcription solution is currently better than ours).
    Kind regards
    Ernie

    Bob Lang1 wrote:
    Oooh! You're such a comedian, etresoft
    I aim to please.
    As for .NET, the major language for .NET development is C#, and this language is clearly based on Java with a few minor syntax changes. It uses exactly the same object model as Java, and even the underlying technology is similar to the Java Virtual Machine.
    I'm not attempting to convince you, just set the record straight.
    As long as we are setting the record straight, we should clarify a couple of things. .NET is the "virtual machine" part. You can use C#, J#, VB, or even a slightly twisted variant of C++ with .NET. For those of us who spent a few formative years swearing at MFC, .NET is a significant improvement.
    I haven't done much with .NET but I find it to be very much like Cocoa, both in the functionality it provides and the slightly twisted way you have to use it. In Cocoa, you have to use Objective-C or Objective-C++. In .NET, you have to use Microsoft's own slightly strange variants. If you can understand all the brackets, receivers, and messages in Cocoa, you shouldn't have any trouble with all the carets in .NET C++.
    You're quite right, it's obviously much less effort to write a program in Cocoa and then re-write it for .NET, than it is it to write it in Java in the first place and run it unchanged on three different platforms. Java is so portable that a Java program written on one platform doesn't even have to be re-compiled to run on another. If you write a program using Cocoa then you limit your market just to Macs - very much a minority platform compared to Windows. Write your program in Java and your market is literally unlimited.
    Everything you've said here is correct. Still, every Java program I have ever seen is clearly a "Java" program and usually cannot achieve the same level of integration with the OS that either .NET or Cocoa gives you by default. Java programmers still have to make an effort to ensure that their programs run and run well on platforms they didn't develop it on.

Maybe you are looking for

  • How do I mirror my mac air to my apple TV

    how do I mirror my mac air to my apple TV

  • Problem in creating Purchase order Using BAPI

    Dear ABAPers,          I am creating the Purchase order Using BAPI_PO_CREATE1. In that the Purchase order Line item i am giving the Net Price for the Material.But While creating the purchase order the system creates the puchase order with the net pri

  • Pdf send as email

    hai gurus, i am sending pdf via email its working fine but the problem is pdf file is not opened it showing an error plz help me . thanks in advance anji

  • Has anyone experienced problems with Outlook after installing Mavericks?

    Has anyone else experienced problems using Microsoft Outlook after installing Mavericks?  The computer seems to want to continue reloading emails.

  • Extending range of non-Apple network?

    I have a Linksys wireless router/gateway in my main office (let's call office 'A'), which serves as my main wireless access point, and the Linksys also has a built-in 10/100 switch, which is where I connect my wired computers and also my Mac fileserv