Re: Details and the concepts related to the Nib Window

2010-03-23 Thread Chaitanya Pandit
ckground stuff happening in the background. > You may have to look up on NSRunLoop in the Threading Programming Guide > I want to see these stuff so that I can modify things accordingly whenever > needed. > Thanks, Chaitanya Pandit Chief Architect Expersis Software I

Re: Sending a Cmd-V keystroke

2010-03-29 Thread Chaitanya Pandit
Try [windowObject makeFirstResponder:testField1]; instead of [textField1 becomeFirstResponder]; Thanks, Chaitanya Pandit On Mar 26, 2010, at 5:53 AM, Jim Graham wrote: > Hi > > This is a problem that occurred a few months back in a project. I Never > actually used it in the pr

Re: NSPrintInfo, setting filename for print to PDF?

2010-04-08 Thread Chaitanya Pandit
Hi, You should set the name in the NSPrintOperation object, look at the "setJobTitle:" method of NSPrintOperation Thanks, Chaitanya Pandit On Apr 8, 2010, at 2:56 AM, Brian Postow wrote: > Ok, I'm still working on this from my other question. I can see the printinfo

Re: Core Data Versioning: Non-trivial Value Expressions?

2010-05-04 Thread Chaitanya Pandit
else [newObject setValue:value forKey:key]; } } [inManager associateSourceInstance:inSourceInstance withDestinationInstance:newObject forEntit

Re: NSPrintOperation Fails to Auto-Paginate?

2010-05-04 Thread Chaitanya Pandit
Have a look at the TextEdit sample code in /Developer/Examples/TextEdit The MultiPageView handles that Thanks, Chaitanya Pandit Architect Expersis Software Inc. On May 3, 2010, at 9:33 PM, David Duncan wrote: > On May 2, 2010, at 7:57 PM, DairyKnight wrote: > >> I've been wor

CAScrollLayer scrollToPoint: suppress animation

2010-05-11 Thread Chaitanya Pandit
Is there any way to make CAScrollLayer to scroll to a point without animating? I tried this just before i call scrollToPoint, but didn't work [CATransaction begin]; [CATransaction setValue: (id) kCFBooleanTrue forKey: kCATransactionDisableActions]; [CATransaction commit]; Any idea? Thanks, Ch

Re: How to edit/resize embedded graphics and images in a NSTextView ?

2010-05-12 Thread Chaitanya Pandit
NSTextView by default won't allow you to resize the media objects, these media objects are actually NSTextAttachments displayed in NSTextAttachmentCells. Thanks, Chaitanya On May 12, 2010, at 10:27 PM, Anders Sommer Lassen wrote: > Hi, > > I want to embed graphics and images in a NSTextView,

Noise in CALayer

2010-05-13 Thread Chaitanya Pandit
I'm playing with cover flow in one of my apps with the "CovertFlow" sample code from apple (http://www.letscocoa.com/CovertFlow.zip) However, sometimes i see a weird noise kinda thing in the shadows, here is a snapshot: http://cl.ly/17ci Any idea what might be going wrong? Tha

[Solved]: Noise in CALayer

2010-05-14 Thread Chaitanya Pandit
BINGO! that did the trick! Thanks Bertrand! Chaitanya Pandit On May 14, 2010, at 11:28 AM, Bertrand Landry-Hetu wrote: > By the looks of that screen shot I'd suggest you had a look at the > bitmap used to fade out the reflection, there is probably a semi > transparent gradient

Re: Programmatic Binding

2010-05-18 Thread Chaitanya Pandit
Are you exposing the binding first? + (void)exposeBinding:(NSString *)binding Thanks, Chaitanya Pandit Chief Architect Expersis Software Inc. On May 18, 2010, at 7:47 PM, Richard Somers wrote: > I have an issue that has me absolutely stumped. I have a custom view using a > custom layer

Re: List of all supported apps for file type

2010-05-23 Thread Chaitanya Pandit
You can do "CFArrayRef applications = LSCopyApplicationURLsForURL((CFURLRef)fileUrl, kLSRolesAll);" to get the applications and then call: - (BOOL)getInfoForFile:(NSString *)fullPath application:(NSString **)appName type:(NSString **)ty To get the application details On May 24, 2010, at 4:27

Re: six things I wasn't able to do with Cocoa

2010-05-28 Thread Chaitanya Pandit
> > *3)** **I **can't get t**he right dimensions for a QuickTime movie or poster > * > NSSize movieSize = [[movieObject currentFrameImage] size]; > I used to call GetMovieBox, so I tried using [QTMovie posterImage] but the > NSImage reported a width and height of 100, and then my movie poster

