Re: Adding an image to a project

2010-07-15 Thread Vincenzo Morgante
Perhaps I understand the problem... NSString* imageName = [[NSBundle mainBundle] pathForResource:@"report" ofType:@"png"];if(imageName) {    // print the path for resource} The path for resource is not displayed because the object 'imageName' is nil.Why this object is nil?I added the file "report

Re: Adding an image to a project

2010-07-15 Thread Vincenzo Morgante
You're right, but unfortunately the project deadline is near: after all, the goal of this university project on computer vision is another and therefore we prefer to concentrate on the real goal of the project.The image that we can not load should be used to display a simple report containing th

Re: Adding an image to a project

2010-07-15 Thread Ron Fleckner
On 15/07/2010, at 5:18 PM, Vincenzo Morgante wrote: > The path for resource is not displayed because the object 'imageName' is > nil.Why this object is nil?I added the file "report.png" to the folder > Resources of my project: Hello Vincenzo, just a wild guess from an amateur: Did you just p

Re: Adding an image to a project

2010-07-15 Thread Vincenzo Morgante
Right-click on the Resources folder in Xcode's files pane on left and choose "Add Existing files..." from the menu. Then I selected the option "Copy..." in order to copy the image from the source folder. Vincenzo --- Gio 15/7/10, Ron Fleckner ha scritto: Da: Ron Fleckner Oggetto: Re: Adding

Re: Adding an image to a project

2010-07-15 Thread Ron Fleckner
One last amateurish wild guess: does Xcode list the image along with all your source files and other files which are part of your project in the pane above the editor when you select the Target or Project icon in the Groups & Files list? Does it list your image file in the Resources folder icon

Re: Adding an image to a project

2010-07-15 Thread Vincenzo Morgante
> One last amateurish wild guess: does Xcode list the image along with all your > source files> and other files which are part of your project in the pane > above the editor when you select> the Target or Project icon in the Groups & > Files list?Yes, it appears, but its role is empty... > Does

Re: Adding an image to a project

2010-07-15 Thread Vincenzo Morgante
> If you put the image into your project and add it to your application target, >Xcode will> automatically add it to a "Copy Files" build phase that places the >image into> WhateverApp.app/Contents/Resources/imagename.png. That is also the >place that -> pathForResource:ofType: will look for it.

Re: atomic properties and KVC

2010-07-15 Thread Mike Abdullah
There is nothing magic about KVC in this regard. It is a layer atop the methods your class generates. On 15 Jul 2010, at 06:50, Michael Link wrote: > If I have a property declared and synthesized (e.g. > @property BOOL foo; > > and I use a KVC method to access the value of foo (e.g. > [object v

Re: Adding an image to a project

2010-07-15 Thread Andy Lee
On Jul 15, 2010, at 5:25 AM, Vincenzo Morgante wrote: >> If you put the image into your project and add it to your application >> target, Xcode will> automatically add it to a "Copy Files" build phase that >> places the image into> WhateverApp.app/Contents/Resources/imagename.png. >> That is a

Re: Adding an image to a project

2010-07-15 Thread Ron Fleckner
On 15/07/2010, at 7:25 PM, Vincenzo Morgante wrote: > The subfolder "Resources" does not exist... The Resources folder exists inside your built executable's package. You don't add files to that after the build using the Finder. I suspect you have dragged your image into your projects folder i

Re: Live updating user defaults from a prefpane to a running app

2010-07-15 Thread Shamyl Zakariya
I have written a dummy app which uses the CFPreferences API to write to the headless app's domain, and uses NSDistributedNotificationCenter to broadcast an update message. The headless app receives that update message, and calls synchronize on its standardUserDefaults instance. However, this doesn

NSURLCredential and UTF-8 username

2010-07-15 Thread Benjámin Salánki
Hi List, I am having problems with NSURLCredential and that the username and password are apparently sent in ISO Latin 1 encoding. At least the guys on the server development side are complaining this is the case. I did not find any information on how the credential is encoded or if it is pos

Re: NSTextView becomes temporarily unresponsive

2010-07-15 Thread David Swofford
In case anyone is interested... I filed a bug. In the meantime, I am able to work around the problem by subclassing NSTextStorage and overriding doubleClickAtIndex: (a suggestion by Doug Davidson). I didn't have a clue how to write the primitive methods required for subclassing NSTextStorage,

Flipping coordinate system of a CALayer

2010-07-15 Thread Oleg Krupnov
Hi, In a layer-hosting custom view, I'm flipping the root layer coordinate system with the following code: CGAffineTransform flipTransform; flipTransform.a = 1.0; flipTransform.b = 0.0; flipTransform.c = 0.0; flipTransform.d = -1.0; flipTransform.tx = 0.0; flipTransform.ty = 0.0; [rootLayer setAf

Re: NSImage to IplImage (was: Adding an image to a project)

2010-07-15 Thread D'Angelo Emmanuel
Hi Vincenzo, Besides getting an NSImage from the correct path in your app bundle, you'll have to get the pixel data. An NSImage is an object that hides the raw pixel data from you, because of a display resolution independance purpose. To access the pixel data, you have the choice between : 1. e

Re: Flipping coordinate system of a CALayer

2010-07-15 Thread Kyle Sluder
On Thu, Jul 15, 2010 at 9:18 AM, Oleg Krupnov wrote: > Is this a bug? And how to work around it? There are lots of bugs with flipped layer-hosting views inside of layer-backed views.. See this thread: http://lists.apple.com/archives/cocoa-dev/2010/May/msg00988.html The only workaround I was able

NSUserDefaultsController and a document app.

2010-07-15 Thread Tony Romano
I have a document based cocoa app. I am using a NSUserDefaultsController to bind the properties of the document to defaults values. This all works. Since the controller defaults are 'shared', one side effect is every document window inherits the defaults even though the object for each docum

Where to find info about infrared port

2010-07-15 Thread Travis Siegel
I've recently picked up a pair of wireless headphones. I thought they were bluetooth, which I know osx supports. Unfortunately, after I got the headphones home, and finally hunted down some aaa batteries for them, I discovered they were actually infrared headphones, not bluetooth ones. I

Installation of screensaver fails

2010-07-15 Thread Gabriel Zachmann
I have developed a screensaver that seems to work fine, except one customer has the following problem when he tries to install it via double-clicking: ". I'm on a macbook pro mid 2009 unibody, 3.06 ghz processor. I'm booting 10.6.4 in 32-bit kernel mode. Every time I double click the installer I

Trying hard to get all domains in network

2010-07-15 Thread Meet Bhatha
Hello All, I am trying to find out all the intranet domains available in our network. I have tried using NSNetServiceBrowser, DNSServiceEnumerateDomains, CFNetServiceBrowseDomains but all three API's are returning only 'local.' and no other domains. (although I m connected to two domains).

UIKit newbie user confusion with connections and touch events

2010-07-15 Thread rramage
I'm creating a calculator app, mostly for my own amusement. My design is - The UILabels on the left are stacked: FIRST, LAST, DIFF. The input/displays are on the right. The input/displays of each corresponding value are also UILabels. Over the label are UIButtons (set to zero alpha), one for ea

Navigation controller management

2010-07-15 Thread Andrea Mattiuz
I'm developing an i Pad split view application, and I have to manage a navigation controller on the right side from the root view controller on the left side. I can add many views but I can't reset the navigation controller, so even if i tap on the master pane I only add new views and I can't r

NSTextView retain count and HICocoaView problems

2010-07-15 Thread Ryan Joseph
I have an NSTextView I am allocating programmatically then inserting into a HICocoaView for use in a Carbon app. The problem I'm experiencing has 2 points that are probably related. 1) The retainCount from the newly created NSTextView returns 4 and goes up to 7 after I call HICocoaViewCreate on

Re: Installation of screensaver fails

2010-07-15 Thread Nick Zitzmann
On Jul 15, 2010, at 2:56 AM, Gabriel Zachmann wrote: > I have developed a screensaver that seems to work fine, except one customer > has the following problem when he tries to install it via double-clicking: > > ". I'm on a macbook pro mid 2009 unibody, 3.06 ghz processor. I'm booting > 10.6.4

Re: Where to find info about infrared port

2010-07-15 Thread M Pulis
Now you need a Mac with an IR transmitter port you have one? Gary On Jul 14, 2010, at 7:44 PM, Travis Siegel wrote: I've recently picked up a pair of wireless headphones. I thought they were bluetooth, which I know osx supports. Unfortunately, after I got the headphones home, and fi

non-pointer instance variable

2010-07-15 Thread Michael Link
Is it necessary to use objc_atomicCompareAndSwapInstanceVariableBarrier when setting an instance variable such as an NSInteger in a GC app? Or would OSAtomicCompareAndSwap64Barrier be more appropriate? -- Michael___ Cocoa-dev mailing list (Cocoa-dev@l

Re: Trying hard to get all domains in network

2010-07-15 Thread Dave Carrigan
When you say "domain", what are you referring to. I can think of at least two different concepts that have the term "domain" applied to them. On Jul 15, 2010, at 6:40 AM, Meet Bhatha wrote: > > Hello All, > > I am trying to find out all the intranet domains available in our network. > > I ha

Re: non-pointer instance variable

2010-07-15 Thread Greg Parker
On Jul 15, 2010, at 2:13 PM, Michael Link wrote: > Is it necessary to use objc_atomicCompareAndSwapInstanceVariableBarrier when > setting an instance variable such as an NSInteger in a GC app? Or would > OSAtomicCompareAndSwap64Barrier be more appropriate? The objc version is necessary only for

Re: Live updating user defaults from a prefpane to a running app

2010-07-15 Thread Shamyl Zakariya
Since calling [[NSUserDefaults standardUserDefaults] synchronize] doesn't cause bindings to be triggered, I took a brute force approach and used a privately created NSUserDefaultsController, made it a property of my app delegate, and let my bindings use it as part of the key path. When my client

Reading in UTF-8 to Data

2010-07-15 Thread Brad Stone
I'm having trouble getting text to appear properly in an NSTextView which is binded to an NSData attribute in core data. I've been all over the internet but I'm still stumped. The original text looks like this: There is a period at the end of this sentence. You should have also just seen a line

Re: Adding an image to a project

2010-07-15 Thread Vincenzo Morgante
I added the image via XCode's interface: right button on Resources folder, add external file... Now it works without any problems, but not on my system: we created a new project in another system and we added the same source file and the image, then we built the project and it worked... Maybe th

Re: Adding an image to a project

2010-07-15 Thread Vincenzo Morgante
Since the plugin still does not work on my system, I'll try to create a new project following again the wizard for the development of plug-in for OsiriX. After all, it works on another system... Thanks! Vincenzo --- Gio 15/7/10, Ron Fleckner ha scritto: Da: Ron Fleckner Oggetto: Re: Addin

Re: Reading in UTF-8 to Data

2010-07-15 Thread Nick Zitzmann
On Jul 15, 2010, at 4:03 PM, Brad Stone wrote: > I'm having trouble getting text to appear properly in an NSTextView which is > binded to an NSData attribute in core data. I've been all over the internet > but I'm still stumped. > > The original text looks like this: > There is a period at th

Re: NSTextView retain count and HICocoaView problems

2010-07-15 Thread Kyle Sluder
On Wed, Jul 14, 2010 at 9:39 AM, Ryan Joseph wrote: > 1) The retainCount from the newly created NSTextView returns 4 and goes up to > 7 after I call HICocoaViewCreate on the NSTextView instance. I tried calling > release on the NSTextView and DisposeControl on the HICocoaView but neither > actu

Re: Adding an image to a project

2010-07-15 Thread B.J. Buchalter
On Jul 15, 2010, at 6:17 PM, Vincenzo Morgante wrote: > Since > the plugin still does not work on my system, I'll try to create a new > project following again the wizard for the development of > plug-in for OsiriX. After > all, it works on another system... If you are creating a plugin (rat

Re: NSTextView retain count and HICocoaView problems

2010-07-15 Thread Ryan Joseph
On Jul 15, 2010, at 4:25 PM, Kyle Sluder wrote: > On Wed, Jul 14, 2010 at 9:39 AM, Ryan Joseph > wrote: >> 1) The retainCount from the newly created NSTextView returns 4 and goes up >> to 7 after I call HICocoaViewCreate on the NSTextView instance. I tried >> calling release on the NSTextView

Re: NSTextView retain count and HICocoaView problems

2010-07-15 Thread Tony Romano
The reason dealloc is not being called is because you still have a retain count > 0. In cases like this, personally, I always assume my code is at fault. Once I have exhausted all known techniques trying to resolve the discrepancy then I escalate it. Your best bet is to use Instruments, forc

Re: Reading in UTF-8 to Data

2010-07-15 Thread Brad Stone
Yes, quoted-printable. That's precisely it but in doing my research in the documentation and on the internet it doesn't seem like it's a simple process especially for someone like me with 9 months of Cocoa development experience. Does anyone have a utility or sample code? On Jul 15, 2010, at 6

Re: Where to find info about infrared port

2010-07-15 Thread Graham Cox
On 15/07/2010, at 12:44 PM, Travis Siegel wrote: > Any and all information would be greatly appreciated. I think you'll find that this is what we call in the trade a "hardware problem". --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: Reading in UTF-8 to Data

2010-07-15 Thread Greg Guerin
Brad Stone wrote: Yes, quoted-printable. That's precisely it but in doing my research in the documentation and on the internet it doesn't seem like it's a simple process especially for someone like me with 9 months of Cocoa development experience. There is nothing apparent in your code

Re: Flipping coordinate system of a CALayer

2010-07-15 Thread Scott Anguish
On Jul 15, 2010, at 1:24 PM, Kyle Sluder wrote: > On Thu, Jul 15, 2010 at 9:18 AM, Oleg Krupnov wrote: >> Is this a bug? And how to work around it? > > There are lots of bugs with flipped layer-hosting views inside of > layer-backed views.. See this thread: > http://lists.apple.com/archives/coc

how to deploy the sqlite file in my Cocoa application installation

2010-07-15 Thread Wayne Shao
Hi, I am using sqlite in my cocoa application (for regular mac desktop/laptop). 1. How do I initialize the sqlite (e.g, make sure empty tables with the correct schema is put at the right path) as part of the application installation? 2. Any documentation on the install/packaging of my applicatio

Data Protection on iOS 4 with Core Data

2010-07-15 Thread Andrew
Hi All, So I have an OS 4 application that uses a core data store and I would like to use the new Data Protection stuff to make sure that when the user sets up their iPhone with a pass code, the core data store is correctly encrypted. Do I have to do anything to do this, or is it taken care of

Re: Flipping coordinate system of a CALayer

2010-07-15 Thread Dave Keck
>> The only workaround I was able to get working was to call a private >> AppKit method to fix up the layer geometry. > > Which is a no-no, and shouldn’t be done. Bad Kyle. No biscuit. Forgive me for raising such a taboo topic, but I've encountered situations where I had to choose between A) using

Re: Data Protection on iOS 4 with Core Data

2010-07-15 Thread Glenn Sequeira
On Fri, Jul 16, 2010 at 9:04 AM, Andrew wrote: > So I have an OS 4 application that uses a core data store and I would like to > use the new Data Protection stuff to make sure that when the user sets up > their iPhone with a pass code, the core data store is correctly encrypted. Take a look th