Re: Escaping white space in an NSString

2009-05-21 Thread Seth Willits
On May 20, 2009, at 11:26 PM, Bruce Johnson wrote: The CLI is for a Cocoa App, but I need to call this in both Leopard and iPhone char mdfile[PATHSIZE]; strncpy(mdfile, , MAXREAD); FILE * stream = fopen(, "rt"); Nothing here is command-line related at all. the rest of the c-code itera

How to set dpi of an image

2009-05-21 Thread Mahaboob
I need to save the image with respect to the given dpi. I calculated the image size proportional to the dpi and saved it. But when I'm viewing the dpi from preview it shows only 72 dpi. I used the code like: float compressionFactor = [compressionSlider floatValue]; NSDictionary *jpegProperti

Apple Sample Code not working? SampleCMPlugin

2009-05-21 Thread Steve Cronin
Folks; I'm making slow progress on what seems like should be a really simple contextual menu plugin. Build the 2006 version of Apple's SampleCMPlugin (that's the latest I could find) There is a section of code to determine if the current selection is text (or could be coerced to text):

Re: How to set dpi of an image

2009-05-21 Thread jonat...@mugginsoft.com
On 21 May 2009, at 08:29, Mahaboob wrote: I need to save the image with respect to the given dpi. I calculated the image size proportional to the dpi and saved it. But when I'm viewing the dpi from preview it shows only 72 dpi. I used the code like: float compressionFactor = [compressionSlide

Re: Menu item with 'title' bound is always enabled. Bug?

2009-05-21 Thread Mike Abdullah
In my experience, binding menu bar items just isn't worth it. Use - validateMenu… or -validateUserInterfaceItem: to conditionally enable the menu and give it a good title. Otherwise you've got to manually keep track of the main window etc. yourself which is a waste of your time. On 21 May

Re: Binding 'Enabled' to NSObjectController.selection NSIsNotNil fails?

2009-05-21 Thread Quincey Morris
On May 20, 2009, at 22:35, Seth Willits wrote: I have an NSObjectController whose Content item is bounds to an object's "thing" path. I can then bind the values of controls in my nib to model key paths through that NSObjectController in the usual way. Those Value bindings can use "Condition

Re: Unknown Host: Operation timed out Error

2009-05-21 Thread Shraddha Karwan
Hi, The application which is running on iPhone Simulator crashes. And the Debugger Console displays message "Unknown Host: Operation timed out". On Fri, May 15, 2009 at 10:12 PM, Shawn Erickson wrote: > On Fri, May 15, 2009 at 6:40 AM, Shraddha Karwan > wrote: > > Ok, but then what else could b

Re: Controlling some of CoreAnimation's more confusing automation

2009-05-21 Thread Andreas Grosam
On May 21, 2009, at 4:04 AM, Gwynne Raskind wrote: I have a UIView that contains a number of CALayers. Nothing unusual here. The CALayers are subclassed to do their drawing, because that was easier than separating the delegate logic from my UIView subclass (since the view can't be the deleg

Privilege elevation of a cocoa app

2009-05-21 Thread Arun
Hi All, I have an application which when launched asks for user to authenticate for admin rights. After user authenticates the app is launched. I thought after authentication the Application executes with admin privilages. But is is still executing in user privilages only. Is there any way in whic

Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Anshul jain
HI All, I am trying to scroll text in CAOpenGLLayer. Every thing is working fine. But the scrolling is not smooth and the CPU usage was 60 % - 80%. I think application is taking time to convert NSString into a CGImage. Is there a better way of displaying text in CAOpenGLLayer. This is

problems with inspector window

2009-05-21 Thread Vitaly Ovchinnikov
Hello list, I implemented inspector window like described here: http://borkware.com/rants/inspectors/ and now have a problem. I use NSUndoManager to store undo/redo information and if document is changed I can't close my inspector window, it asks about saving document in its main window. Is there

Re: Sensible way to extend base class?

2009-05-21 Thread Louis Gerbarg
As several people have mentioned, doing this kind of thing is very skanky, and it won't work properly under GC without some additional machinery. But if GC is not a concern you can do something that works with a bit grotesque monkey patching. The below code is generic, but it mucks with everything.

Re: NSTextView - Having to call setFrame twice to work?

2009-05-21 Thread Andy Lee
I get the same result using initWithFrame:, but if I use the designated initializer it works as expected: textView = [[NSTextView alloc] initWithFrame:NSMakeRect(0, 0, 400, 300) textContainer:nil]; The docs says that initWithFrame: creates a text container, so the difference seems to be w

Re: Privilege elevation of a cocoa app

2009-05-21 Thread Jerry Krinock
On 2009 May 21, at 02:49, Arun wrote: I have an application which when launched asks for user to authenticate for admin rights. Eyebrows are raised. After user authenticates the app is launched. I thought after authentication the Application executes with admin privilages. But is is stil

Re: Network Reachability APIs

2009-05-21 Thread Kirk Kerekes
I may have missed it, but I think that an essential point about the Reachability API has been left unmentioned: The OS Reachability API does its work without annoying the user -- something that is quite difficult to guarantee with roll-your-own versions. Believe it or not, there are still d

How to disable application menu bar item

2009-05-21 Thread Ashish Tiwari
Hi All, I want to conditionally disable some items of my application menu bar for example "Format", "Insert" etc, so that user can not click on it and can not see its submenu. When i do following: [[[NSApp mainMenu] itemWithTitle:@"Insert"] setEnabled:NO]; Menu item "Insert" in menu bar still a

Re: Escaping white space in an NSString

2009-05-21 Thread Sherm Pendley
On Thu, May 21, 2009 at 1:23 AM, Bruce Johnson wrote: > I have a unix path in an NSString via [[NSBundle bundleForClass: [self > class]] pathForResource: etc.. etc.. > The problem is that the path has white spaces scattered in the string. That's not normally a problem. > And I need to pass th

Re: How to disable application menu bar item

2009-05-21 Thread Benjamin Dobson
On 21 May 2009, at 13:36:34, Ashish Tiwari wrote: Hi All, I want to conditionally disable some items of my application menu bar for example "Format", "Insert" etc, so that user can not click on it and can not see its submenu. When i do following: [[[NSApp mainMenu] itemWithTitle:@"Insert"

Re: How to disable application menu bar item

2009-05-21 Thread Graham Cox
On 21/05/2009, at 10:36 PM, Ashish Tiwari wrote: I want to conditionally disable some items of my application menu bar for example "Format", "Insert" etc, so that user can not click on it and can not see its submenu. When i do following: [[[NSApp mainMenu] itemWithTitle:@"Insert"] setEnable

Re: Escaping white space in an NSString

2009-05-21 Thread Sherm Pendley
On Thu, May 21, 2009 at 2:26 AM, Bruce Johnson wrote: > > Post your croaking code. You seem to have some misapprehensions about > how > > command-line arguments work, > > No misapprehensions here. Sorry, but I'm afraid there are. > > What CLI were you planning to run on iPhone? > The CLI is

Feed Parsing Framework ...

2009-05-21 Thread Mic Pringle
A week or two ago, a subscriber to this list announced a new framework for parsing rss feeds. I seem to have misplaced the email, and can't find the announcement on CocoaBuilder. Can anyone remember the link (I think it pointed to a Github repo) or could the author perhaps come forward ? Thanks

Re: isKindOfClass returns null instead of YES or NO

2009-05-21 Thread Michael Ash
On Wed, May 20, 2009 at 11:43 AM, Jeff Decker wrote: > Hello, > I am working through the Stanford iPhone Dev assignments along with the > videos on iTunes.  And I'm stuck on the assignment for the first week. >  Shoot! > My goal is inspect each object of an array.  When I use isKindOfClass or > is

Re: Privilege elevation of a cocoa app

2009-05-21 Thread Michael Ash
On Thu, May 21, 2009 at 5:49 AM, Arun wrote: > Hi All, > > I have an application which when launched asks for user to authenticate for > admin rights. > After user authenticates the app is launched. I thought after authentication > the Application executes with admin privilages. But is is still ex

Re: Menu item with 'title' bound is always enabled. Bug?

2009-05-21 Thread Sean McBride
On 5/20/09 6:21 PM, Jerry Krinock said: >On a main menu item, I've set a delegate which implements - >menuNeedsUpdate:. In this method, I enable/disable some items and >also modify some item titles based on current conditions. > >With some items, however, instead of sending -setTitle: in - >menuN

Fwd: Memory management in QuickLook plugin

2009-05-21 Thread Georg Seifert
As alway I didn’t send it to the list... Use Zombies and Instruments. http://www.corbinstreehouse.com/blog/index.php/2007/10/instruments-on-leopard-how-to-debug-those-random-crashes-in-your-cocoa-app/ I do this all the time, but can’t figure out how to use Instruments with "quicklookd".

Re: Escaping white space in an NSString

2009-05-21 Thread Greg Guerin
Bruce Johnson wrote: The CLI is for a Cocoa App, but I need to call this in both Leopard and iPhone Please explain exactly what you mean by the acronym CLI. None of the interpretations I'm familiar with fit what you're doing. Or if they do, you're not explaining how you have a Command

Re: Apple Sample Code not working? SampleCMPlugin

2009-05-21 Thread Eric Schlegel
On May 21, 2009, at 1:23 AM, Steve Cronin wrote: No matter what text I select this ALWAYS fails. The plugin NEVER detects text correctly. I have set up a generic coerce method and tested for both of these as well as: typeUnicodeText, typeStyledText, typeIntlText, typeCFStringRef (They al

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Corbin Dunn
But the scrolling is not smooth and the CPU usage was 60 % - 80%. I think application is taking time to convert NSString into a CGImage. Do you know that is the case? If you have any performance issue, you should use sample and Shark. Then you can try to figure out what is wrong. -corb

Re: Feed Parsing Framework ...

2009-05-21 Thread Dave DeLong
http://www.cocoabuilder.com/archive/message/cocoa/2009/4/12/234437 Cheers, Dave On May 21, 2009, at 9:29 AM, Mic Pringle wrote: A week or two ago, a subscriber to this list announced a new framework for parsing rss feeds. I seem to have misplaced the email, and can't find the announcement on

Re: isKindOfClass returns null instead of YES or NO

2009-05-21 Thread Sean McBride
On 5/20/09 11:45 PM, Andy Lee said: >> NSLog(@"Is Member of NSURL: %@", [[step class] isMemberOfClass: >> [NSURL class]]); > >The %@ placeholder is for arguments that are objects. >isMemberOfClass: and isKindOfClass: return a BOOL, which is not an >object. Jeff, And if you're wonder

Resizing Funky

2009-05-21 Thread Walker Argendeli
I have a window with a tableview inside it, along with many other views. When I click the resize button, most things do what they're supposed to, except for two things: the table and title bar. The title bar goes completely white, except for the "hide toolbar" button which moves into a sp

Re: Binding 'Enabled' to NSObjectController.selection NSIsNotNil fails?

2009-05-21 Thread Sean McBride
On 5/20/09 10:35 PM, Seth Willits said: >I have an NSObjectController whose Content item is bounds to an >object's "thing" path. I can then bind the values of controls in my >nib to model key paths through that NSObjectController in the usual >way. Those Value bindings can use "Conditionally Sets

Re: isKindOfClass returns null instead of YES or NO

2009-05-21 Thread Kyle Sluder
On Thu, May 21, 2009 at 12:33 PM, Sean McBride wrote: > And if you're wondering if the compiler could warn you that %@ and BOOL > do not match, the answer is unfortunately no.  -Wformat=2 can give such > warnings when using sprintf() and friends, but not NSString methods. > One of my pet peeves. :

Re: problems with inspector window

2009-05-21 Thread Kyle Sluder
Override -shouldCloseDocument in your NSWindowController subclass to return NO. I'm not sure about the way this inspector has been implemented... it seems to be confusing the NSDocument machinery a bit. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-d

Re: isKindOfClass returns null instead of YES or NO

2009-05-21 Thread Gwynne Raskind
On May 21, 2009, at 12:33 PM, Sean McBride wrote: NSLog(@"Is Member of NSURL: %@", [[step class] isMemberOfClass: [NSURL class]]); The %@ placeholder is for arguments that are objects. isMemberOfClass: and isKindOfClass: return a BOOL, which is not an object. Jeff, And if you'r

Re: Privilege elevation of a cocoa app

2009-05-21 Thread Todd Heberlein
Is there any way in which i can elevate the privilege of the binary after authentication. Look at the BetterAuthorizationSample code and documentation at http://developer.apple.com/referencelibrary/Security/idxAuthorization-date.html Basically you put your privileged code in a non-GUI appl

Re: Tools in App Bundles

2009-05-21 Thread Jerry Krinock
On 2009 May 20, at 23:20, Kevin LaCoste wrote: The docs clearly state that anything in Contents/MacOS is covered by the app bundles signature. Nope. The Code Signing Guide is ambiguous at best on this point, and so I just sent them feedback "It wasn't helpful". Also, it does not work ac

Re: isKindOfClass returns null instead of YES or NO

2009-05-21 Thread Sean McBride
On 5/21/09 12:44 PM, Kyle Sluder said: >> And if you're wondering if the compiler could warn you that %@ and BOOL >> do not match, the answer is unfortunately no.  -Wformat=2 can give such >> warnings when using sprintf() and friends, but not NSString methods. >> One of my pet peeves. :) > >Not so

Re: Controlling some of CoreAnimation's more confusing automation

2009-05-21 Thread David Duncan
On May 20, 2009, at 7:04 PM, Gwynne Raskind wrote: I have a UIView that contains a number of CALayers. Nothing unusual here. The CALayers are subclassed to do their drawing, because that was easier than separating the delegate logic from my UIView subclass (since the view can't be the deleg

Re: Escaping white space in an NSString

2009-05-21 Thread Greg Guerin
Bruce Johnson wrote: char mdfile[PATHSIZE]; strncpy(mdfile, , MAXREAD); FILE * stream = fopen(, "rt"); On further reflection, this code fragment looks very suspicious. First, a local char buffer of length PATHSIZE is declared. We don't know what PATHSIZE is. Second, some unknown variab

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread David Duncan
On May 21, 2009, at 3:23 AM, Anshul jain wrote: I am trying to scroll text in CAOpenGLLayer Don't. Use a CATextLayer (which can render text for you) or a CALayer (to display image content) instead. Unless you want to get outlines of your text, the CAOpenGLLayer is really not a good way to

Re: Privilege elevation of a cocoa app

2009-05-21 Thread Greg Guerin
Todd Heberlein wrote: For example, I use HelperTool to open a specific file that require root access, and then I pass the file descriptor back to my Cocoa application. man authopen /usr/libexec/authopen -h -- GG ___ Cocoa-dev mailing list (

Questions re: Core Audio, offline rendering

2009-05-21 Thread dct
Is this the correct forum? If yes I have several questions: I need to convert formatted audio(mp3, etc) files to continuous, linear pcm data in a memory buffer--i.e., a basic process of reading from disc, converting, and transferring to buffer. Using Core Audio, I infer that I can to do th

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread David Duncan
On May 21, 2009, at 10:12 AM, David Duncan wrote: Don't. Use a CATextLayer (which can render text for you) or a CALayer (to display image content) instead. Unless you want to get outlines of your text, the CAOpenGLLayer is really not a good way to do this. Clarifying a bit - unless you w

Re: isKindOfClass returns null instead of YES or NO

2009-05-21 Thread Bill Bumgarner
On May 21, 2009, at 9:53 AM, Gwynne Raskind wrote: You will find that Apple has indeed dropped in -Wformat checks for "nsstring_format_type" and "cfstring_format_type". But if you scroll down a ways further, you'll find that OOPS!, Apple hasn't actually implemented those types, at least not

Re: Questions re: Core Audio, offline rendering

2009-05-21 Thread Kyle Sluder
On Thu, May 21, 2009 at 1:18 PM, dct wrote: > Is this the correct forum? No, you want coreaudio-api. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

link to a Framework from within a sub bundle

2009-05-21 Thread Richard Salvatierra
I have an application with a copy phase that places a custom framework in the the app bundle /Contents/Frameworks/ folder. I also have bundles in /Contents/Modules/ folder of the main bundle. My question is: How do I link to a Framework in the main bundle /Contents/ Frameworks/ folder from a

Question about notifying KVO observers of changes to a property.

2009-05-21 Thread Morales Vivó Óscar
I have an cocoa controller object with a property that is actually read from another, C++ object. It works fine when updating or reading the value, but sometimes other C++ parts of the program will change the value of the property and there's no good way to notify the cocoa controller objec

Re: Controlling some of CoreAnimation's more confusing automation

2009-05-21 Thread Gwynne Raskind
On May 21, 2009, at 1:09 PM, David Duncan wrote: I have a UIView that contains a number of CALayers. Nothing unusual here. The CALayers are subclassed to do their drawing, because that was easier than separating the delegate logic from my UIView subclass (since the view can't be the delegate

Re: link to a Framework from within a sub bundle [solved]

2009-05-21 Thread Richard Salvatierra
The framework needs the "Installation Directory" as @executable_path/../Frameworks I have an application with a copy phase that places a custom framework in the the app bundle /Contents/Frameworks/ folder. I also have bundles in /Contents/Modules/ folder of the main bundle. My question is

Re: Question about notifying KVO observers of changes to a property.

2009-05-21 Thread Peter Duniho
On May 21, 2009, at 11:33 AM, Morales Vivó Óscar wrote: I have an cocoa controller object with a property that is actually read from another, C++ object. It works fine when updating or reading the value, but sometimes other C++ parts of the program will change the value of the property and

garbage collection and pointer to object

2009-05-21 Thread Michael Link
I have a class with the following methods - (void)save { NSError* error = nil; if (![self save:&error]) { NSLog(@"caught error during save: %@", error); } } - (BOOL)save:(NSError**)error { if (![_thread isCancelled]) { retu

Re: Privilege elevation of a cocoa app

2009-05-21 Thread Erg Consultant
Never run an 'app' as privileged. You need a helper tool to do that. You have a lot of reading ahead of you to understand how to do this. Erg From: Jerry Krinock To: "cocoa-dev@lists.apple.com Developers" Sent: Thursday, May 21, 2009 4:25:15 AM Subject: Re:

What's the differnece between API and Framework?

2009-05-21 Thread Chunk 1978
my learning is still shady on what is actually an API... sounds like a framework to me... ? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-a

Re: Question about notifying KVO observers of changes to a property.

2009-05-21 Thread Morales Vivó Óscar
Good point. The problem I'm having is that I don't know when to call the "willChange…" method, only that sometimes I need to call the "didChange…" one. On May 21, 2009, at 16:34 , Peter Duniho wrote: On May 21, 2009, at 11:33 AM, Morales Vivó Óscar wrote: I have an cocoa controller object

Re: What's the differnece between API and Framework?

2009-05-21 Thread Jonathan Hess
An API is a set of functions, classes, methods, and other bits that give you a method to interface with a piece of software. A framework is one concrete way to package a body of software with a set of header files that describe its API. A web service is another way to give clients an API to

Re: Question about notifying KVO observers of changes to a property.

2009-05-21 Thread Peter Duniho
On May 21, 2009, at 5:43 PM, Morales Vivó Óscar wrote: On May 21, 2009, at 16:34 , Peter Duniho wrote: On May 21, 2009, at 11:33 AM, Morales Vivó Óscar wrote: I have an cocoa controller object with a property that is actually read from another, C++ object. It works fine when updating or r

Re: Question about notifying KVO observers of changes to a property.

2009-05-21 Thread Ken Thomases
On May 21, 2009, at 7:43 PM, Morales Vivó Óscar wrote: On May 21, 2009, at 16:34 , Peter Duniho wrote: On May 21, 2009, at 11:33 AM, Morales Vivó Óscar wrote: I have an cocoa controller object with a property that is actually read from another, C++ object. It works fine when updating or r

Re: What's the differnece between API and Framework?

2009-05-21 Thread Chunk 1978
ok... so an API is like a lower level framework? wikipedia states that Carbon and Cocoa are APIs on Mac, but i always thought those were frameworks. On Thu, May 21, 2009 at 8:50 PM, Jonathan Hess wrote: > An API is a set of functions, classes, methods, and other bits that give you > a method to

Re: Question about notifying KVO observers of changes to a property.

2009-05-21 Thread Seth Willits
On May 21, 2009, at 5:43 PM, Morales Vivó Óscar wrote: Good point. The problem I'm having is that I don't know when to call the "willChange…" method, only that sometimes I need to call the "didChange…" one. It's pretty straight forward. [blah willChange...]; the_change [blah didChange...]

Re: What's the differnece between API and Framework?

2009-05-21 Thread Graham Cox
On 22/05/2009, at 11:38 AM, Chunk 1978 wrote: ok... so an API is like a lower level framework? wikipedia states that Carbon and Cocoa are APIs on Mac, but i always thought those were frameworks. An API is the soup, the framework is the tin it comes in. Soup also comes in cartons and bowls

Re: What's the differnece between API and Framework?

2009-05-21 Thread Michael Ash
On Thu, May 21, 2009 at 9:38 PM, Chunk 1978 wrote: > ok... so an API is like a lower level framework?  wikipedia states > that Carbon and Cocoa are APIs on Mac, but i always thought those were > frameworks. They are both! API stands for Application Programming Interface. "Interface" is the key w

Re: What's the differnece between API and Framework?

2009-05-21 Thread Todd Heberlein
ok... so an API is like a lower level framework? wikipedia states that Carbon and Cocoa are APIs on Mac, but i always thought those were frameworks. The terms are thrown around loosely. Here is how I would define them: The API is the design or *blueprint* that tell you how to interact with a

Affine transform not being applied to subviews

2009-05-21 Thread Ken Tozier
Hi I wrote a custom view that contains several other views and am having problems when applying an affine transform to the main view. The main view is a page and the two subviews are a crop view that displays page margins and a column view that displays the page columns. I've checked to m

Re: Affine transform not being applied to subviews

2009-05-21 Thread Graham Cox
On 22/05/2009, at 12:52 PM, Ken Tozier wrote: - (void) drawRect:(NSRect) inRect { NSAffineTransform *transform = [self transform]; [transform concat]; [[NSColor whiteColor] set]; NSRectFillUsingOperation([self frame], NSCompos

Re: Affine transform not being applied to subviews

2009-05-21 Thread Kyle Sluder
On Thu, May 21, 2009 at 10:52 PM, Ken Tozier wrote: > Perhaps I'm not understanding how transforms are supposed to work, but from > my reading of the relevant drawing and transform documentation, I got the > impression that if a transform was applied to a view, it treated the view > and all it's s

Ask for NSTextField

2009-05-21 Thread star red
Hi, friends ! When a user presses a right mouse button on the NSTextField, a context menu will appear. I want that a context menu will not appear at this time. How can ? Give me sample code, please. Help m !!! SoS!!! ___ Cocoa-dev mailing list (

Getting other application's window/document name

2009-05-21 Thread John Ku
What should I look into if I need to grab the document/window name from other running applications? Currently I have the following to get a list of available running applications: [[NSWorkspace sharedWorkspace] launchedApplication] How do I go about getting the document/window name from other appl

Merge 2 QTTracks in a QTMovie

2009-05-21 Thread Alex Bumbu
Hi all, I'm trying to add 2 sounds tracks in a QTMovie so they play at the same time. I've tried adding both sound tracks with the layer property changed to the qtmovie but the tracks are played one after another. Is this possible? And if is possible any help is really appreciated. Thanks in

Deallocating cocoa distant objects.

2009-05-21 Thread Santosh Sinha
Hi List. I need your help with how to deallocate an object which is created in a server process A from a client process B. In the project as we can see in the NSLog once the MyClass object is created and returned to the client, its retain count becomes 3. This causes the MyClass object to

How to use CFReadStrem and abort read stream normally?

2009-05-21 Thread Chris Gardner
Hi, I have already read through CFReadStream archives, and still have trouble with it. After CFReadStreamOpen() has been implement and its status is kCFStreamEventHasBytesAvailable, so I can read data from the source.Of course, there's no problem. As for the FTP server, I can connect it by usi

Re: Getting other application's window/document name

2009-05-21 Thread Kyle Sluder
On Thu, May 21, 2009 at 3:59 AM, John Ku wrote: > How do I go about getting the document/window name from other applications? Unless the developers of the application have explicitly provided an API with which to do so (the most common one is AppleScript) then you can't do it. As far as your app

Re: What's the differnece between API and Framework?

2009-05-21 Thread Gunnar Proppe
There are also multiple definitions of "framework." Here's Apple's definition: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WhatAreFrameworks.html "A framework is a hierarchical directory that encapsulates shared resources, such as a dynamic shared library, ni

Compiler does not synthesize KVO compliant properties for CATiledLayer subclass (was: Synthesized properties for scalars not KVO compliant)

2009-05-21 Thread Kiel Gillard
Hi all, Thanks for your suggestions and help so far. I believe my problem is that my model object is a subclass of CATiledLayer. Synthesized accessor methods for the CATiledLayer subclass are not key value observing compliant. Yet, by changing the immediate superclass of the model object t

Re: Deallocating cocoa distant objects.

2009-05-21 Thread Ken Thomases
On May 21, 2009, at 4:01 PM, Santosh Sinha wrote: I need your help with how to deallocate an object which is created in a server process A from a client process B. In the project as we can see in the NSLog once the MyClass object is created and returned to the client, its retain count becom

Re: Ask for NSTextField

2009-05-21 Thread Nick Zitzmann
On May 21, 2009, at 12:58 AM, star red wrote: When a user presses a right mouse button on the NSTextField, a context menu will appear. I want that a context menu will not appear at this time. Why? That's really non-standard. How can ? The first thing I'd try is setting the text field'

Re: Affine transform not being applied to subviews

2009-05-21 Thread Ken Tozier
Thanks Graham It took a bit of trial and error, but scaleUnitSquareToSize seems to do what I want. I ripped out all the transform code and just wrote a simple override to setFrame for the page view - (void) setFrame:(NSRect) inFrame { NSSize currentSize = [self

Re: How to set dpi of an image

2009-05-21 Thread Mahaboob
I gone through that links and I can't figure it out how to set the dpi. By googling I found a function to set dpi in windows : public RenderTargetBitmap( int pixelWidth, int pixelHeight, double dpiX, double dpiY, PixelFormat pixelFormat ) Is there any equivalent method? Is it

Re: How to set dpi of an image

2009-05-21 Thread Graham Cox
On 22/05/2009, at 2:48 PM, Mahaboob wrote: I gone through that links and I can't figure it out how to set the dpi. By googling I found a function to set dpi in windows : public RenderTargetBitmap( int pixelWidth, int pixelHeight, double dpiX, double dpiY, PixelFormat pixelFo

Re: Getting other application's window/document name

2009-05-21 Thread Eric Schlegel
On May 21, 2009, at 12:59 AM, John Ku wrote: What should I look into if I need to grab the document/window name from other running applications? Currently I have the following to get a list of available running applications: [[NSWorkspace sharedWorkspace] launchedApplication] How do I go a

Re: Getting other application's window/document name

2009-05-21 Thread John Ku
Fantastic, this is exactly what Im looking for. Time to dive into C! Thanks!! On Thu, May 21, 2009 at 10:24 PM, Eric Schlegel wrote: > > On May 21, 2009, at 12:59 AM, John Ku wrote: > > What should I look into if I need to grab the document/window name from >> other running applications? Curre

Re: [Core Data] Difference between objectWithID: and a fetch "self IN %@", someObjectIDs ????

2009-05-21 Thread Aurélien Hugelé
That's very clear, thanks for the explanation! Aurélien, Objective Decision Team On 20 mai 09, at 21:15, Ben Trumbull wrote: In the main thread, using objectWithID: repeatedly on each objectID sent by the subthread returns the object that was inserted in the background thread. This is exac

Re: Compiler does not synthesize KVO compliant properties for CATiledLayer subclass (was: Synthesized properties for scalars not KVO compliant)

2009-05-21 Thread Dave Keck
Hello, A few days ago I was having this same issue. The reason KVO doesn't work out-of-the-box with CALayer subclasses, I believe, is because CALayer overrides +automaticallyNotifiesObserversForKey: to return NO. My solution was to override +aNOFK: in my custom subclass to return YES for my custom

Re: Getting other application's window/document name

2009-05-21 Thread Kyle Sluder
On Fri, May 22, 2009 at 1:43 AM, John Ku wrote: > Fantastic, this is exactly what Im looking for. Time to dive into C! This is not going to get you the names of documents, it will get you the titles of windows. You have no idea whether a window is a document window, inspector, or other some othe

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Anshul jain
HI thanks for suggestion. Since i want to scroll the text so i have to update it regularly so i have taken a CAOPenGLLayer and set is asynchronous and i am using - (void)drawInCGLContext:(CGLContextObj)glContext pixelFormat: (CGLPixelFormatObj)pixelFormat forLayerTime: (CFTimeInterval)

Re: Best way to draw text in CAOpenGLLayer

2009-05-21 Thread Anshul jain
HI thanks for suggestion. Since i want to scroll the text so i have to update it regularly so i have taken a CAOPenGLLayer and set is asynchronous and i am using - (void)drawInCGLContext:(CGLContextObj)glContext pixelFormat: (CGLPixelFormatObj)pixelFormat forLayerTime: (CFTimeInterval)

Re: Getting other application's window/document name

2009-05-21 Thread John Ku
I should have been more specific in the question sorry.And you are right, just tried this with Adobe Photoshop and gave me at least twenty entries for photoshop's floating windows and palettes and others like spotlight, systemUI Server. With background processes, I could probably match it against w

Re: Compiler does not synthesize KVO compliant properties for CATiledLayer subclass (was: Synthesized properties for scalars not KVO compliant)

2009-05-21 Thread Kiel Gillard
Hi Dave, On 22/05/2009, at 4:12 PM, Dave Keck wrote: Hello, A few days ago I was having this same issue. The reason KVO doesn't work out-of-the-box with CALayer subclasses, I believe, is because CALayer overrides +automaticallyNotifiesObserversForKey: to return NO. My solution was to override

Re: Getting other application's window/document name

2009-05-21 Thread Eric Schlegel
On May 21, 2009, at 11:32 PM, John Ku wrote: I should have been more specific in the question sorry. And you are right, just tried this with Adobe Photoshop and gave me at least twenty entries for photoshop's floating windows and palettes and others like spotlight, systemUI Server. With bac