Re: POST request on iPhone

2010-06-01 Thread Chaitanya Pandit
I'd written a sample app, here: http://www.letscocoa.com/2010/02/16/mysqlphp-iphone-app/ Thanks, Chaitanya Pandit Expersis Software Inc. On Jun 1, 2010, at 3:33 PM, Joshua Tucker wrote: > Hey, > > has anyone got any sample code for a POST request for interfacing with an API

Re: Spotlight-Style search menu

2010-06-02 Thread Chaitanya Pandit
I don't know but if you can set your NSStatusItem as a custom view and determine it's location on the screen, you can then show your custom view in a borderless window at that position On Jun 2, 2010, at 9:18 PM, John Johnson wrote: > So I know how to set a view in an NSMenuItem, but my questi

Re: Spotlight-Style search menu

2010-06-02 Thread Chaitanya Pandit
> > This is the solution I've decided on as well. It's actually a button on a > window that I want to trigger the search field to pop down, and I still want > it to behave like a menu, i.e. clicking anywhere else on the screen dismisses > the "menu", and the button get's the pushed in look. Wha

CFAttributedString and NSDATA

2010-06-03 Thread Chaitanya Pandit
p. Thanks, Chaitanya Pandit ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscrip

Re: CFAttributedString and NSDATA

2010-06-03 Thread Chaitanya Pandit
Yeah NSAttributedString is available in 3.2, but what would have been more helpful would be having the AppKit additions of NSAttributedStrings. The CFAttributedString and the NSAtttibutedString in 3.2 looks kinda half hearted effort without the AppKitAdditions Chaitanya Pandit On Jun 3, 2010

"draggedImage" and "draggedImageLocation:"

2010-06-14 Thread Chaitanya Pandit
Hey guys, I'm observing a very weird behavior with NSDraggingInfo, I have a NSTextView subclass where i have implemented dragging. When i drag an image from safari and drop it in the textView and try to access the draggedImage from the supplied sender, it returns nil. Also, the point that "dragge

UITableView.layer renderInContext: after setContentOffset ?

2010-07-05 Thread Chaitanya Pandit
Hi, List I'm trying to create an image out of a UITableView using the layer's renderInContext Method, however my problem is that i have to create an image of the specific portion of the tableView So i call setContentOffset and then try to generate the image, however this doesn't work and I get a

Core Data Migration

2009-12-20 Thread Chaitanya Pandit
model has been changed I'd really appreciate any help. Thanks, Chaitanya Pandit Expersis Software Inc. http://www.expersis.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Core Data Migration

2009-12-22 Thread Chaitanya Pandit
Oh sorry, forgot to 'reply all' my bad. Thanks, Chaitanya Pandit Expersis Software Inc. On Dec 22, 2009, at 7:12 PM, Jerry Krinock wrote: > > On 2009 Dec 21, at 23:16, Chaitanya Pandit wrote: > >> Hi jerry, >> I think what i'll have to do is if the user clo

Re: iPhone: NSXMLParser problems

2010-01-06 Thread Chaitanya Pandit
Hi, Are you using the libXML for parsing? Have a look at the XMLPerformance sample code by Apple: http://developer.apple.com/iphone/library/samplecode/XMLPerformance/index.html Thanks, Chaitanya Pandit Expersis Software Inc. On Jan 5, 2010, at 7:13 PM, Eric E. Dolecki wrote: > I take that b

Problem: Glyps get drawn outside Line Fragment Rect.

2008-07-12 Thread chaitanya pandit
In my custom NSTextView i override NSTextContainer's lineFragmentRectForProposedRect: sweepDirection: movementDirection: remainingRect: method to lay text only in certain parts of the text view, so in this method, i return the line fragment rectangles in which i allow text to be laid. The

Updating print panel preview

2008-07-12 Thread chaitanya pandit
I have a document based application in which i need to print about 50-70 pages of NSTextView, the printing is working fine, but in the small print preview shown in the print panel, it doesn't show all the pages. Like if there are say 50 pages to be printed, it'll show only abt 20 pages i

How to detect NSTextAttachment deletion

2008-07-14 Thread chaitanya pandit
Hi, I am using a NSTextView and i programatically insert images as NSTextAttachments in the textView. These attachments are shown in an NSTextAttachmentCell by the NSTextView. I want to do some background processing just before the user deletes the image from the textView. This can happen if

Re: how do I make chat bubbles using a custom cell

