Re: executeFetchRequest with BETWEEN

2010-02-14 Thread Gerriet M. Denkmann
> I would like to get some entities (in iPhone 3.1.3). So I do: > > NSNumber *sta = ... > NSLog(@" sta %@ %@ %p", sta, [sta class],sta);// sta 6 > NSCFNumber 0x3b3a690 > NSNumber *las = ... > > NSArray *limits = [ [ NSArray alloc ] initWithObjects: sta, las, nil ]; > predicate = [

Re: Validating unique objects in CoreData

2010-02-14 Thread daniele malcom
Thanks Roland, saving each x records drops searching time. That's great. These are my benchmarks with 30k objects: CoreData without saving each X insertions: about 5-6 minutes CoreData with saving each 500 insertions: about 30 seconds CoreData with auxiliary indexes dictionary: about 2 seconds Ho

Re: get the list of controls in a NSView

2010-02-14 Thread Jonathan Chacón
Hello, I can explore all controls in a view with this code: NSArray *listOfControls = [[window contentview] subViews]; for (NSInteger i=0;i<[listOfControls count];i++) { NSControl * tmp = [listOfControls objectAtIndex: i]; } well I can identify a control by its title, description or oth

Re: Core data - loading a subtree of objects

2010-02-14 Thread Gideon King
Thanks Jerry, that is exactly the type of scenario I am dealing with. Will try loading it as if it was a full document with the rest of the objects missing, and then copying the data over using the method mentioned in that thread. Regards Gideon King NovaMind Software Mind Mapping at its best N

Re: Validating unique objects in CoreData

2010-02-14 Thread Roland King
Please report back, I'd be very interested to hear what you find out. Even though I said 1000 objects a second seemed ok you know .. you're right, it's not. Have you tried a few things like not doing the check to see how fast you can just blast objects into the database without caring if they ar

Re: get the list of controls in a NSView

2010-02-14 Thread Roland King
no - you've asked this exact thing before and I've answered it before. The name in Interface Builder is internal to interface builder *only*, it's not a property of the object, there is no way after the NIB has been loaded to know what the 'name' set in IB was. However, again, the value in the t

Re: get the list of controls in a NSView

2010-02-14 Thread Jonathan Chacón
Hello OK, I'll use tag value thanks and regards Jonathan Chacón El 14/02/2010, a las 15:10, Roland King escribió: > no - you've asked this exact thing before and I've answered it before. The > name in Interface Builder is internal to interface builder *only*, it's not a > property of

Re: SetFrontProcessWithOptions and NSPanel

2010-02-14 Thread Steven Degutis
You can possibly solve this problem by subclassing the HUD NSPanel and returning YES in -canBecomeMainWindow. -Steven On Sun, Jan 31, 2010 at 7:00 PM, Chris Idou wrote: > > > I've got a NSPanel HUD that I need to be able to pop up above other > applications, but I need to pop only the HUD, and

Dock position and size

2010-02-14 Thread Sandro Noël
Greetings. Is there a way to determine the dock position on screen (left, right, bottom) and it's (width - height) ? thank you! Sandro Noël ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comme

Re: Dock position and size

2010-02-14 Thread Steven Degutis
The only ways I can think of are through the Accessibility API (which must be enabled in the user's System Preferences for this to work) or by asking com.apple.dock.plist ... though, generally this kind of thing is not necessary (which explains why there is no formal API for it). I would suggest lo

Re: Dock position and size

2010-02-14 Thread Ken Thomases
If you're looking for the portion of the screen which is or is not occupied by the Dock, you can check -[NSScreen visibleFrame]. I believe, but am not certain, that the NSApplicationDidChangeScreenParametersNotification notification is posted (and the -applicationDidChangeScreenParameters: appl

Re: Dock position and size

2010-02-14 Thread Shawn Erickson
You can use the difference between NSScreen's -visibleFrame and -frame to understand what is being used by the dock and/or menu bar. Of course it isn't clear why you want to know this... the best answer really depends on what you are trying to do exactly. -Shawn ___

Re: Dock position and size

2010-02-14 Thread Peter Blazejewicz
Hello Sandro, On Sun, Feb 14, 2010 at 7:10 PM, Sandro Noël wrote: > Greetings. > > Is there a way to determine the dock position on screen (left, right, bottom) > and it's (width - height) ? > Yes, try on your terminal: defaults read com.apple.dock orientation and change dock positions using pr

Re: [iPhone] Black background behind UIView??

2010-02-14 Thread PCWiz
That did the trick, thanks :) Independent Cocoa Developer, Macatomy Software http://macatomy.com On 2010-02-14, at 12:22 AM, David Duncan wrote: > On Feb 13, 2010, at 9:45 PM, PCWiz wrote: > >> I have a really simple UIView subclass, all it contains is this: >> >> - (void)drawRect:(CGRect)re

