cocoa

question about CGAffineTransformTranslate

CGRect rect1 = backgroundImageView.frame; NSLog(@"%f,%f,%f,%f",rect1.origin.x,rect1.origin.y, rect1.size.width,rect1.size.height); angle = -90.0; moveX = 0; moveY = 0.0; CGFloat degreesToRadians = M_PI * angle / 180.0; CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation(degreesToRadians); lan...

How can I close a Window using the OS-X ScriptingBridge framework, from Perl?

Problem... Since MacPerl is no longer supported on 64bit perl, I am trying alternative frameworks to control Terminal.app. I am trying the ScriptingBridge, but have run into a problem passing an enumerated string to the closeSaving method using the PerlObjCBridge. I want to call: typedef enum { TerminalSaveOptionsYes = 'yes ' /* ...

(MACOSX) - Knowing whether a mounted device was mounted from a DMG

Well the title says it all - couldn't find that info using DiskArbitration or FSGetVolumeInfo/GetVolumeParms... I know that hdiutil uses a private framework called DiskImages framework, but I wouldn't want to run an external utility each time I want this info... wheres the API for this ? Thanks. ...

Saving as iwb(Interactive whiteboard) file format

Hi, how can i save a file as iwb(interactive whiteboard ) file format in cocoa. ...

Simple approach to develop an text editing tool for the mac?

I come from the iPhone development world but have never developed desktop applications. Now I want to write a small but helpful text editor for helping wiring small articles. I have found that I always summarize knowledge in TextEdit in a raw, not nicely formatted manner. Next, I go through that and start forming useful sentences out o...

Problems retrieving a Struct from an Array

Hi, wonder whether someone can help me with the following one... I have a struct typedef struct { NSString *section; NSString *row; } myStructDef; that I fill and write from function parameters "value[x]" to an NSMutableArray iVar "Arr1" of NSMUtableArrays local "Arr2" using: myStruct.section = [NSString stringWithUTF8Stri...

Where do I find the "Collapsible Panel" Cocoa control in Interface Builder?

Hi, I'm trying to add a collapsible panel to a panel I added in the Interface Builder, similar to the one found in Office 2008 and XCode itself. This is the collapsible panel for those that don't know it: Any idea how I can add this to my project? Google hasn't been of much help. ...

Suppressing NSLog statements for release?

Possible Duplicate: Do I need to disable NSLog before release Application? I wonder if someone could help me setup a number of NSLog statements so they print to console when executing in "Debug Mode" but don't print in "Release Mode". I understand I need to add something like DEBUG = 1 to the debug config in Xcode but I can't ...

How do I build an app and framework on OS X 10.6 that can run on 10.5?

Here's my situation: I have the source code for a third-party framework that I want to include in my project. I'm developing on 10.6 but I want to support 10.5, so I have the base SDK and the deployment target set to 10.5. I can build the framework and the application, and the app runs inside Xcode and on the machine. However, it fails ...

How can I unzip a file in MacOS X Obj-C?

How can I unzip a file in MacOS X Obj-C? What frameworks do I need and what is the call? ...

Are NSColors like tungsten and steel also available?

I know Cocoa gives you whiteColor, blackColor, darkGrayColor, but do they also have the colors from in Apple's color panel? With colors like "Snow", "Tungsten", "Steel", "Tin" ? Or should I create those myself? ...

conceptual help with sending data to global hud, Cocoa

Hello all! I have a multidocument application. I want to pull data from each of those documents and mirror a subset of the data into a global 'management' HUD window that can sit on another screen. Do I need a global object of my HudController in each document instance or is there a way I can delegate all the info from the various doc...

how to return C++ pointer in objective-C++

I have the following objective-C++ header with the simple method to return this pointer. @interface MyObj { MyCPPObj * cpp; } -(MyCPPObj *) getObj; I have created the simple method @implementation MyObj -(MyCPPObj *) getObj { return cpp; } Everything seems to work until I actually try to use the object in another file newObj =...

Saving custom attributes in NSAttributedString

I need to add a custom attribute to the selected text in an NSTextView. So I can do that by getting the attributed string for the selection, adding a custom attribute to it, and then replacing the selection with my new attributed string. So now I get the text view's attributed string as NSData and write it to a file. Later when I open t...

iPhone - how to store documents consisting of multiple images?

My iPhone (actually, iPad) app creates documents that consist of several images, plus a bit of metadata. What's the best practice for storing these sorts of documents on disk? I see two main options: Create a folder for each document, and store my images as separate PNG files within the folder (plus another little file for the metada...

BWToolkit inclusion crashing

Hey guys I'm using the latest version of XCode (3.2.2) and I've linked the framework using the tutorial. I was building my app and tested it and I get a BWToolkit exception on decoding. I've included the Framework in the frameworks and added it to the copy files stage. I even created a new dummy app including the framework and adding i...

How can I check whether Exposé is being activated or not?

Hi, I'm creating an application that emulates MacBook's multi-touch Trackpad. As you may know, on MacBook's trackpad if you swipe 4 fingers up, it triggers the Show Desktop. if you swipe 4 fingers down, it shows the Exposé. However, if the Show Desktop is being activated and you swipe 4 fingers down, it will come back to the normal ...

How is a Delegate is different from an object in cocoa…?

Hi, i want to know how Delegate is differ from object in cocoa any good articles. Thanks. ...

How to implement On-Screen Keyboard in cocoa

I need to implement application same as like on screen keyboard which is in mac in cocoa give some suggestions ...

Converting a HTML string to normal text using iphone dev

how to convert a HTML string to a plain text in iphone dev. Is there any in built functions which does it ? I am actually downloading a html string from web and showing it in the UIwebview and i am giving the user a edit option so that the html needs to converted to tet so that user can edit Thanks... ...