2008-07-16 Thread chaitanya pandit
One idea would be to create an NSBezierPath with the shape of the chat bubble, once u have it you can use the CTGradient calss's [gradient fillBezierPath] method to fill it with an aqua look. The CTGradient project is here: http://blog.oofn.net/2006/01/15/gradients-in-cocoa/ On 15-Jul-08, at

Re: NSUserDefaultsController, when does value change?

2008-07-16 Thread chaitanya pandit
Try registering for the NSUserDefaultsDidChangeNotification On 16-Jul-08, at 12:48 PM, Matt Neuburg wrote: On Mon, 14 Jul 2008 19:36:29 -0700, "James W. Walker" <[EMAIL PROTECTED] > said: On Jul 14, 2008, at 9:34 AM, Matt Neuburg wrote: On Sun, 13 Jul 2008 21:29:56 -0700, "James W. Walker

Image name for drag and drop from Safari

2008-07-18 Thread chaitanya pandit
Hi, In my application, i allow users to drag and drop images from Safari, however while receiving the drop i cannot retrieve the image name from the pasteboard. If i get the data for URL pasteboard type, it gives the URL up to the image, and not containing the image, what i mean is, if the

Flip animation like dashboard widgets

2008-07-18 Thread chaitanya pandit
Is there any way to do flip animation like the one with dashboard widgets when u click the "i" to change the settings for the widget. Can it be done for NSView? I'd appreciate any help Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

[SOLVED] Image name for drag and drop from Safari

2008-07-18 Thread chaitanya pandit
Hi, Thanks for your reply, Clipboard viewer did the trick, Its the NSRTFDPboard type that contains the required data. // Get the rtfd data, get the attachment and then get the attachment name from it NSData *nameData = [[sender draggingPasteboard] dataForType:NSRTFDPboardType]; NSAttrib

NSTextView displaying a square instead of carriage return