Re: Executing shell script with root privilege

2010-02-14 Thread Nick Zitzmann
On Feb 13, 2010, at 11:05 PM, cocoa learner wrote: > And permission of this script is - > -rwx-- 1 root wheel 536 Feb 14 10:51 /Users/test/myScript > > > When I am executing the app "launchScript" is returning me TRUE but my > script is not getting executed. I am totally lost, have no clu

Re: Validating unique objects in CoreData

2010-02-14 Thread Chris Hanson
On Feb 13, 2010, at 4:32 PM, Sean McBride wrote: > I have > found NSManagedObject's objectID method largely useless since, as the > docs say, "if the receiver has not yet been saved, the object ID is a > temporary value that will change when the object is saved”. These aren’t as useless for your

Re: Validating unique objects in CoreData

2010-02-14 Thread Chris Hanson
On Feb 13, 2010, at 2:32 AM, daniele malcom wrote: > Here you will found my simple storage data model: > http://img197.imageshack.us/img197/4388/screenshot20100213at111.jpg If you’re going to represent a UUID in Core Data, you are likely to be far better off storing and searching on it as two 64

Re: Dock position and size

2010-02-14 Thread Kyle Sluder
On Sun, Feb 14, 2010 at 11:08 AM, Peter Blazejewicz wrote: > and change dock positions using preferences, then wrap it through api > of your choice, Changing the Dock position is not your application's business. --Kyle Sluder ___ Cocoa-dev mailing lis

Re: Dock position and size

2010-02-14 Thread Peter Blazejewicz
Hi guys, I really appreciate last two comments - but has anyone noticed "read" being used in snippet I've posted? Except of that I think we simply should advice OP to fill radar bug, thanks, and have a nice weekend! kind regards, Peter On Sun, Feb 14, 2010 at 10:02 PM, Kyle Sluder wrote: > On Sun

Touch-and-drag architecture question

2010-02-14 Thread Dave DeLong
Hi everyone, I've an iPhone app that I'm working on (it's a simple game), where I've got the game board on the screen, and then a row of pieces above and below the board (representing the pieces controlled/captured by each player). I'd like to be able to drag pieces from these rows onto the bo

Re: Touch-and-drag architecture question

2010-02-14 Thread Jens Alfke
CoreAnimation is the best way to go for board games IMO. Lighter weight than views, and it does the interpolation for you. I wrote a framework for board games using CA: http://bitbucket.org/snej/geekgameboard --Jens {via iPhone} On Feb 14, 2010, at 1:38 PM, Dave DeLong wrote: Hi everyon

NSBrowser Question

2010-02-14 Thread Brad Stone
I have an app that saves it's documents in a fileWrapper. The document's window has a NSBrowser where users can attach files. Before the document is saved for the first time the NSBrower's root is a temporary attachments folder (because the filewrapper doesn't exist). After it's saved that at

Re: Dock position and size

2010-02-14 Thread Sandro Noël
the reason why i want to know the position of the dock is because i want to latch on to it, over it. and i would like to be of the same width and same proportions. I guess i can calculate the height and the width according to the tilesize in the Dock preferences file. Sandro Noël On 2010-02-

Re: Validating unique objects in CoreData

2010-02-14 Thread Sean McBride
Chris Hanson (c...@me.com) on 2010-02-14 15:29 said: >> I have >> found NSManagedObject's objectID method largely useless since, as the >> docs say, "if the receiver has not yet been saved, the object ID is a >> temporary value that will change when the object is saved”. > >These aren’t as useless

Re: Dock position and size

2010-02-14 Thread Matthew Lindfield Seager
On 15 February 2010 11:03, Sandro Noël wrote: > the reason why i want to know the position of the dock is because i want to > latch on to it, over it. > I might be wrong and you may have a great reason for wanting to do this but it doesn't seem very "Mac-like"... There's possibly (probably?) a b

Re: NSBrowser Question

