Re: Validating unique objects in CoreData

2010-02-14 Thread daniele malcom
a second seems .. about ok to me and if you make sure and save the context regularly, you should be able to keep that rate up even as the database size grows. On 14-Feb-2010, at 5:51 AM, daniele malcom wrote: Hi Roland, in fact indices table exists (for DDArticle entity): Enter SQL statements

Re: Validating unique objects in CoreData

2010-02-13 Thread daniele malcom
On Sat, Feb 13, 2010 at 4:06 AM, Roland King r...@rols.org wrote: That's not a horrible solution, except for the feeling that core data ought to let you do what you want without having to implement your own UUID cache. I'm still a bit surprised that a lookup for an object by one attribute is

Re: Validating unique objects in CoreData

2010-02-13 Thread daniele malcom
Hi Roland, in fact indices table exists (for DDArticle entity): Enter SQL statements terminated with a ; sqlite .tables ZDDARTICLE    Z_METADATA    Z_PRIMARYKEY sqlite .indices ZDDARTICLE ZDDARTICLE_ZMESSAGEID_INDEX ZDDARTICLE_ZPARENT_INDEX With my macbook pro insertion of 30k articles took about

Validating unique objects in CoreData

2010-02-12 Thread malcom
Hello, I would use CoreData in order to mantain an archive of objects: each object contains an attribute called uuid; in the same db only one object can have the same attribute value. This mean I should validate the proposed new object to insert and check if the another object with the same

Re: Validating unique objects in CoreData

2010-02-12 Thread malcom
On Feb 12, 2010, at 2:05 PM, Roland King wrote: 1) does this uuid need to be something you generate externally and then set onto the object? Each core data object already has an objectID which is guaranteed unique in the database, can you make use of that one instead? You are allowed to

Re: Validating unique objects in CoreData

2010-02-12 Thread malcom
I've tried to make an alternative method. I'll try to describe it. I would to use a second an auxiliary index where to save my uuid-objectURI; results are better, so I try to make a summary of the problem and the solution. If anyone have a better idea I'll be happy to talk about it :) I've about

CoreData multiple contexts and threads

2009-09-13 Thread malcom
Hello, I have a stream of data (some messages) from a socket and I need to save it in a CoreData db. I would to optimize this thing by using more than a managedobjectcontext for each N messages arrived. The problem is that I need to link these message between (parent/childs). How can I check if a

Custom NSCell issues

2009-03-25 Thread malcom
hello I'm using a custom NSCell in order to draw some elements in an NSTableView. I've created a simple tableview with 2 row. However my draws is always put on first row while the second one is empty. This my code for NSOutlineView delegate http://pastebin.com/m7f5f8a0f while this is for my NSCell

Draw NSBezierPath inside a PDFPage

2009-03-07 Thread malcom
Hello, is possible to draw NSBezierPath inside a PDFPage? How? Thanks ___ 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

Re: Draw NSBezierPath inside a PDFPage

2009-03-07 Thread malcom
, malcom wrote: is possible to draw NSBezierPath inside a PDFPage? How? Yes it is. How, depends on what you want to do, but you provide no information about that. Is it for onscreen drawing only, or is it to be incorporated into the PDF page saved/printed? Are you using a PDFView or your own custom

Extract components from PDF page

2009-03-06 Thread malcom
Hello guys Is possible to get the components of a PDFPage? I should to take images and text from the page and put each of these inside a file. Any suggestion? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Small animation inside NSCell (progress bar)

2009-02-22 Thread malcom
Hello, I'm working on a subclass of NSCell that draws a custom style progress bar. Everything works fine, it draws correctly and I've made the code to make indeterminate animation (the method should be called by a timer). So I've created a NSTimer in my NSCell subclass, but when I try to run the

SIGPIPE with sockets

2009-01-19 Thread malcom
I fix it? Thanks a lot malcom ___ 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

Re: ActiveRecord on Cocoa

2008-11-11 Thread malcom
The program engine itself should run both on iPhone and Mac platform so I can't use CoreData (and in fact the same thing is for DataCrux). I'm looking at sqlitepersistentobjects but seems to be in beta. Anyone used it yet? On Tue, Nov 11, 2008 at 1:52 PM, I. Savant [EMAIL PROTECTED] wrote: I'm

ActiveRecord on Cocoa

2008-11-11 Thread malcom
Hello List, I'm searching for a things like ActiveRecord for Ruby in Objective-C (but I don't want to use Core-Data). Anyone can point me to the right solution? I've taken a look at http://www.cocoadev.com/index.pl?DataCrux but seems to be adbandoned. Thanks

Can NSURLConnection use Proxy Server?

2008-10-31 Thread malcom
Hello Lists, I'm using NSURLConnection and NSURLRequest to make connection to a server. Now I would to implement Proxy server connection but I cannot find something about it inside the docs. Anyone can point to me to the right way? Thanks a lot.

Propagate changes/insertions in main context

2008-04-03 Thread malcom malcom
Dear List, I'm working with CoreData. I need to insert lots of objects and make relationship with these and I've decided to perform this operation deteaching a new thread that pool an NSArray where data is placed. This thread make the object and insert it in a second managed object context,

Saving NSManagedObject in Core-Data

2008-03-31 Thread malcom
Hello to all! What's the correct way in Core Data to save a stream of data? This is the problem. Suppose to have lots of packets each of these can be linked to a parent and could have one or more childrens. You can receive these packets ordered (so you can receive the parent of message only in a

Changing properties inside a relationship entity

2008-03-22 Thread malcom
this entity instead of taking it from draftObject relationship? Thanks a lot. malcom ___ 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

Re: Changing properties inside a relationship entity

2008-03-22 Thread malcom
I've noticed a strange thing. If I take my NSString from an NSTextField it seems to works, while if I use textStorage] string] from an NSTextView it simply put an empty string or still remain the old value into the NSManagedObject (however with GDB the textStorage] string] return the correct

Re: Changing properties inside a relationship entity

2008-03-22 Thread malcom
Ok I've just found a solution. Make a new NSString object with a copy of the textview string and pass it. NSString *tmp = [[NSString alloc] initWithString: [[view textStorage] string]]; ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do