ARC and NSFastEnumeration

2011-09-19 Thread Devraj Mukherjee
Hi all, I am trying to implement fast enumeration for a wrapper object that has an NSArray, following this tutorial http://cocoawithlove.com/2008/05/implementing-countbyenumeratingwithstat.html Obviously ARC doesn't like the way - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState

NSScanner to find multiple occurrences of a prefix?

2011-09-12 Thread Devraj Mukherjee
Hi all, I am trying to use NSScanner to change camel cased strings into underscore delimited strings, e.g featuredListingId to featured_listing_id I have worked our how to use NSScanner to achieve this, consider my implementation (implemented as a NSString category) - (NSString *)

typedef show up as existing type while introspecting, want to show defined data type

2011-09-04 Thread Devraj Mukherjee
Hi all, I have been using Obj-C runtime to introspect my objects. I am using property_getAttributes to inspect the type / Class name etc for my properties. I want to be able to uniquely identify some of my properties which are essentially NSStrings and NSArray instances. I used typedef to

Attributes to Cocoa properties?

2011-08-20 Thread Devraj Mukherjee
Hi all, I am working on a REST API client, the server speaks JSON and my client library parses them into Objective-C objects. I am trying to find a way that I can automate the parsing process by introspecting the class etc. The server response contains related objects, e.g Category has Listings.

Using #define a good way for String constants, like enums for NSIntegers?

2011-08-09 Thread Devraj Mukherjee
Hi all, I am writing an API client for a REST service, parts of the REST API returns fixed String values. E.g. status of an order. I want to represents these fixed responses as constants. I have represented fixed numeric values using enums and used a typedef to represent the data type. Are

OSX/iOS OpenID client library?

2011-07-31 Thread Devraj Mukherjee
Hi all, We are working on a project that has a server side component, which we would like host on Google's AppEngine and use OpenID to allow people to support authentication with existing accounts. Part of the plan is to build an iOS and hopefully a OSX client for the application as well.

NSManagedObject editor, open source project (useful for iOS projects)

2010-12-16 Thread Devraj Mukherjee
Hi all, As part of our upcoming iOS app, which involves editing a lot of data on the device, we developed and have Open Sourced a Managed Object Editor, which reads its configuration from a JSON file and presents a Grouped TableView based editor interface. It can handle, relationships and

Does [myObject valueForString:@param] == [NSNull nul] ? @X:@Y mean the same as [myObject valueForString:@param] ? @X:@Y

2010-11-17 Thread Devraj Mukherjee
Hi all, Does these two things mean the same? [myObject valueForString:@param] == [NSNull nul] ? @X:@Y [myObject valueForString:@param] ? @X:@Y Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

NSRegularExpression only finds a single occurrence of my match