2010-02-14 Thread Keary Suska
On Feb 14, 2010, at 3:53 PM, Brad Stone wrote: > I have an app that saves it's documents in a fileWrapper. The document's > window has a NSBrowser where users can attach files. Before the document is > saved for the first time the NSBrower's root is a temporary attachments > folder (because t

Re: Dock position and size

2010-02-14 Thread Sandro Noël
Well the application I'm trying to do is a something I like to call a Dock-Stack. No it's not like those folders stacks. It's docks that would autohide and appear right under the dock window, but pop up just above the current dock. kind of an extension to the dock. (in the case my application is

Re: Dock position and size

2010-02-14 Thread Steven Degutis
This sounds like a pretty challenging task, especially given the fact that the Dock itself is so tightly coupled with many other OS X technologies (Spaces, Exposé, etc). Probably the closest utility to achieving this goal and still maintaining compatibility with these OS X niceties is Docks, former

Re: Dock position and size

2010-02-14 Thread Sandro Noël
> This sounds like a pretty challenging task, especially given the fact that > the Dock itself is so tightly coupled with many other OS X technologies > (Spaces, Exposé, etc). Probably the closest utility to achieving this goal > and still maintaining compatibility with these OS X niceties is D

problems with distributed objects

2010-02-14 Thread Eric Smith
OK... I've got what must be a trivial problem. I'm running two applications on the same computer (intel iMac). I'm just cutting and pasting code from the XCode help pages, describing how to vend and obtain a distributed object. Code is below: Application #1: myConduit = [[ServerCond

Re: problems with distributed objects

2010-02-14 Thread Eric Smith
OK... never mind, everyone. When I saw my own post, I recognized the "autorelease" as the problem. Eric On Feb 14, 2010, at 7:48 PM, Eric Smith wrote: > OK... I've got what must be a trivial problem. I'm running two applications > on the same computer (intel iMac). I'm just cutting and past

How is the best way to emulate the plist editor GUI?

2010-02-14 Thread Juanma Cabello
Hi all! I'm making a prefences panel to manage the Apache httpd.conf file and for the UI I thought about to load the stuff into an OutlineView like the Apple plist editor has, but I think it's a custom control so I don't know how would be the best way to emulate it. I'm a newbie and all help is r

UIWebView PDF Paging

2010-02-14 Thread Josh Tucker
I'm loading a PDF stored locally into a UIWebView. Is there any way that I can achieve paging? For example, I can hook up a UIButton to scroll to page 8 of the PDF in the UIWebView. Thanks, Joshua Lee Tucker ___ Cocoa-dev mailing list (Cocoa-dev@li

NSPanel and runModalForWindow: problems

