Re: Image processing in Cocoa

2008-09-24 Thread Christian Giordano
Hi Helder, I found this post that can be really helpful when I will have to do my pixel operations: http://www.rodgutierrez.com/blog/2008/07/how-to-create-a-rgba-cgimagere.html I still have to find how to draw an CGImageRef in another one regardless the current context, I'm still wondering if thi

Re: What does @loader_path refer to when loading ibplugins from a linked-in framework?

2008-09-24 Thread Michael Ash
On Wed, Sep 24, 2008 at 11:15 AM, Dalzhim Dalzhim <[EMAIL PROTECTED]> wrote: > Greetings, > > I have followed the Interface Builder Plug-in Programmation Guide in order > to make my first ibplugin and there is one problem I haven't been able to > solve yet. It is stated that when opening a nib fil

Re: NSDate/Tokens for Calendar Format String Question

2008-09-24 Thread Eric Lee
Wow...never saw that...can't believe it Thanks! I'll look into it On Sep 24, 2008, at 10:13 PM, Sean McBride wrote: Eric Lee ([EMAIL PROTECTED]) on 2008-9-24 10:21 PM said: I have a problem. Basically, I want to take the time, and set the text field to that time, only the time with 12 H

Re: NSDate/Tokens for Calendar Format String Question

2008-09-24 Thread Sean McBride
Eric Lee ([EMAIL PROTECTED]) on 2008-9-24 10:21 PM said: >I have a problem. Basically, I want to take the time, and set the text >field to that time, only the time with 12 Hours. How do you do this? Have you read about NSDateFormatter? ___ Cocoa-dev

NSDate/Tokens for Calendar Format String Question

2008-09-24 Thread Eric Lee
I have a problem. Basically, I want to take the time, and set the text field to that time, only the time with 12 Hours. How do you do this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

re: setPrimitiveValue:forKey: and to-many relationships

2008-09-24 Thread Ben Trumbull
Sean, Jon, The documentation is correct for 10.4. On 10.5, things are more forgiving, and you can call -setPrimitiveValue:forKey: with a public set. We won't use that object, but we will use its contents. It does no inverse maintenance, so unless it's part of the public setter for the

Re: setPrimitiveValue:forKey: and to-many relationships

2008-09-24 Thread Quincey Morris
On Sep 24, 2008, at 17:30, Sean McBride wrote: Surely their example would not screw up inverse relationships, since they also recommend one always have inverses... I guess [self primitiveChildren] could be some kind of proxy instead of a plain set, which might explain it. That would also exp

Re: setPrimitiveValue:forKey: and to-many relationships