2010-10-17 Thread Devraj Mukherjee
Hi all, I am trying to use Regular Expressions to match uppercase letters in strings like numberOfNames which I want to replace with number_of_names. Code sample NSError *error = NULL; NSRegularExpression *regex = [NSRegularExpression

Efficiently exporting CoreData objects as CSV

2010-10-10 Thread Devraj Mukherjee
Hi all, I am working on adding an export data option to my application which uses Core Data. Preferably export it to CSV so the user can use a spreadsheet program to work with data. The data sets I am dealing with can be quite large, and am wondering if fetching all the records from my Core Data

NSURLConnection sync vs async connections

2010-09-23 Thread Devraj Mukherjee
Hi all, I am the maintainer of EtsyCocoa (http://etsycocoa.googlecode.com), its a Cocoa client library for Etsy.com's REST API. I am in the process of re-writing the API client seeing they have released v2 of their API. Previous version I used NSURLConnection to make synchronous calls to the

Is it possible to set UISlider intervals?

2010-08-10 Thread Devraj Mukherjee
Hi all, I am using UISliders in my iOS app. I can't see a way of setting the slide value interval. Is this possible? Or do I have to calculate the change based on the 0.1 increases? Minimum value set to -20 and Max to 20 and I want the slider to increment by 0.5 on a slide. Thanks.

NSArray EXEC_BAD_ACCESS when initalized with strings

2009-09-08 Thread Devraj Mukherjee
Hi all, I have two arrays initalized as follows, the first works fine and I can work with elements in the Array NSArray *majorScaleQuestions = [[NSArray alloc] initWithObjects:@1, @2, @b3, @3, @4, @5, @b6, @6, @7, nil]; the second throws up an EXEC_BAD_ACCESS and the application obviously stops

Re: NSArray EXEC_BAD_ACCESS when initalized with strings

2009-09-08 Thread Devraj Mukherjee
you run this through the debugger and verified this is the exact line that throws the exception? And is that the exact line of code? -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Tue, Sep 8, 2009 at 10:13 PM, Devraj Mukherjee dev...@gmail.com wrote: Hi all, I

NSMutableArray fill with unique values from NSArray

2009-08-20 Thread Devraj Mukherjee
Hi all, I have NSMutableArray (fixed length) that I wish to fill with unique values at each index from a source NSArray (fixed length, greater than the length of the target mutable array). Realise that I can do this by writing a loop and check to see if a value has bee pre-filled, the last

CoreData deleteAll of kind

2009-07-06 Thread Devraj Mukherjee
Hi all, I need my application to be able to delete all objects of a core data managed entity, at the moment the only way I can see how to do that is to fetch all objects of the entity kind and delete them one at a time looping through the collection. I have a suspicious feeling that there has to

Re: CoreData deleteAll of kind

2009-07-06 Thread Devraj Mukherjee
Thanks all for your feedback. Seems quite inefficient. Wonder if this is filed as a suggestion to Apple. On Tue, Jul 7, 2009 at 6:51 AM, Chris Hansonc...@me.com wrote: On Jul 6, 2009, at 2:49 AM, Devraj Mukherjee dev...@gmail.com wrote: I have a suspicious feeling that there has

Storing API keys in plist file

2009-03-27 Thread Devraj Mukherjee
Hi all, My app relies on an external RESTful services, the service issues a key for the REST services and at the moment I have hard coded that in my wrapper classes. I would like to put this into a preference file somewhere (suspecting a plist file). Obvious App-Info.plist doesn't seem to be

Re: Memory management question in Objective-C 2.0 @property notation

2009-02-05 Thread Devraj Mukherjee
Thanks again both of you. assuming that I do self.name = [NSString string] and since it the NSString helper message, I shouldn't have to release that in my dealloc implementation. Or am I understanding this incorrectly. On Thu, Feb 5, 2009 at 5:01 PM, Kiel Gillard kiel.gill...@gmail.com wrote:

Memory management question in Objective-C 2.0 @property notation

2009-02-04 Thread Devraj Mukherjee
Hi all, I have a few classes that form the domain logic of my application and comprise of objects of NSNumber, NSDate, NSString. I initialize these with new objects in the init message of each of these classes. These properties are defined using the @property (nonatomic, retain) and @synthesize

Issues with Inheritance and collections?

2009-01-30 Thread Devraj Mukherjee
Hi all, I have two classes DomainLogicBase and Vehicle where Vehicle inherits from DomainLogicBase (there are other classes in the project that inherit from DomainLogicBase), DomainLogicBase has some helper functions that all my models use and it also has some common vars like UID that all my

Memory allocation issues with NSObject and NSString

2009-01-18 Thread Devraj Mukherjee
Hi all, Two quick questions 1. If I have an NSString and I simply assign it = @ does that initialize it or do I have do go NSString *someString = [[NSString alloc] init]; 2. If I have an NSObject class and I define an init messge, do I have to do self = [super init] or is that not important

NSKeyedArchiver XML output?

2008-12-08 Thread Devraj Mukherjee
Hi all, I am trying to get an sample project that demos NSKeyedArchiver to write in the XML format, All I can see is a call to a message [NSKeyedArchiver archiveRootObject: rootObject toFile: path]; how do I instruct NSKeyedArchiver to write in its XML format? -- I never look back darling, it

Designing reports in Cocoa apps

2008-10-18 Thread Devraj Mukherjee
Hi All, Wondering if any one has ideas on writing reporting features for Cocoa apps? We are desinging a billing system and have the need for developing summary reports (printable). Thanks. -- I never look back darling, it distracts from the now, Edna Mode (The Incredibles)

Obtaining image from a scanner using ImageKit?

2008-10-01 Thread Devraj Mukherjee
Hi all, I am looking at adding a scan feature in my application to ease the digitzation process of documents for my client. Does ImageKit allow this? Can anyone please point me to an example? The obtained images dont have to modified, they just have to scanned and stored. Thanks. -- I never

Australia Cocoa consulting/training?

2008-09-22 Thread Devraj Mukherjee
Hi all, May be the wrong place to post this message but didn't know where to start. Are there any Australia based Cocoa developers on this list who would be willing to conduct a one day consulting session to sort out some issues with an application we are building? Issues revolve around user

DICOM images in Cocoa

2008-08-13 Thread Devraj Mukherjee
Hi all, My application requires to display DICOM image files. Preview doesn't support DICOM by nature so the thought at the moment is to use something like ImageMagick and convert these images to something JPEG on the fly? NSImage doesn't seem to be able to take a DICOM stream. Is this the best

Creating popup window/panel

2008-08-12 Thread Devraj Mukherjee
Hi all, I am trying to create a window that pops up from the toolbar (like say the project selection window in Pages or the window that pops up if you drag an existing source file onto XCode). I am trying design a UI so the user doesn't have to bring up a separate window. Is this done using a

List box like in Mail app

2008-08-11 Thread Devraj Mukherjee
Hi all, I want to create a user interface that kind of looks like the Mail application (so a left hand toolbar with options and the right hand pane has different views presented depending on the selection). My question is how do I go about creating a list item that is 1. Grouped like in Mail 2.

iCal like calendar interface in my application

2008-07-28 Thread Devraj Mukherjee
Hi all, One of our projects needs an interface to schedule appointments. We are thinking of an iCal like interface but realize that its a lot of work to come up with something like it. Are there any components we can use or are we able to incorproate iCal itself in our application? Or is the

Google map view in my iPhone application

2008-07-13 Thread Devraj Mukherjee
Hi all, I am trying to explore the iPhone SDK. In my application I wish to use a Google map with visual markers to represent contact details. Do I just use a Web Browser component to display the map? Or is there a better of approaching this? Thanks for your time. -- I never look back darling,

Extracting text elements from an Image

2008-07-10 Thread Devraj Mukherjee
Hi all, I am writing an application that deals with images that have bits of textual information in them (so say a serial number, these images are medical scans etc). The text is usually well defined and are primarily numbers. Does CoreImage or OpenGL provide any APIs that will let me match

iCal server Cocoa API?

2008-06-23 Thread Devraj Mukherjee
Hi everyone, I wondering if OSX Server components like iCal server or Address Book server (which I assume is LDAP based) have Cocoa libraries to populate/query data. I am trying to construct a Cocoa application but wish to re-use as much of Apple's apps/technologies as I can. My solution can

Data backend for larger apps

2008-06-21 Thread Devraj Mukherjee
Hi all, I have gathered that Core Data (as brilliant as it is) doesn't yet support client/server databases. I am writing an application which will be installed on multiple machines but would like share the single data source. Since there will be large amount of data the thought at this stage is

RDBMS suggestions for CoreData

2008-05-21 Thread Devraj Mukherjee
Hi everyone, I am writing a CoreData app that will be used in a multi user environment. I am searching for RDBMS server products provide native Cocoa/CoreData support. Any suggestions? My research reveals Postgres and MySQL support seems flaky. -- I never look back darling, it distracts from