2010-02-14 Thread Daniel Káčer
I have a NSPanel that is opened like Modal panel: -(void) showModal { [NSApp runModalForWindow: myWindow]; } and is closed with event click on button that is allocated on this NSPanel: -(IBAction)delayWindow:(id)sender { [NSApp abortModal]; //[myWindow orderOut: self]; [myWind

Where To Put Export... In Document-Based Core Data App

2010-02-14 Thread steve ross
I have a document-based CoreData app, which means there could be several docs open at once. I want to implement Export As CSV... (but not as a "supported file type," as this is one-way only). Being a Cocoa n00b, I'm struggling with where to put the action in a class that is current-document awar

Re: Where To Put Export... In Document-Based Core Data App

2010-02-14 Thread Gideon King
You're probably missing the concept of the responder chain. Yes, it should be defined in your document, and hooked up in your menu to the first responder. Then when you have a document there, it will receive the message and be able to process it with its own data. You get the automatic enabling

Re: Where To Put Export... In Document-Based Core Data App

2010-02-14 Thread Graham Cox
On 15/02/2010, at 5:23 AM, steve ross wrote: > Questions: > > - Is the document class the right place? It makes sense to me that the > document would know how to save itself Yes it is. > - Would the controller, instead, want to tell the document to persist itself > as CSV? You might want s

Question about zipping files

2010-02-14 Thread Gideon King
Hi, I have a need to zip a selection of files from a folder. Sometimes the number of files may be in the hundreds, and sometimes some of the files may be multiple gigabytes in size. I need them to be referenced from a specific base folder in the hierarchy. Deployment is 10.5+ From what I can se

NSDrawNinePartImage not working ?

2010-02-14 Thread Sandro Noël
Ok I know I must be missing something dumb. i'm trying to draw borders for the window, - (void) awakeFromNib{ [window setStyleMask:NSBorderlessWindowMask]; [window setOpaque:YES]; NSDrawNinePartImage([[window contentView]frame],

Re: NSDrawNinePartImage not working ?

2010-02-14 Thread Sean McBride
Sandro Noël (sandro.n...@gestosoft.com) on 2010-02-15 00:36 said: >- (void) awakeFromNib{ > >[window setStyleMask:NSBorderlessWindowMask]; >[window setOpaque:YES]; > >NSDrawNinePartImage([[window contentView]frame], You should be drawing from drawRect:, not awakeFromNib.

Re: NSDrawNinePartImage not working ?

2010-02-14 Thread Graham Cox
On 15/02/2010, at 4:36 PM, Sandro Noël wrote: > - (void) awakeFromNib{ > NSDrawNinePartImage([[window contentView]frame], > nil, > nil, >

Re: NSDrawNinePartImage not working ?

2010-02-14 Thread Sandro Noël
> > You should be drawing from drawRect:, not awakeFromNib. > > CocoaDrawingGuide/Introduction/Introduction.html> > > Also, IIRC, you can only make a window borderless at init time. > > Are you trying to make a custom win

Re: Question about zipping files

2010-02-14 Thread Sean McBride
Gideon King (gid...@novamind.com) on 2010-02-15 00:28 said: >Hi, I have a need to zip a selection of files from a folder. > > ... > >Are there any other options that I'm not aware of? NSWorkspaceCompressOperation? Sounds promising, right? But the docs say "This operation always returns an error

Bind to string (path), convert to NSImage

2010-02-14 Thread Trygve Inda
I have an NSImageWell (or NSView). I am using an NSCollectionView and have it bound to an ArrayController which is bound to an array of NSDictionary. The dicts have several keys, among them @name and @iconpath @iconpath is a NSSting that contains a path to an NSImage. How can I bind though my NS

Re: How is the best way to emulate the plist editor GUI?

2010-02-14 Thread Jerry Krinock
On 2010 Feb 13, at 00:34, Juanma Cabello wrote: > I'm making a prefences panel to manage the Apache httpd.conf file and for > the UI I thought about to load the stuff into an OutlineView like the Apple > plist editor has, but I think it's a custom control so I don't know how > would be the best w

Re: Question about zipping files

2010-02-14 Thread Jens Alfke
On Feb 14, 2010, at 9:28 PM, Gideon King wrote: > 1. Use NSTask to create a zip file, passing in as arguments all the filenames > to zip. My question about this would be whether I would run into any > restrictions with the length of the command which well be beyond the old 1024 > character lim

Re: How is the best way to emulate the plist editor GUI?

2010-02-14 Thread Juanma Cabello
I have a simple object that only has a NSMutableDictionary where I store all the Apache configurations parameters. That's the collection I want to bind. I'll take a look to those topics and see if I can go from there. Thanks! :) Enviado desde mi iPhone El 15/02/2010, a las 07:22, Jerry Krinock

Re: Executing shell script with root privilege

2010-02-14 Thread cocoa learner
Ok let me put my problem in simple words - I have a cocoa app and I want to launch a shell script which has to do some task with root privilege. How can I do it??? Regards, Cocoa.learner On Mon, Feb 15, 2010 at 1:49 AM, Nick Zitzmann wrote: > > On Feb 13, 2010, at 11:05 PM, cocoa learner wrote

Re: Question about zipping files

2010-02-14 Thread Gideon King
Thanks for the suggestion. Have not encountered Scripting Bridge before and have very little experience or understanding of AppleScript and no knowledge of Apple Events or what they do. I had a vague notion that Apple Events were pretty much old technology from before OSX, but now I see that it

Re: Question about zipping files

2010-02-14 Thread cocoa learner
> > 1. Use NSTask to create a zip file, passing in as arguments all the > filenames to zip. My question about this would be whether I would run into > any restrictions with the length of the command which well be beyond the old > 1024 character limits (not sure if any command line argument limits a

Debugger: Cannot access memory at address 0x00

2010-02-14 Thread Charles Burnstagger
This has probably been asked a million times but I didn't see anything in the archives, so here goes: I have a perfecting working desktop OS X app built under Xcode 3.2.1 and 10.6.2, targeting 10.6 only. I move the project folder a subfolder, reset all source, resource, and framework paths to r