Punching holes into IKImageView

2010-04-05 Thread Gerriet M. Denkmann
I have an IKImageView and would like to create holes, i.e. set alpha to zero in some rectangle. And then save the result in some format. What would be the easiest way to do this? 1. Create a CIFilter and do: myIkImageView.imageCorrection = myHoleFIlter save myIkImageView 2.

Re: Two text fields, one outlet?

2010-04-05 Thread Klaus Backert
On 5 Apr 2010, at 04:09, Jenny M wrote: This is the method I ended up going with. I had tried to use bindings before by doing exactly that - setting up a property, synthesizing it, and binding the value to the property - but I noticed I was setting the value wrong. I was calling property = [N

Any frameworks for Leopard's Spaces?

2010-04-05 Thread Ulai Beekam
How can I make my app know about when a space has changed, and when it has done so to which space it has changed? Also, how can I read which Spaces and how many are currently available? I'm allowed to use Snow Leopard. The only thing I'm aware of is the NSWorkspaceActiveSpaceDidChangeNotificati

Re: Why doesn't -[NSArrayController selection] et al fire keyPathsForValuesAffectingKey?

2010-04-05 Thread Jerry Krinock
OK, I filed Bug ID# 7827354. (See bottom of this message.) But I don't see the need for MAKVONotificationCenter here... On 2010 Apr 02, at 22:33, Kyle Sluder wrote: > I would think that the "right" thing to do would be to subclass > NSArrayController and write a > -canPerformFoo method. Yes

Re: Using the #import directive

2010-04-05 Thread Jeremy Pereira
On 2 Apr 2010, at 00:59, Steve Cronin wrote: > > On Apr 1, 2010, at 5:58 PM, Jens Alfke wrote: > >> >> On Apr 1, 2010, at 3:51 PM, Steve Cronin wrote: >> >>> I have an import statement like the last example but I can't find any "bar" >>> directory >>> I'm unable to determine the particular i

NSMutableURLRequest: How to change Request URI?

2010-04-05 Thread Lloyd Sargent
Writing an iPhone app to login to a site remotely that is running php. In order to log in to the website it appears I need to do the following: POST /submit.php?do=submit HTTP/1.1\r\n However, no matter what I do all I seem to be able to accomplish is: POST / HTTP/1.1\r\n It appears that the "

Problem with NSData

2010-04-05 Thread McLaughlin, Michael P.
In a Cocoa app targeting Leopard, I am getting a malloc error when using the NSData method - (void)getBytes:(void *)buffer My function is as follows: -(void)getDataSz:(void*)data ofSize:(NSUInteger)sz { NSData *theData = [input readDataOfLength:sz]; [theData getBytes:data]; // <-- no e

Re: Finding managed objects by URI representation

2010-04-05 Thread Gideon King
On 05/04/2010, at 6:51 AM, Ben Trumbull wrote: > No, this is going the wrong way. The objectID is the object's identity in > the persistent store (e.g. primary key). You don't need to store pieces of > it somewhere else. > > NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self ==

Re: Run Loop in Tool Idles for 60.0 seconds before exitting [Solved]

2010-04-05 Thread Ken Thomases
On Apr 4, 2010, at 11:00 PM, Jerry Krinock wrote: > On 2010 Apr 04, at 14:44, Ken Thomases wrote: > >> Since you're already using operations, why use the above 'while' loop, >> anyway? Why not use -[NSOperationQueue waitUntilAllOperationsAreFinished]. >> Or schedule a "sentinel" operation tha

Re: Any frameworks for Leopard's Spaces?

2010-04-05 Thread Steven Degutis
The NSWorkspace notification is the only public API for this. Relatedly, you should not use private APIs which will restrict Apple's ability to change the internal implementation easily in the future, and make innovations or improvements difficult on them. -Steven 2010/4/5 Ulai Beekam > > How c

RE: Any frameworks for Leopard's Spaces?

2010-04-05 Thread Ulai Beekam
I don't mind using private API for this. After all my goal is to make some simple in-house app and it doesn't matter too much if it breaks after some OS X update. I am aware the private API discussion is forbidden here. Thus, if anyone can point me in the right direction, I would appreciate it

Preservation of State

2010-04-05 Thread Frederick C. Lee
Greetings: I wish to preserve the state of an iPhone/iTouch application; which means that I would like the application to continue deep down within a stock of View Controllers at a particular view when I return to the application. Does this mean that I need to preserve the ID of a particu

Re: NSMutableURLRequest: How to change Request URI?

2010-04-05 Thread Nick Zitzmann
On Apr 5, 2010, at 7:30 AM, Lloyd Sargent wrote: > Writing an iPhone app to login to a site remotely that is running php. In > order to log in to the website it appears I need to do the following: > > POST /submit.php?do=submit HTTP/1.1\r\n > > However, no matter what I do all I seem to be abl

Re: NSMutableURLRequest: How to change Request URI?

2010-04-05 Thread Lloyd Sargent
>> It appears that the "/ HTTP/1.1\r\n" are added by NSMutableURLRequest. > > > Yes; that is required by the spec. Otherwise the server would assume the > client is using an ancient version of HTTP, which is not what you want to > happen. Got it. >> But I need it to be "/submit.php?do=submit

Modal Window with dynamic nstextfield

2010-04-05 Thread Jeremy Matthews
I have a modal window with code to update both a progress bar and corresponding text...the progress bar gets updated just fine but the textfield never does (except if I re-run the method the last string I pushed to the textfield from the previous run does appear).My understanding was that if you

Re: Preservation of State

2010-04-05 Thread WT
On Apr 5, 2010, at 6:04 PM, Frederick C. Lee wrote: > Greetings: >I wish to preserve the state of an iPhone/iTouch application; which means > that I would like the application to continue deep down within a stock of > View Controllers at a particular view when I return to the application. >

Re: C typedef for NS ptrs?

2010-04-05 Thread Sean McBride
On Fri, 2 Apr 2010 16:38:48 -0500, Andy O'Meara said: >A have a couple vanilla NS object ptrs (e.g. NSWindow*) that I have to >pass through some cross-plaform C++ code until it ends up in a .mm file >where where the NS object is accessed. The problem is that in the .cpp >code, there's no obvious

Bindings & ivars

2010-04-05 Thread Charles Burnstagger
Why, after I have connected a control in my nib. window using bindings can I no longer access it from code? After connecting a checkbox control using bindings, when my window controller loads, that control's ivar shows up as nil. Thanks, Chuck

Standard controls on top of NSGradients

2010-04-05 Thread Charles Burnstagger
I have a custom NSView subclass that contains an NSGradient. All this class does is draw a grey vertical gradient like iPhoto and iTunes do. When I place standard controls on top of one of my custom gradient views, when clicked, they also draw their rects with the same gradient - even though I

Re: Standard controls on top of NSGradients

2010-04-05 Thread David Duncan
On Apr 5, 2010, at 12:15 PM, Charles Burnstagger wrote: > When I place standard controls on top of one of my custom gradient views, > when clicked, they also draw their rects with the same gradient - even though > I don't include any code to do that. Do I need to lockFocus or some other > aspec

UpdateSystemActivity replacement in Cocoa?

2010-04-05 Thread Andy O'Meara
Hey cocoa crew, quick question... I'm looking for a Cocoa replacement for Carbon's UpdateSystemActivity() since it appears to be unavailable under x86_64. Any help or suggestion would be appreciated! Thanks, Andy ___ Cocoa-dev mailing list (Cocoa-d

Re: Problem with NSData

2010-04-05 Thread McLaughlin, Michael P.
I may be off on an island by myself here but I thought I'd add some more info just in case someone recognizes it and has a useful thought. The error described below occurs because the data I sent through NSFileHandle to NSData (in the subtask) was actually the elements of a vector [just the array,

Re: Standard controls on top of NSGradients

2010-04-05 Thread Charles Burnstagger
Thanks. Changing to [ self.theGradient drawInRect:self.bounds angle:90.0 ]; in drawRect: did the trick. Chuck From: David Duncan To: Charles Burnstagger Cc: cocoa-dev@lists.apple.com Sent: Mon, April 5, 2010 12:23:46 PM Subject: Re: Standard controls on to

Re: Bindings & ivars

2010-04-05 Thread Kevin Cathey
Chuck, By "bindings", do you mean "Cocoa Bindings" or a standard IBOutlet? If you mean "Cocoa Bindings" using the Bindings Inspector, then your control will only be accessible from code if you have made a standard outlet connection with it. Different types of connections (outlets, actions, bind

Re: Why doesn't -[NSArrayController selection] et al fire keyPathsForValuesAffectingKey?

2010-04-05 Thread Kyle Sluder
On Mon, Apr 5, 2010 at 3:08 AM, Jerry Krinock wrote: > I already use MAKVONotificationCenter in this project, but I don't see the > need for it here.  In the array controller's -dealloc, > >    [self removeObserver:self >              forKeyPath:@"selectedObjects"] ; > > Why is that perilous?  (I

Re: UpdateSystemActivity replacement in Cocoa?

2010-04-05 Thread Kevin Wojniak
Looks to me like it's still available for x86_64. Are you linking with the CoreServices framework? Kevin On Apr 5, 2010, at 12:36 PM, Andy O'Meara wrote: > > Hey cocoa crew, quick question... > > I'm looking for a Cocoa replacement for Carbon's UpdateSystemActivity() since > it appears to b

Re: Two text fields, one outlet?

2010-04-05 Thread Kyle Sluder
On Mon, Apr 5, 2010 at 1:56 AM, Klaus Backert wrote: > Setting of properties can and should be done this way (except when using the > modern runtime and synthesizing the instance variable): There's nothing different about synthesizing the instance variable. If you want the property semantics, us

Re: Bindings & ivars

2010-04-05 Thread Joanna Carter
Le 5 avr. 2010 à 19:53, Charles Burnstagger a écrit : > Why, after I have connected a control in my nib. window using bindings can I > no longer access it from code? > > After connecting a checkbox control using bindings, when my window controller > loads, that control's ivar shows up as nil.

Re: UpdateSystemActivity replacement in Cocoa?

2010-04-05 Thread Sean McBride
On Mon, 5 Apr 2010 14:36:56 -0500, Andy O'Meara said: >I'm looking for a Cocoa replacement for Carbon's UpdateSystemActivity() >since it appears to be unavailable under x86_64. Google IOPMAssertionCreate / IOPMAssertionCreateWithName Here's a snippit from our app:

Re: Modal Window with dynamic nstextfield

2010-04-05 Thread Kyle Sluder
On Mon, Apr 5, 2010 at 10:15 AM, Jeremy Matthews wrote: >        for (mmm=0;mmm<150;mmm++) >        { >                [progressIndicator displayIfNeeded]; >                [progressIndicator setDoubleValue:mmm]; >                NSString *temp222 = [NSString stringWithFormat:@"%d",mmm]; >        

Re: Finding managed objects by URI representation

2010-04-05 Thread Ben Trumbull
On Apr 5, 2010, at 8:18 AM, Gideon King wrote: > On 05/04/2010, at 6:51 AM, Ben Trumbull wrote: > >> No, this is going the wrong way. The objectID is the object's identity in >> the persistent store (e.g. primary key). You don't need to store pieces of >> it somewhere else. >> >> NSPredicat

Re: UpdateSystemActivity replacement in Cocoa?

2010-04-05 Thread Andy O'Meara
On Apr 5, 2010, at 3:31 PM, Kevin Wojniak wrote: > Looks to me like it's still available for x86_64. Are you linking with the > CoreServices framework? > > Kevin Yeah, I've got: #include void foo() { UpdateSystemActivity( UsrActivity ); // Error: 'UpdateSystemActivity' was not decla

Re: Two text fields, one outlet?

2010-04-05 Thread Klaus Backert
On 5 Apr 2010, at 22:40, Kyle Sluder wrote: On Mon, Apr 5, 2010 at 1:56 AM, Klaus Backert > wrote: Setting of properties can and should be done this way (except when using the modern runtime and synthesizing the instance variable): There's nothing different about synthesizing the instance v

Problems with repetetive execution of netstat using NSTask and NSTimer

2010-04-05 Thread Kazior Fukacz
Hello, I'm working on an application named IPShowX. Take a look at for more info: http://kaziorvb.pl/IPShowX/ When I run it, it keeps working perfectly fine for a few minutes, then stops refreshing the IP and prints: IPShowX[14917] *** NSTimer discarding exception '*** -[NSCFDictionary se

Re: Problems with repetetive execution of netstat using NSTask and NSTimer

2010-04-05 Thread Ken Thomases
On Apr 5, 2010, at 4:05 PM, Kazior Fukacz wrote: > When I run it, it keeps working perfectly fine for a few minutes, then stops > refreshing the IP and prints: > > IPShowX[14917] *** NSTimer discarding exception '*** -[NSCFDictionary > setObject:forKey:]: attempt to insert nil value' that raise

Re: UpdateSystemActivity replacement in Cocoa?

2010-04-05 Thread Kevin Wojniak
Including it isn't enough, you still need to link it with your other frameworks. I did this with a blank project and got no errors with a 64-bit build. Anyways, the IOKit function is probably the better way to go :) On Apr 5, 2010, at 2:16 PM, Andy O'Meara wrote: > > On Apr 5, 2010, at 3:31 P

Re: Modal Window with dynamic nstextfield

2010-04-05 Thread Jeremy Matthews
Oh dear? Sent from my iPhone On Apr 5, 2010, at 4:47 PM, Kyle Sluder wrote: On Mon, Apr 5, 2010 at 10:15 AM, Jeremy Matthews > wrote: for (mmm=0;mmm<150;mmm++) { [progressIndicator displayIfNeeded]; [progressIndicator setDoubleValue:mmm];

Re: Modal Window with dynamic nstextfield

2010-04-05 Thread Kyle Sluder
On Mon, Apr 5, 2010 at 3:12 PM, Jeremy Matthews wrote: > Oh dear? Yeah. It's a pretty heavy topic. Your use of a for loop inside a modal runloop to perform a lengthy operation leads me to believe you'll be starting at the ground level. Please read through the Threading Programming Guide. It prob

Re: Modal Window with dynamic nstextfield

2010-04-05 Thread Jeremy Matthews
On Apr 5, 2010, at 6:18 PM, Kyle Sluder wrote: > On Mon, Apr 5, 2010 at 3:12 PM, Jeremy Matthews > wrote: >> Oh dear? > > Yeah. It's a pretty heavy topic. Your use of a for loop inside a modal > runloop to perform a lengthy operation leads me to believe you'll be > starting at the ground level

Re: How do I get a file reference w/o relying on the path?

2010-04-05 Thread Sean McBride
On Sat, 3 Apr 2010 18:31:03 -0700, Jens Alfke said: >Brad, what you want is a bookmark (in 10.6) or an alias reference. >Aliases didn't have a Cocoa API until 10.6, but the procedural API isn't >hard to use. There is the 3rd party NDAlias wrapper, which works quite well:

Re: Multi Window cocoa application

2010-04-05 Thread John Baldwin
Depending on what you need to communicate and why, you might be able to use the NSNotificationCenter to meet your needs. John On Saturday Apr 3 4:22 PM, at 4:22 PM, Bharadwaj Parthasarathy wrote: > > Hi, > > I am currently working on porting an existing open source windows application > to

Re: Finding managed objects by URI representation

2010-04-05 Thread Sean McBride
On Sun, 4 Apr 2010 23:14:20 +1000, Gideon King said: >I have some queries that used to look up objects based on an elementID >attribute, which used to be my unique identifier for objects, created >when the objects were inserted or loaded. I use this pattern also. >I am now moving away from that

Re: How do I compare two NSDates using NSPredicate & Core Data

2010-04-05 Thread Sean McBride
On Sun, 4 Apr 2010 23:15:16 -0400, Michael A. Crawford said: >Thus far I've gotten away with using -predicateWithFormat and scalar >values. I now need to compare a couple of NSDate instances but am not >sure how to code it up with NSPredicate. Consider me a 'visual' learner. I'm pretty sure you

Re: UpdateSystemActivity replacement in Cocoa?

2010-04-05 Thread Sean McBride
On Mon, 5 Apr 2010 15:02:49 -0700, Kevin Wojniak said: >Including it isn't enough, you still need to link it with your other >frameworks. I did this with a blank project and got no errors with a 64- >bit build. Anyways, the IOKit function is probably the better way to go :) IIRC, UpdateSystemActi

Re: UpdateSystemActivity replacement in Cocoa?

2010-04-05 Thread Kevin Wojniak
Yep, you're right. I built against 10.5 SDK and got the same problems. On Apr 5, 2010, at 5:06 PM, Sean McBride wrote: > On Mon, 5 Apr 2010 15:02:49 -0700, Kevin Wojniak said: > >> Including it isn't enough, you still need to link it with your other >> frameworks. I did this with a blank projec

Re: Finding managed objects by URI representation

2010-04-05 Thread Gideon King
You know you might just be right. The core problem was that I was using the value that I had generated as my reference object, because of my lack of understanding about it needing to be consistent for a particular managed object, but different for different objects (even if they had been loaded

Re: Problem with NSData

2010-04-05 Thread Graham Cox
On 06/04/2010, at 1:12 AM, McLaughlin, Michael P. wrote: > In normal operation, getDataSz takes in a buffer allocated by an STL vector > in the following call: > > [mySubtaskServer getDataSz:&my_vec[0] ofSize:dataSize]; > > If (just for testing), I replace the argument, data, with a local mallo

Wondering about that iPad page curling

2010-04-05 Thread Laurent Daudelin
I got my hands on an iPad today. I was really impressed with the built-in book reader. When you flip the page while holding your finger down, the page will curl and follow your finger. Very impressive! Anybody has any idea how one would be able to achieve such effect? -Laurent. -- Laurent Daud

Re: Wondering about that iPad page curling

2010-04-05 Thread Graham Cox
CIFilter has a page curl transition effect. Just map the 't' value to the mouse/finger location. --Graham On 06/04/2010, at 10:55 AM, Laurent Daudelin wrote: > I got my hands on an iPad today. I was really impressed with the built-in > book reader. When you flip the page while holding your fi

Re: Wondering about that iPad page curling

2010-04-05 Thread Gleb Dolgich
On 6 Apr 2010, at 01:55, Laurent Daudelin wrote: > I got my hands on an iPad today. I was really impressed with the built-in > book reader. When you flip the page while holding your finger down, the page > will curl and follow your finger. Very impressive! Anybody has any idea how > one would

Re: Wondering about that iPad page curling

2010-04-05 Thread Laurent Daudelin
On Apr 5, 2010, at 18:02, Graham Cox wrote: > CIFilter has a page curl transition effect. Just map the 't' value to the > mouse/finger location. > > --Graham > > > On 06/04/2010, at 10:55 AM, Laurent Daudelin wrote: > >> I got my hands on an iPad today. I was really impressed with the built-i

Keeping a progress window showing active

2010-04-05 Thread Graham Cox
Hi, My app currently needs to show a progress bar during startup (Yes, I know - I'm working on a better solution so this isn't going to be needed at all longer term). The problem I'm having is how to set this up correctly with respect to its active appearance. Other apps generally seem to use a

Re: Wondering about that iPad page curling

2010-04-05 Thread Alex Kac
Except CIFilter doesn't exist on the iPad in a public SDK setting. On Apr 5, 2010, at 8:22 PM, Laurent Daudelin wrote: > On Apr 5, 2010, at 18:02, Graham Cox wrote: > >> CIFilter has a page curl transition effect. Just map the 't' value to the >> mouse/finger location. >> >> --Graham >> >> >

Re: Keeping a progress window showing active

2010-04-05 Thread Quincey Morris
On Apr 5, 2010, at 18:31, Graham Cox wrote: > My app currently needs to show a progress bar during startup (Yes, I know - > I'm working on a better solution so this isn't going to be needed at all > longer term). The problem I'm having is how to set this up correctly with > respect to its activ

Re: Wondering about that iPad page curling

2010-04-05 Thread Laurent Daudelin
That would be a problem, wouldn't it? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdau

Re: Keeping a progress window showing active

2010-04-05 Thread Graham Cox
On 06/04/2010, at 12:03 PM, Quincey Morris wrote: > On Apr 5, 2010, at 18:31, Graham Cox wrote: > >> My app currently needs to show a progress bar during startup (Yes, I know - >> I'm working on a better solution so this isn't going to be needed at all >> longer term). The problem I'm having i

Re: Problems with repetetive execution of netstat using NSTask and NSTimer

2010-04-05 Thread Adam R. Maxwell
On Apr 5, 2010, at 3:02 PM, Ken Thomases wrote: > On Apr 5, 2010, at 4:05 PM, Kazior Fukacz wrote: > >> When I run it, it keeps working perfectly fine for a few minutes, then stops >> refreshing the IP and prints: >> >> IPShowX[14917] *** NSTimer discarding exception '*** -[NSCFDictionary >>

Alternative Location of Cocoa ID3 Framework??

2010-04-05 Thread Chase Meadors
I've been searching google for a while, and have repeatedly stumbled across mention of an Objective-C ID3 framework constantly linked to http://drewfamily.homemail.com.au/Cocoa_-_ID3Tag_framework.html However, I must be really late because this project seems to have fallen off the face of th