2008-07-23 Thread chaitanya pandit
Hi, I am subclassing NSTextView and there is a weird thing happening, some times it displays a box (snapshot attached) instead of a carriage return. Any idea what might causing this? Thanks for any help. <>___ Cocoa-dev mailing list (Cocoa-dev@l

Re: Correct way to commit pending text field edits?

2008-07-24 Thread chaitanya pandit
You need to call this on the NSTextField's cell: setSendsActionOnEndEditing:YES Hope it helps. -Chaitanya On 24-Jul-08, at 10:23 PM, Graham Cox wrote: I have a window with a bunch of text fields. I also have an "Apply" button which takes the current settings and applies them to the data m

QTKit Error loading DesktopVideoOut.component

2008-07-25 Thread chaitanya pandit
Hi, In my application i use a QTMovieView to display/play movies, but whenever init a QTMvoveView i get the following log, Any idea what might be wrong? Thanks for help. Running… =shlibs-removed,shlib- info=[num="116",name="AudioIPCPlugIn",kind="B",dyld- addr="0x15306000",reason="dyld",requ

Re: Getting the Alert volume

2008-07-25 Thread chaitanya pandit
try NSBeep(); - Chaitanya On 25-Jul-08, at 6:13 PM, Mudi Dandan wrote: I need to get the Alert Volume set in Preferences so that I can respect the user's setting when playing alerts with NSSound. I have found GetSysBeepVolume() in CarbonSound/Sound.h but unfortunately it's deprecated since 1

Re: draw string with ellipsis

2008-07-27 Thread chaitanya pandit
Hi, Heres what u can do, NSString *stringToDraw; // the string to draw NSMutableDictionary *attrs = [NSMutableDictionary dictionaryWithCapacity:2]; NSMutableParagraphStyle *ps = [[[NSMutableParagraphStyle alloc] init] autorelease]; [ps setLineBreakMode:NSLineBreakByTruncatingTail]; [attrs se

Re: draw string with ellipsis

2008-07-28 Thread chaitanya pandit
it's height and offset it vertically myself? On Mon, Jul 28, 2008 at 9:57 AM, chaitanya pandit <[EMAIL PROTECTED]> wrote: Hi, Heres what u can do, NSString *stringToDraw; // the string to draw NSMutableDictionary *attrs = [NSMutableDictionary dictionaryWithCapacity:2]; NSMutablePar

Re: Access to events in tight loop?

2008-07-28 Thread chaitanya pandit
What you can do is use the NSWindow's nextEventMatchingMask: method to determine the next event, here you can check for events that should discontinue your current processing. So, say if u want to do some processing only while mouse down, and stop if there is a mouse up while you are doing it

Searchkit: adding metadata

2008-08-01 Thread chaitanya pandit
Hi, In my application i have to add number of images to the search index using searchKit, but i want to add other information (metadata) about the images in the search index, like suppose a name which will be different that the image's file name in it's file path. I tried using SKIndexSetDoc

Re: Opening and Saving an RTFD

2008-08-04 Thread chaitanya pandit
Hi, I'm not sure what exactly you are trying to do but i believe you need to create a NSTextAttachment from the file wrapper and then generate an attributed string out of it. NSFileWrapper* filewrapper = [[NSFileWrapper alloc] initWithPath:path]; NSTextAttachment *attachment = [[[NSTextAttac

Re: handling idle events

2008-08-05 Thread chaitanya pandit
Hi, You can use NSNotificationQueue to post your custom notification when the run loop is idle (NSPostWhenIdle), and do the processing in it's listener method. On 05-Aug-08, at 10:16 PM, Jim Crafton wrote: Is there a way to handle idle time in an NSApplication? In Win32 or Carbon, since yo

NSTypesetter setLineFragmentRect:

2008-08-07 Thread chaitanya pandit
In my application i have TextView with inLine images/attachments, if i try to move the line to a different location using NSTypesetter's setLineFragmentRect: forGlyphRange: usedRect: baselineOffset: the inline attachments don't move with the text, even the drawRect for the NSTextAttachmentCel

NSTypesetter layoutParagraphAtPoint:

2008-08-12 Thread chaitanya pandit
Hello, Well i've been struggling with this for quite a while and would appreciate if anyone could point me in the right direction. I am trying to implement a custom NSTypesetter, to start with i just want to lay 2 characters, an "A" and an inline image, thats it. The character "A" gets drawn p

Re: Programmatically place cursor within NSTextField

2008-08-13 Thread chaitanya pandit
Hi, You first have to compute the character index where you need to place the cursor, then create a range with zero length and location = character index, Then get the editor (NSText object) for the text field, you can get one by calling NSWindow's "- (NSText *)fieldEditor:(BOOL)createWhen

Re: NSTypesetter layoutParagraphAtPoint:

2008-08-13 Thread chaitanya pandit
this case, you're not specifying the "not shown" attribute for the attachment. Attachment glyph should not be shown. Aki On 2008/08/12, at 19:54, chaitanya pandit wrote: Hello, Well i've been struggling with this for quite a while and would appreciate if anyone could p

Re: Shared NSTextView

2008-08-18 Thread chaitanya pandit
You can share an instance of NSTextStorage and NSLayoutManager with multiple NstextContainer+NSTextViews only if you are displaying same text in all those textViews. But as in your case you will have to use a separate set of above classes for each textView, that means you cannot share the la

NSATSTypesetter Line computation problem

2008-08-19 Thread chaitanya pandit
In my application i use a custom text container to lay text around a hole, the problem occurs when i have two holes side by side. In this case the line would be broken down in to three line fragments. The problem occurs when the rightmost fragment has bigger font than the ones on the left.

Re: This document's file has been changed by another application?

2008-08-19 Thread chaitanya pandit
Are you actually saving the contents of the document to a file inside the package? Try to get the document's fileURL and check if it is the same for the first and subsequent save operations, that might give a hint. The problem might also occur if you arbitrarily tweak the fileUrl. -Chaitanya

Re: Application crashing ( Maybe I'm over releasing object? )

2008-08-19 Thread chaitanya pandit
Try using NSZombieEnabled to trap over released objects, Have a look at the following documents for using NSZombieEnabled http://developer.apple.com/technotes/tn2004/tn2124.html Also, http://cocoadev.com/index.pl?NSZombieEnabled -Chaitanya On 20-Aug-08, at 12:40 AM, Nicolas Goles wrote: Hey

Re: NSMenuItem - setHidden

2008-08-22 Thread chaitanya pandit
Set the menuitem's menu's setAutoEnablesItems to NO Or you may have an option to do so in IB itself On 22-Aug-08, at 9:28 AM, Stuart Green wrote: Hi, I've got a menu item in my app's root menu that I want to hide. I've referenced it as an IBOutlet as per: IBOutlet id itemToBeHidden;

Re: NSMenuItem - setHidden

2008-08-22 Thread chaitanya pandit
class) [itemToBeHidden setHidden:YES]; Still doesn't work. Couldn't see any options in IB to set this. in IB you'd see the option when the NSMenu is selected, not the NSMenuItem Stu On 22 Aug 2008, at 18:26, chaitanya pandit wrote: Set the menuitem's menu's setAutoEnablesItems t

Re: Image in NSOutlineView

2008-09-01 Thread chaitanya pandit
The right place to change the image of the cell would be in the outlineView's delegate method: - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell: (id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item try [[cell image] name] to get the name of the image -chaitanya

Increasing NSTextView's height

2008-09-01 Thread chaitanya pandit
In my application, i want to increase the height of the NSTextView in order to make it's subview's visible. The subview's exceed further down the area occupied by the text. But even if i change the textView's frame by increasing it's height so that it occupies the bottom most subview, i don'

Re: Image in NSOutlineView

2008-09-01 Thread chaitanya pandit
As per the initial description of your problem, you just want to change the image of the cell when it is clicked(selected) right? If thats the case then you don't have to deal with checking the image name etc. neither u have to do the setImage stuff in outlineviewSelectionDidChange What you

Re: Image in NSOutlineView

2008-09-02 Thread chaitanya pandit
If you want to preserve the state for other cells then you can maintain an instance variable (flag) in the ImageAndTextCell, so in outlineViewSelectionDidChange, you simply get the cell for the selected row and set it's flag to YES, and in willDisplayCell you simply check that flag of the

NSTextView's scroller problem when scaling

2008-09-03 Thread chaitanya pandit
I have a NStextView set up using IB and i am scaling the clipView by using the following code from the textEdit sample code - (void)setScaleFactor:(CGFloat)newScaleFactor { if (scaleFactor != newScaleFactor) { scaleFactor = newScaleFactor; NSView *clipView = [[self documentV

clipView's boundsSize changes after scrollToPoint:

2008-09-04 Thread chaitanya pandit
I have a clipView showing an NSTextView, the clipView is scaled. I see a weird behaviour where sometimes the clipView's bounds size changes after the scrollToPoint: gets called. The change in the bound's height in my case was from 392.66687 to 392.666809. This causes the document view kinda os

Find Panel Search Metadata

2008-09-11 Thread chaitanya pandit
Hi, I am trying to implement a custom find panel in the textView, and i need to get the shared find options like 'ignore case', 'starts with' etc. The text view documentation talks about Find Panel Search Metadata, where you have to get the property list for the search options from the fi

NSFetchRequest

2008-09-19 Thread chaitanya pandit
Hi, List, I have a core data model with 4 entities (viz. Person,Company,Bank and Address) each entity has an attribute "ID" which is of kind NSString. Now, what i want to do is i already have an "ID" and i want to find a managedObject with matching ID. What i do right now is i create an NSFetc

Re: How to hide disclosure triangle in NSOutlineView [10.5]?

2008-09-19 Thread chaitanya pandit
What you can do is create an image which has nothing i.e is transparent and use the following method to set it as the image of disclosure triangle - (void)outlineView:(NSOutlineView *)outlineView willDisplayOutlineCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item {

Creating alias programatically

2008-09-23 Thread chaitanya pandit
Hi, I've been struggling with for quite a while now, what i want to achieve is create an alias of a folder at some location. The alias would also be a folder like we have after creating an alias in the finder. say i have a folder "foo" in "/Users/me/Documents/foo" and i want to programati

Re: Creating alias programatically

2008-09-23 Thread chaitanya pandit
On 24-Sep-08, at 1:47 AM, Nick Zitzmann wrote: On Sep 23, 2008, at 1:13 PM, chaitanya pandit wrote: I've been struggling with for quite a while now, what i want to achieve is create an alias of a folder at some location. The alias would also be a folder like we have after creati

Re: Creating alias programatically

2008-09-23 Thread chaitanya pandit
quot; at "Users/ me/Desktop/foo" should i pass the first path as "fromFilePath"? I appreciate your help. Chaitanya On 24-Sep-08, at 2:09 AM, Nick Zitzmann wrote: On Sep 23, 2008, at 2:32 PM, chaitanya pandit wrote: I tried using symbolic link, but if the target file is moved

Re: Creating alias programatically

2008-09-23 Thread chaitanya pandit
, 2008, at 2:13 PM, chaitanya pandit wrote: I've been struggling with for quite a while now, what i want to achieve is create an alias of a folder at some location. You may be being tripped up by terminology. An "alias" is an opaque data structure in memory. An "alias fil

Re: Creating alias programatically

2008-09-23 Thread chaitanya pandit
On 24-Sep-08, at 2:22 AM, Nick Zitzmann wrote: On Sep 23, 2008, at 2:48 PM, chaitanya pandit wrote: I tried using: OSErr FSNewAliasFromPath ( const char *fromFilePath, const char *targetPath, OptionBits flags, AliasHandle *inAlias, Boolean *isDirectory ); But i don't quite ge

Re: Creating alias programatically

2008-09-23 Thread chaitanya pandit
On 24-Sep-08, at 3:32 AM, Nick Zitzmann wrote: On Sep 23, 2008, at 3:57 PM, chaitanya pandit wrote: It created an executable file with name foobar alias on desktop but when i try to open it it says "chaitanya-pandits-macbook:~ chaitanya$ /Users/chaitanya/Desktop/ foobar\ alias ;

Re: Horizontal SplitView Resize Question

2008-09-25 Thread chaitanya pandit
I'm not sure but you can try limiting the min and max coordinate using: - (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate: (CGFloat)proposedMax ofSubviewAt:(NSInteger)offset - (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate: (CGFloat)proposedMin ofSubviewAt:(NSInt

Re: NSOutlineView example

2008-09-26 Thread chaitanya pandit
Have a look at /Developer/Examples/Appkit/OutlineView On 26-Sep-08, at 2:08 PM, Arun wrote: Hello, Does anyone know or has good example code showing how to create a NSOutlineView, create a datasource and information to the datasource and display the final result. I am trying to dispaly a NS

Re: objc_msgSend_ptr

2008-09-26 Thread chaitanya pandit
if your sizeOfFile: method is returning an integer, then you should convert it to NSNumber like: object = [NSNumber numberWithInt:[[files objectAtIndex:rowIndex] sizeOfFile]]; hth, Chaitanya On 25-Sep-08, at 5:22 PM, Tilo Villwock wrote: i have the following piece of code in my controlle

Re: Fastest color detection in image?

2008-09-26 Thread chaitanya pandit
Well, there are 2 ways you can do it first would be to use: NSReadPixel(apoint); This method requires you to lock focus on the image before u call it. You would have to iterate through every point in the image and get it's color. But i found that this is a bit slow, to make it a bit faster you c

Re: getObjects:andKeys

2008-12-19 Thread chaitanya pandit
Jordon, this can be used to create copies of a dictionary, you get the keys and values array with getObjects:andKeys on an existing dictionary and iterate through the keys array and setting the same keys and values for a mutable dict. On 17-Dec-08, at 7:06 PM, Jordon Hirshon wrote: Can

Re: getObjects:andKeys

2008-12-19 Thread chaitanya pandit
Hehe, i know, but he just wanted an example as to what can be done with getObjects:andKeys. This was focused on using the getObjects... method rather than to create a copy of the dict. On 20-Dec-08, at 10:56 AM, Michael Ash wrote: On Sat, Dec 20, 2008 at 12:20 AM, chaitanya pandit wrote

Re: NSOutlineView

2008-12-29 Thread chaitanya pandit
Hi, Mahaboob, Did you try calling [outlineView reloadData] in ur launch method? -Chaitanya On 30-Dec-08, at 10:33 AM, Mahaboob wrote: My application uses an NSPopupButton and NSOutlineView. PopupButton shows all the table names in the database and the outlineView displays the data in the cor

Re: Tiger vs Leopard Printing

2009-01-08 Thread chaitanya pandit
Am not sure but have a look at : NSPrintPanelAccessorizing Protocol Reference -Chaitanya On 08-Jan-09, at 6:55 AM, David Blanton wrote: I build my app with the MACOSX10.4u.sdk. When the following is executed: [[NSPrintOperation printOperationWithView:catalog] runOperationModalForWindow:mai

Re: Direct use of NSScroller?

2008-10-02 Thread chaitanya pandit
How about using a NSSlider? On 02-Oct-08, at 7:43 AM, James Walker wrote: Is it possible to use a scroller without a scroll view? The first problem is that IB won't let me create an NSScroller that is not embedded in an NSScrollView. I guess I could shrink down the NSScrollView so that y

Code Data: Re-inserting deleted objects

2008-10-02 Thread chaitanya pandit
Hi List, What is the best way to re-insert a deleted object back in to the managed object context? At present i'm trying to this: if ([objectToReinstate validateForInsert:&error]) [[self managedObjectContext] insertObject:objectToReinstate]; But i am having problems with objects having relat

Re: Re-inserting deleted objects

2008-10-02 Thread chaitanya pandit
On 03-Oct-08, at 3:23 AM, Harry Jordan wrote: If deleting the objects was the last action that you did, you could simply call -undo on the managedObjectContext. There may well be reasons why this wouldn't be appropriate, but it's worth a look. Actually thats the first thing that came to my

Re: Direct use of NSScroller?

2008-10-02 Thread chaitanya pandit
On 02-Oct-08, at 10:09 PM, James W. Walker wrote: On Oct 1, 2008, at 8:53 PM, Clark Cox wrote: On Wed, Oct 1, 2008 at 7:13 PM, James Walker <[EMAIL PROTECTED]> wrote: Is it possible to use a scroller without a scroll view? The first problem is that IB won't let me create an NSScroller th

Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread chaitanya pandit
Hi, I have implemented Save As... in one of my core data app. What i do is, in the "saveToURL: ofType: forSaveOperation: error:" method, if the save operation is NSSaveAsOperation, i migrate the persistent store to a new location given by the absoluteURL and also set the document's URL to

Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-09 Thread chaitanya pandit
On 09-Oct-08, at 2:52 AM, Mike Abdullah wrote: On 8 Oct 2008, at 20:48, chaitanya pandit wrote: Hi, I have implemented Save As... in one of my core data app. What i do is, in the "saveToURL: ofType: forSaveOperation: error:" method, if the save operation is NSSaveAsOp

Re: How can be my application notified about user defaults changes?

2008-10-09 Thread chaitanya pandit
NSUserDefaultsDidChangeNotification On 09-Oct-08, at 5:51 PM, Alexander Shmelev wrote: Hello, My program UI depends on what measurement units are used. How can I get notification when "AppleMeasurementUnits" have been changed by "Preferences" application? Best regards, Alexander.

Re: NSTableView and drag and drop

2008-10-10 Thread chaitanya pandit
Have a look at /Developer/Examples/Appkit/DragaNDropOutlineView On 11-Oct-08, at 9:06 AM, Chris Idou wrote: I want to be able to drag strings out of a table into another field, but I must be missing something major because drags never get initiated. I've added the delegate, registered drag t

Re: NSTableView and drag and drop

2008-10-11 Thread chaitanya pandit
initiate drags? --- On Fri, 10/10/08, chaitanya pandit <[EMAIL PROTECTED]> wrote: From: chaitanya pandit <[EMAIL PROTECTED]> Subject: Re: NSTableView and drag and drop To: [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Date: Friday, October 10, 2008, 11:50 PM Have a look at

Re: Searching a CoreData bound NSArrayController

2008-10-11 Thread chaitanya pandit
I had a similar problem actually, I read on the list somewhere that creating a NSFetchRequest for finding something in the MOC can get slower if you have a lot of objects in your MOC(few thousand), and in such case using an array controller 's array and using predicate to filter it's content

Re: Menu binding displaying serialized NSDictionary rather than specified field

2008-10-13 Thread chaitanya pandit
Shouldn't it be: {id: 1, name: @"Front"} {id: 2, name: @"Sports"} {id: 3, name: @"Opinion"} {id: 4, name: @"Living"} {id: 4, name: @"Calendar"} note the '@' Chaitanya On 13-Oct-08, at 2:29 PM, Ken Tozier wrote: Hi I have a popup in a table cell I'm trying to bind, programatically, to a sim

Re: Core Data saving / Leopard / The temporary directory at ...

2008-10-21 Thread chaitanya pandit
Well i'm not a core data pro. but here is what i have observed with core data. If you create an entity and delete it after saving, the deleted entity will be shown in the "[[[self managedObjectContext] deletedObjects]allObjects]" array. But if you delete the entity immediately after creation w

NSPredicate predicateWithFormat:

2008-10-23 Thread chaitanya pandit
Hi list, I have an array controller that manages certain entities, each of the entity has an attribute "Name" now i want to search for entities with names from a given array, Say i have an array (namesArray) with contents "Tom, Matt, Joe" now what i do is, i create a predicate which will loo

NSPredicate predicateWithFormat:

2008-10-23 Thread chaitanya pandit
Hi list, I have an array controller that manages certain entities, each of the entity has an attribute "Name" now i want to search for entities with names from a given array, Say i have an array (namesArray) with contents "Tom, Matt, Joe" now what i do is, i create a predicate which will loo

Re: NSPredicate predicateWithFormat:

2008-10-23 Thread chaitanya pandit
Well i could not find any explicit explicit alloc/init method for predicate, I am using Instruments to check for memory leaks, and it shows a memory leak with the array. On 23-Oct-08, at 11:33 PM, Keary Suska wrote: On Oct 23, 2008, at 11:05 AM, chaitanya pandit wrote: NSArray

Re: Core Data Questions--Relationships, UUIDs, and Dirty States

2008-10-27 Thread chaitanya pandit
On 28-Oct-08, at 2:01 AM, Keary Suska wrote: 1. Confirmation clarification: do I understand correctly, considering typical RDBMS data integrity rules, that for most to-one relationships, I would set the delete rule to "no action", since deletion of the "many" item should not effect the "on

alpha value from NSBitmapImageRep

2008-10-28 Thread chaitanya pandit
I want to compute the alpha value of each pixel of an image. What i am doing right now is i create a NSBitmapImageRep from the image and use colorAtX: y: to get the alpha value form the color at that pixel. So i need to do this for each and every pixel in the image. I was just going through t

Re: alpha value from NSBitmapImageRep

2008-10-28 Thread chaitanya pandit
csContext restoreGraphicsState]; Following this code, myDestinationBuffer has all the alpha data from the image. -Ken Cocoa Frameworks On Tue, Oct 28, 2008 at 2:59 AM, chaitanya pandit <[EMAIL PROTECTED]> wrote: I want to compute the alpha value of each pixel of an image. What i am doing righ

NSTableView right clicked row

2008-10-28 Thread chaitanya pandit
Hi list, I have a NSTableView, and i display a menu when the user right clicks a row, this menu allows the user to delete that item. My problem is, how do i get the row which was right clicked? Consider this: currently the row#1 is selected and the user right clicks row#3 the row#3's cell wi

Re: NSTableView right clicked row

2008-10-28 Thread chaitanya pandit
Thanks Randall, funny that my subject says "...clicked row" and i missed clickedRow :-) On 29-Oct-08, at 1:51 AM, Randall Meadows wrote: On Oct 28, 2008, at 2:11 PM, chaitanya pandit wrote: Hi list, I have a NSTableView, and i display a menu when the user right clicks a row,

Core Animation perspective question

2008-11-07 Thread chaitanya pandit
Hi List, iWas going through the Flipr sample app (http://www.brockerhoff.net/src/index.html ) and am trying to understand how to compute the perspective. I could implement the flipping around the Y-Axis in one of my views, but i can't figure out how do i compute the perspective if i would hav

Re: UI help: visibly disabling NSImageView

2008-11-07 Thread chaitanya pandit
Well generally you can play with cursors to show a point cursor when not editable, cross hair when you allow resizing and hand when allow dragging On 07-Nov-08, at 3:47 PM, Brad Peterson wrote: Hi all, Does anyone have any ideas on how to _visually_ indicate that an NSImageView is not ed

Detect microphone

2008-11-09 Thread chaitanya pandit
Hi List, I'm using core audio to record sound, however i want to detect if a microphone is connected to the computer, how can i do that? I tried using QTKit to do this: QTCaptureDevice *soundDevice = [QTCaptureDevice defaultInputDeviceWithMediaType:QTMediaTypeSound]; BOOL micPresent

Re: Detect microphone

2008-11-10 Thread chaitanya pandit
On 10-Nov-08, at 4:55 PM, Graham Cox wrote: On 10 Nov 2008, at 10:15 pm, chaitanya pandit wrote: Well i tried this before but this doesn't work either "Doesn't work" covers a multitude of sins; *what* doesn't work? Oh, i was assuming that the AudioHardwa

Re: Detect microphone

2008-11-10 Thread chaitanya pandit
, Kyle Sluder wrote: On Mon, Nov 10, 2008 at 2:45 AM, chaitanya pandit <[EMAIL PROTECTED]> wrote: But on my Mac Mini which doesn't have a built in microphone it still returns YES for isConnected and the device returned is "Built-in input" That would be the line-in jack. Have

[Job Posting] Cocoa Developer Job opening in Pune-India

2008-11-13 Thread chaitanya pandit
Macintosh software development position with a startup company: Location: Pune (India) Requirements: - Bachelor's degree in Engineering - Require knowledge of object-oriented design/programming principles - Knowledge/exposure to Objective-C, Cocoa Framework and Xcode preferred - Passion for the A

Changing cursor in NSTextView's Subview

2008-11-14 Thread chaitanya pandit
Hi, List I have a NSTextView with some subviews, i want to implement tracking areas for the subViews so that whenever the mouse enters a subview the cursor changes to open hand cursor. I referred the Trackit example (http://developer.apple.com/samplecode/TrackIt/index.html#/ /apple_ref/doc/u

  1   2   >