2008-09-24 Thread Sean McBride
On 9/24/08 5:01 PM, Quincey Morris said: >> - (void)setChildren:(NSSet *)value_ >> { >> [self willChangeValueForKey:@"children" >>withSetMutation:NSKeyValueSetSetMutation >>usingObjects:value_]; >> [[self primitiveChildren] setSet:value]; >> [self didChangeValueForKey:@"children" >>

Re: Merging 3 JPG images into one panoramic image

2008-09-24 Thread Nick Zitzmann
On Sep 24, 2008, at 5:25 PM, Paul Brown wrote: So my question is this: How easy would this task be for a total n00b at Cocoa and Objective-C programming? Easy, and you don't need CoreImage for that. If y'all think it is a simple task, could someone provide me with perhaps some high-level

Re: setPrimitiveValue:forKey: and to-many relationships

2008-09-24 Thread Quincey Morris
On Sep 24, 2008, at 16:34, Sean McBride wrote: - (void)setChildren:(NSSet *)value_ { [self willChangeValueForKey:@"children" withSetMutation:NSKeyValueSetSetMutation usingObjects:value_]; [[self primitiveChildren] setSet:value]; [self didChangeValueForKey:@"children" withSetMutation:

Re: setPrimitiveValue:forKey: and to-many relationships

2008-09-24 Thread Sean McBride
On 9/24/08 3:56 PM, Quincey Morris said: >> Is that wrong? > >I think so. Your "else" statement does what the documentation tells >you not to do. Indeed. >IAC, it's not clear why you need to use setPrimitiveValue: at all. Thank you for your fresh perspective. That did not occur to me, no doubt

Re: unable to break out of runloop because timers are fired andthen the loop waits

2008-09-24 Thread jason . coco
He said in another message that he didn't want to poll... In that case the only option is to ensure an input source fires or to use a CFRunLoop instead. Sent via BlackBerry from T-Mobile -Original Message- From: Muraviev Dmitry <[EMAIL PROTECTED]> Date: Wed, 24 Sep 2008 23:30:45 To: Ja

Merging 3 JPG images into one panoramic image

2008-09-24 Thread Paul Brown
I'm extremely new to Cocoa - I'm going through Aaron Hillegass's book now, actually, so I thought I would come here to ask for some hints. I have thousands of worship background images that are single 1024x768 JPG images and they come in sets of 3 to form triptychs when placed side by side. I am s

Re: unable to break out of runloop because timers are fired and then the loop waits

2008-09-24 Thread Muraviev Dmitry
This works fine: NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; mTimer = [[NSTimer alloc] initWithFireDate: ... interval: ... target:self selector:@selector(...:) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] addTimer:mAudioIdleTimer forMode:NSDefaultRunLoopMode]; [[NS

Re: setPrimitiveValue:forKey: and to-many relationships

2008-09-24 Thread Quincey Morris
On Sep 24, 2008, at 12:34, Sean McBride wrote: First they state: "If you try to set a to-many relationship to a new NSMutableSet object, it will (eventually) fail." Eventually?! What does that even mean? Will it fail later during - [NSManagedObjectContext save:]? When an managed object is t

Re: unable to break out of runloop because timers are fired and then the loop waits

2008-09-24 Thread Jason Coco
On Sep 24, 2008, at 15:15 , Jason Bobier wrote: Hey folks, I have a runloop on a thread that looks like this: while (! _cancelled) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [runloop runMode:NSDefaultRunLoopMode befor

Re: Unable to launch about panel for the 2nd time

2008-09-24 Thread Jason Coco
On Sep 24, 2008, at 15:16 , I. Savant wrote: On Wed, Sep 24, 2008 at 6:17 AM, Arun <[EMAIL PROTECTED]> wrote: First time i am to see the panel being launched and if i close the panel and try yo launch it one more time, the panel is not vsible. Your question was answered yesterday ... che

Re: unable to break out of runloop because timers are fired and then the loop waits

2008-09-24 Thread Dave Dribin
On Sep 24, 2008, at 3:35 PM, Jason Bobier wrote: Thanks Nick. I'm trying to avoid polling tho (since that is the whole point of runloops and mach ports). Take a look a message I posted a few days ago that uses a Mach port to wake up the run loop:

Re: unable to break out of runloop because timers are fired and then the loop waits

2008-09-24 Thread Jason Bobier
Thanks Nick. I'm trying to avoid polling tho (since that is the whole point of runloops and mach ports). Jason On Sep 24, 2008, at 3:38 PM, Nick Zitzmann wrote: On Sep 24, 2008, at 1:15 PM, Jason Bobier wrote: Hey folks, I have a runloop on a thread that looks like this: while (! _cancel

Re: Creating alias programatically

2008-09-24 Thread Charles Srstka
On Sep 24, 2008, at 9:19 AM, Michael Ash wrote: On Wed, Sep 24, 2008 at 1:43 AM, Charles Srstka <[EMAIL PROTECTED]> wrote: [source appendFormat:@"set theAlias to make alias at POSIX file \"[EMAIL PROTECTED]" to POSIX file \"[EMAIL PROTECTED]"\n", NSTemporaryDirectory(), originalPath]; Ple

Re: unable to break out of runloop because timers are fired and then the loop waits

2008-09-24 Thread Nick Zitzmann
On Sep 24, 2008, at 1:15 PM, Jason Bobier wrote: Hey folks, I have a runloop on a thread that looks like this: while (! _cancelled) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [runloop runMode:NSDefaultRunLoopMode befo

setPrimitiveValue:forKey: and to-many relationships

2008-09-24 Thread Sean McBride
Hi all, Apple's documentation[1] on -setPrimitiveValue:forKey: is vague in two ways when using it to manage to-many relationships. First they state: "If you try to set a to-many relationship to a new NSMutableSet object, it will (eventually) fail." Eventually?! What does that even mean? Will it

Re: Saving an annotated PDF to a flat image

2008-09-24 Thread John Calhoun
On Sep 23, 2008, at 4:11 AM, Danny Greg wrote: I am trying to save a PDF annotated using subclasses of PDFAnnotation to an image (such as a png, jpg etc) or a PDF such that the annotations are displayed. So the resulting image should be annotated. Not too much code. Get the size of sa

Re: Unable to launch about panel for the 2nd time

2008-09-24 Thread I. Savant
On Wed, Sep 24, 2008 at 6:17 AM, Arun <[EMAIL PROTECTED]> wrote: > First time i am to see the panel being launched and if i close the panel and > try yo launch it one more time, the panel is not vsible. Your question was answered yesterday ... check the archives or your spam filter. -- I.S. __

unable to break out of runloop because timers are fired and then the loop waits

2008-09-24 Thread Jason Bobier
Hey folks, I have a runloop on a thread that looks like this: while (! _cancelled) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [runloop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; [pool rel

Just how accurate is timeIntervalSinceReferenceDate ?

2008-09-24 Thread André Berg
Hi, NSDate's timeIntervalSinceReferenceDate returns a double value, that has changing decimal places up to 10e-23, but we all know that is not possible, because that would be even more than attoseconds precision. And the docs just speak of "sub-milliseconds" precision. So, just how accurate

Handling User Generated Tablet Events

2008-09-24 Thread Daniele Basile
Hi, I am develop an application that must manage tablet event. For exactly I have a wacom tablet, and I read and study all possible documentation that I found. I am able to manage the tablet event, but I could not disable cursor moving from tablet. In other word I want: - receive tablet eve

Re: Receiving mouseEnter and mouseExit events.

2008-09-24 Thread Mattias Arrelid
On Tue, Aug 19, 2008 at 23:50, David Alter <[EMAIL PROTECTED]> wrote: > I just realized that NSTrackingArea is 10.5 and up. I need to support 10.4. > mouseEntered and mouseExited have been part of NSResponder from 10.0. To > receive these events in 10.4 what should I do? Sorry for the very late re

Re: NSOperation NSOperationQueue

2008-09-24 Thread Sandro Noel
Shawn. Very clear, thank you Sandro. On 24-Sep-08, at 12:18 PM, Shawn Erickson wrote: On Wed, Sep 24, 2008 at 8:56 AM, Sandro Noel <[EMAIL PROTECTED]> wrote: Greetings. I need a clarification about the NSOpration ans NSOperationQueue I read in the documentation that the NSOperation it

Re: Creating alias programatically

2008-09-24 Thread Rainer Brockerhoff
At 18:15 -0500 23/09/08, Ken Thomases wrote: >On Sep 23, 2008, at 5:54 PM, Rainer Brockerhoff wrote: >>That's news to me... I really can't recall right now where the alias file >>format was officially documented, but in the Classic days it was quite >>acceptable to create them yourself... > >From

Re: NSOperation NSOperationQueue

2008-09-24 Thread Shawn Erickson
On Wed, Sep 24, 2008 at 8:56 AM, Sandro Noel <[EMAIL PROTECTED]> wrote: > Greetings. > > I need a clarification about the NSOpration ans NSOperationQueue > > I read in the documentation that the NSOperation itself is non concurrent. > and that i can program it to be, if I override this and that met

Re: NSOperation NSOperationQueue

2008-09-24 Thread I. Savant
On Wed, Sep 24, 2008 at 11:56 AM, Sandro Noel <[EMAIL PROTECTED]> wrote: > I need a clarification about the NSOpration ans NSOperationQueue > ... > If I use NSOperation, override only the main method, I get a non concurrent > object to run a particular piece of code. > Stack these lovely objects i

Re: binding to static text

2008-09-24 Thread Negm-Awad Amin
Am Do,11.09.2008 um 02:38 schrieb James Walker: I have a static text item whose value is bound to an NSUserDefaultsController. It correctly shows the value stored as a default. However, if I programmatically change the text (with - [NSControl setStringValue:]), the new value does not get

Re: Controlling rootElement Display in outline view

2008-09-24 Thread Corbin Dunn
When the outline asks this with a nil 'item': - (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item; Don't return 1, but instead, return the number of children in your root item. Then, when this is asked with a nil 'item': - (id)outlineView:(NSOutlineView

NSOperation NSOperationQueue

2008-09-24 Thread Sandro Noel
Greetings. I need a clarification about the NSOpration ans NSOperationQueue I read in the documentation that the NSOperation itself is non concurrent. and that i can program it to be, if I override this and that method. and configure the runtime env. I assume that means create my own thread

What does @loader_path refer to when loading ibplugins from a linked-in framework?

2008-09-24 Thread Dalzhim Dalzhim
Greetings, I have followed the Interface Builder Plug-in Programmation Guide in order to make my first ibplugin and there is one problem I haven't been able to solve yet. It is stated that when opening a nib file, interface builder looks at every linked-in framework from the associated xcode proj

Re: Image processing in Cocoa

2008-09-24 Thread Christian Giordano
Thanks Mike, I can't use NSImage (guess why) but a subset. Btw, the problem I have is that I have a view which contains an image. I would like to draw in the image, not in the container view so I need to provide to the draw method the image context. Is this a good approach or all the drawing should

Re: CALayers inside NSSplitView (clipping issue)

2008-09-24 Thread John Clayton
Hi All, Someone kindly suggested that I post the question again, but that this time I make some sense :-) Good idea I say... So - step by step, first a series of facts to set the scene: 1. i have an NSSplitView 2. both of the views that this split view contains use CALayer instances 3. in t

Re: How to track Slider's value while dragging the mouse?

2008-09-24 Thread Erik Buck
- setContinuous:   setContinuous: Sets whether the receiver’s cell sends its action message continuously to its target during mouse tracking. - (void)setContinuous:(BOOL)flag Parameters flag YES if the action message should be sent continuously; otherwise, NO. __

Re: Creating alias programatically

2008-09-24 Thread Michael Ash
On Wed, Sep 24, 2008 at 1:43 AM, Charles Srstka <[EMAIL PROTECTED]> wrote: >[source appendFormat:@"set theAlias to make alias at POSIX file \"[EMAIL > PROTECTED]" to > POSIX file \"[EMAIL PROTECTED]"\n", NSTemporaryDirectory(), originalPath]; Please never do anything like this. This will fail

Re: How to track Slider's value while dragging the mouse?

2008-09-24 Thread Greg Titus
Hi Oleg, The property you want is setContinuous:YES, or check the "Continuous" checkbox in Interface Builder. (The method is defined on NSSilder's superclass, NSControl.) Hope this helps, - Greg On Sep 24, 2008, at 7:08 AM, Oleg Krupnov wrote: NSSlider only changes its value (and

How to track Slider's value while dragging the mouse?

2008-09-24 Thread Oleg Krupnov
NSSlider only changes its value (and fires its target/action and the binding) when the user releases the mouse button. Whereas I need to track the current value of the slider while the mouse is being dragged, with the button held down -- like thumbnail size in iPhoto. I can't believe I have to im

Re: lauchd and svnserve

2008-09-24 Thread Patrick Mau
I hope you don't mind sharing my plist. Please note the 'PathState', that avoids the mentioned mount issues. In addition, I use User/Group settings and decimal umask 23 ("027" octal). http://www.apple.com/DTDs/PropertyList-1.0.dtd "> Debug GroupName _svn

Re: lauchd and svnserve

2008-09-24 Thread René v Amerongen
Hi Roland, thanks for the explaining. Your script is allmost 100% that what I did use with 10.4, except I did have also ipv6 sockets there. But it did stop working under 10.5. I will try yours. Otherwise I will fall back with the foreground option. thanks René Op 24 sep 2008, om 12:49 heef

Re: lauchd and svnserve

2008-09-24 Thread Roland King
don't run it like that. the 'd' argument means daemon-ize and it's a requirement of launchd that processes do NOT do that. What's happening is the process is starting, it immediately backgrounds itself, which means the process launchd starts dies, then launchd tries to start it up again but

Re: lauchd and svnserve

2008-09-24 Thread Stéphane Sudre
On Sep 24, 2008, at 10:24 AM, René v Amerongen wrote: [...] 1.)While svnserve is running, in my Subversion_SVNserve.log log I see. svnserve: Root path '/Volumes/Development_Current/_CodeRepository' does not exist or is not a directory. svnserve: Root path '/Volumes/Development_Current/_CodeRe

Re: Image processing in Cocoa

2008-09-24 Thread Mike Abdullah
On 24 Sep 2008, at 10:50, Christian Giordano wrote: Hi guys, is there some good tutorial around about how to manipulate bitmaps in Cocoa? I would be interested on: - copy portion of image over another with a mask (this should be pretty straight forward with quartz2d) [[NSImage alloc] initWi

Image processing in Cocoa

2008-09-24 Thread Christian Giordano
Hi guys, is there some good tutorial around about how to manipulate bitmaps in Cocoa? I would be interested on: - copy portion of image over another with a mask (this should be pretty straight forward with quartz2d) - apply threshold - apply effects like blur Not sure if some of this, like the b

Re: Very basic Bindings question

2008-09-24 Thread Raphael Sebbe
Hi, here is how accessors should be defined. Watch the case too. file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/Compliant.html HTH Raphael On Wed, Sep 24, 2008 at 1

lauchd and svnserve

2008-09-24 Thread René v Amerongen
Dear list Not sure where to put this question, but I did see here more of launchd questions. I got svnserve running with the following plist. http://www.apple.com/DTDs/PropertyList-1.0.dtd "> KeepAlive PathState /

Re: Very basic Bindings question

2008-09-24 Thread Jason Coco
On Sep 24, 2008, at 04:21 , Adil Saleem wrote: Hi, I am trying to use bindings for the first time. So this is a pretty basic question. As an example what i am trying to do is that i have a NSTextField in which user enters some numeric value. I have a int type variable in my class that

Very basic Bindings question

2008-09-24 Thread Adil Saleem
Hi,   I am trying to use bindings for the first time. So this is a pretty basic question.   As an example what i am trying to do is that i have a NSTextField in which user enters some numeric value. I have a int type variable in my class that is binded to the value field of this text field. I g

Re: Rendering big PDF into thumbnail bitmap - too blurry

2008-09-24 Thread Uli Kusterer
On 24.09.2008, at 09:50, Oleg Krupnov wrote: Well, it's my interpretation that because the new technique was introduced in Mac OS 10.4 and later, the older technique has become obsolete. Not deprecated or invalid though. Ah! Sorry, brain-freeze there... somehow I ended up in 'creating a bit

Re: Rendering big PDF into thumbnail bitmap - too blurry

2008-09-24 Thread Oleg Krupnov
Well, it's my interpretation that because the new technique was introduced in Mac OS 10.4 and later, the older technique has become obsolete. Not deprecated or invalid though. Here's the original quote: "In Mac OS X v10.4 and later, it is possible to create a bitmap image representation object an

Re: CGLayer questions

2008-09-24 Thread Jean-Daniel Dupas
Le 24 sept. 08 à 06:04, Alex Reynolds a écrit : Is it possible to take a CGLayer and turn it into a bitmap representation? Create a CGBitmapContext and draw you layer into it. Also, is it possible to grab a CGRect "subset" of a CGLayer and append that to a new CGLayer, so that it isn't

Re: How make a cocoa lib wich create a window ?

2008-09-24 Thread rouanet brice
Hi, thanks, when I launch a simple app with this code it works : #import #import "MyOgView.h" int main(int argc, char *argv[]) { //use TransformProcessType to transform non gui processs in gui process //voir -[NSApplication runModalForWindow:]. NSAutoreleasePool *pool = [[NSAutor

Re: Converting from Carbon Event Manager to NSTimer

2008-09-24 Thread Uli Kusterer
On 24.09.2008, at 01:20, Dan Birns wrote: My application needs to set a timer that causes a function to be called at a time in the future. This is non-repeating, and sometimes has be immediate. I need it to be as efficient as possible, because it's called frequently. Have you checked ou

Re: Rendering big PDF into thumbnail bitmap - too blurry

2008-09-24 Thread Uli Kusterer
On 24.09.2008, at 08:24, Oleg Krupnov wrote: The latter is obsolete BTW. See the example: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Images/chapter_7_section_5.html#/ /apple_ref/doc/uid/TP40003290-CH208-BCICHFGA (the "Drawing Directly to a Bitmap" section) W