Synthesized ivar for std::tr1::shared_ptrMyClass?

2010-05-06 Thread Barry Wark
I'm no C++ guru, so I'm hoping someone can help me by explaining why the following gives a compiler error: //MyObjC.h @interface MyObjC : NSObject {} @end //MyObjC.mm #import MyObjC.h #include MyClass.h //provides MyClass, a C++ class #include tr1/memory using std::tr1::shared_ptr; @interface

Re: Custom NSPathControl

2010-05-06 Thread Uli Kusterer
On 05.05.2010, at 13:20, Graham Cox wrote: So is using NSPathControl even possible for this, or would I just be better off writing a complete new control from scratch? NSPathControl does some neat things like fading overlong text within a subcell that I could use, as well as displaying an

Re: [SOLVED] Re: Linking a specific controller instance to user defaults

2010-05-06 Thread Reinhard Segeler
Maybe you could set an NSUserDefaults value, that is being read in +initialize/-init of the view class to create your settingsname there... -- Reinhard Am 06.05.2010 um 03:41 schrieb Graham Cox: Hi Quincey. That occurred to me too but seems a bit hackish. I solved it by asking the

Re: Synthesized ivar for std::tr1::shared_ptrMyClass?

2010-05-06 Thread Uli Kusterer
On May 6, 2010, at 8:19 AM, Barry Wark wrote: Thus, I'm lead to believe this is an issue with runtime synthesizing of the ivar, but I'm at a loss to explain why it should be so. I would like to keep the C++ out of the header file if possible so that I can use standard Objective-C when

Re: Avoid drawing in half pixel

2010-05-06 Thread Alastair Houghton
On 5 May 2010, at 17:01, Simone Tellini wrote: you can turn it on/off according to your needs: ie. turn it off, draw vertical/horizontal lines that you don't want to become blurry, turn it on and draw the rest. I wouldn't be inclined to do that, actually. Much easier in the long run to use

Re: Synthesized ivar for std::tr1::shared_ptrMyClass?

2010-05-06 Thread Sherm Pendley
On Thu, May 6, 2010 at 2:19 AM, Barry Wark barryw...@gmail.com wrote: I'm no C++ guru, so I'm hoping someone can help me by explaining why the following gives a compiler error: I'm no guru either, but my guess would be that the interaction between synthesized ivars and C++ templates is rocky

Re: Utility/Floating window with titlebar on left side

2010-05-06 Thread Dan Ribe
Hello Everyone, I am porting my application from carbon to cocoa need exact functionality. In Carbon I was using Side Title with the utility window. Is there any way to do the same thing in cocoa now? I am not able to see Side Title anywhere in the interface builder. Already tried

Re: Avoid drawing in half pixel

2010-05-06 Thread Bill Hernandez
Gustavo, I ran into this a few days ago when I was drawing a variable number of rectangles to a view, and found that the spacing was not always exact as one would expect. In my case the gist of it was that [each unit] in essence was a [spacer + rectangleWidth] someViewWidthRequired = [spacer

NSBox sizeToFit problem

2010-05-06 Thread Ingvar Nedrebo
Hi all, I'm seeing some strange behaviour using NSBox's sizeToFit method. When I send the message in my code, the box gets sized too small and clips it contents. To make sure it wasn't anything to do with my app, I created a brand new test project, added a box to the main window, and put a

Re: Avoid drawing in half pixel

2010-05-06 Thread Bill Hernandez
On May 6, 2010, at 9:00 AM, Bill Hernandez wrote: // +-+-+-+-+-+-+-+-+ // DEFINE AND INITIALIZE MAIN RECT VARIABLES // +-+-+-+-+-+-+-+-+ NSUInteger i = 0;

Re: Utility/Floating window with titlebar on left side

2010-05-06 Thread Paul Sanders
Already tried NSBorderlessWindowMask, but that doesn't supports the close button functionality, which is required in my case. You can create a close button via +[NSWindow standardWindowButton:forStyleMask:] I think NSBorderlessWindowMask is the only game in town here. Paul Sanders.

Re: NSBox sizeToFit problem

2010-05-06 Thread Jerry Krinock
Maybe all the objects in your nib have not been created yet. Try invoking -sizeToFit in an -awakeFromNib method instead of -applicationDidFinishLaunching. Even if it doesn't fix the problem, it's still better.___ Cocoa-dev mailing list

drawRect not called when hosting Layers

2010-05-06 Thread Gustavo Pizano
Hello, all. I need to place a CAanimation in of subview when mouse enters a Tracking area, the problems I had were: -I set up the view to [self setWantsLayer:YES]; -added the layer that will perform the animation; when I entered the mouse all was perfect I see the animation. BUT the view

Re: NSBox sizeToFit problem

2010-05-06 Thread Bill Hernandez
On May 6, 2010, at 10:07 AM, Jerry Krinock wrote: Maybe all the objects in your nib have not been created yet. Try invoking -sizeToFit in an -awakeFromNib method instead of -applicationDidFinishLaunching. Even if it doesn't fix the problem, it's still better. I ran into the same

Re: NSBox sizeToFit problem

2010-05-06 Thread Ingvar Nedrebo
On 6 May 2010, at 16:07, Jerry Krinock wrote: Maybe all the objects in your nib have not been created yet. Try invoking -sizeToFit in an -awakeFromNib method instead of -applicationDidFinishLaunching. Even if it doesn't fix the problem, it's still better. Thanks Jerry. However

Re: NSBox sizeToFit problem

2010-05-06 Thread Bill Hernandez
On May 6, 2010, at 10:34 AM, Ingvar Nedrebo wrote: But when trying that, I discovered that invoking sizeToFit twice in a row does fit the box around its contents without clipping, but tightly -- i.e., without any margins. I tried various permutations of sizeToFit and setContentViewMargins

Re: drawRect not called when hosting Layers

2010-05-06 Thread David Duncan
On May 6, 2010, at 8:09 AM, Gustavo Pizano wrote: BUT the view controller of the super view that holds that particular view in fact its controls 2 view controllers witch their respective views, the one mentioned above and another one. So when I swap the view controllers and change the view,

Re: NSBox sizeToFit problem

2010-05-06 Thread Reinhard Segeler
The help says If you wish to change grouping behavior or other behavioral characteristics of the NSBox class, consider overriding setContentView:, sizeToFit, or addSubview: (inherited from NSView). maybe you didn't override the method siezToFit in your class managing the NSBox...

Re: iPhone resource cache - memory question

2010-05-06 Thread Philip Mobley
On May 5, 2010, at 9:25 PM, Shripada Hebbar wrote: I don't see any point in doing this on our own as the iPhone OS anyway gives you memory warning when we are consuming too much of it, and this is the right occasion to cleanup anything that is not needed ( in

Re: NSBox sizeToFit problem

2010-05-06 Thread Reinhard Segeler
The help says If you wish to change grouping behavior or other behavioral characteristics of the NSBox class, consider overriding

Re: NSBox sizeToFit problem

2010-05-06 Thread Reinhard Segeler
The help says If you wish to change grouping behavior or other behavioral characteristics of the NSBox class, consider overriding setContentView:, sizeToFit, or addSubview: (inherited from NSView). maybe you didn't override the method siezToFit in your class managing the NSBox...

Timing distributed notifications

2010-05-06 Thread McLaughlin, Michael P.
Is there a recommended way of determining that the currentRunLoop in a subordinate task (executable) is, in fact, running and ready to receive a distributed notification? I have one subtask for each CPU, all launched during the init method of my app. Each subtask responds with a ready message

Re: Timing distributed notifications

2010-05-06 Thread Jens Alfke
On May 6, 2010, at 10:34 AM, McLaughlin, Michael P. wrote: Is there a recommended way of determining that the currentRunLoop in a subordinate task (executable) is, in fact, running and ready to receive a distributed notification? No. That's really not what distributed notifications are

Re: iPhone resource cache - memory question

2010-05-06 Thread David Duncan
On May 6, 2010, at 10:13 AM, Philip Mobley wrote: I am trying to implement David Duncan's suggestion, but because I am dealing with images and sound, its not clear how much memory is actually being used (although worst case estimates can be made). For images I would use a cost estimate of

Re: iPhone resource cache - memory question

2010-05-06 Thread Jens Alfke
On May 6, 2010, at 10:13 AM, Philip Mobley wrote: I am trying to implement a generic resource management singleton class that will load all of the images, sounds, and data files for the app. This resource manager will keep track of how frequently each object is requested (or in the case

Re: iPhone resource cache - memory question

2010-05-06 Thread Jens Alfke
On May 6, 2010, at 11:02 AM, David Duncan wrote: For images I would use a cost estimate of width * height * 4 (this is typically what the memory cost to decompress and display an optimized PNG). Agreed. There are CG APIs that let you render an image directly from compressed file data

Re: iPhone resource cache - memory question

2010-05-06 Thread Philip Mobley
On May 6, 2010, at 11:02 AM, David Duncan wrote: I am trying to implement David Duncan's suggestion, but because I am dealing with images and sound, its not clear how much memory is actually being used (although worst case estimates can be made). For images I would use a cost estimate of

Re: drawRect not called when hosting Layers

2010-05-06 Thread Gustavo Pizano
David thanks for the info about the drawing. Im looking at the zombie error, and it seems the CALayer where Im putting the animation its being deallocated, even have something like: CALayer * quickEdit; @property(nonatomic, retain)CALayer * quickEdit; and in the .m file quickEdit = [CALayer

NSListViewTemplate invert

2010-05-06 Thread Trygve Inda
The NSListViewTemplate and other NSImages provided in IB invert when put into a button. How can I create a similar image so that when placed in a NSSegmentedControl in a toolbar, I can get the same effect? Or maybe I need to manually swap the image when the button is clicked? Perhaps this is

Re: Using a keyboard to push a button

2010-05-06 Thread Seth Willits
On May 6, 2010, at 6:11 AM, Travis Siegel wrote: In Interface Builder, select the button and then use the Attributes inspector to set its key equivalent. (Click the box to the right of “Key Equiv.:” and press the Enter key.) And for those of us who can't use interface builder, how would

Re: iPhone resource cache - memory question

2010-05-06 Thread David Duncan
On May 6, 2010, at 11:19 AM, Philip Mobley wrote: For images I would use a cost estimate of width * height * 4 (this is typically what the memory cost to decompress and display an optimized PNG). Yes, this is what I was planning for image memory estimates. Should I also add in something

Re: NSListViewTemplate invert

2010-05-06 Thread Trygve Inda
The NSListViewTemplate and other NSImages provided in IB invert when put into a button. How can I create a similar image so that when placed in a NSSegmentedControl in a toolbar, I can get the same effect? Or maybe I need to manually swap the image when the button is clicked? Perhaps this

-arch i386 -- Still useful?

2010-05-06 Thread Patrick M. Rutkowski
Is the -arch i386 argument to gcc (for building for i386 as opposed to x86_64). My fairly new iMac, for example, seems to be x86_64. Are there any intel macs which really are i386, and could not run x86_64 binaries? -Patrick ___ Cocoa-dev mailing list

Re: -arch i386 -- Still useful?

2010-05-06 Thread Daniel Grace
On Thu, May 6, 2010 at 2:36 PM, Patrick M. Rutkowski rutsk...@gmail.com wrote: Are there any intel macs which really are i386, and could not run x86_64 binaries? They didn't last long, but yes. I thought the same thing before building some software and found out the hard way. -Patrick

Re: -arch i386 -- Still useful?

2010-05-06 Thread Nick Zitzmann
On May 6, 2010, at 1:36 PM, Patrick M. Rutkowski wrote: Is the -arch i386 argument to gcc (for building for i386 as opposed to x86_64). My fairly new iMac, for example, seems to be x86_64. Are there any intel macs which really are i386, and could not run x86_64 binaries? Yes. Specifically,

Re: -arch i386 -- Still useful?

2010-05-06 Thread Jay O'Conor
First generation Intel MacBook Pros use a Core Duo (not Core 2 Duo) chip and therefore can only run 32-bit code. Earlier Intel Mac Minis are also 32-bit only, using Core Solo or Core Duo. I'm writing this on one of those 32-bit only Intel MacBook Pros, so we're definitely out here. I

Re: Timing distributed notifications

2010-05-06 Thread McLaughlin, Michael P.
On 5/6/10 1:57 PM, Jens Alfke j...@mooseyard.com wrote: On May 6, 2010, at 10:34 AM, McLaughlin, Michael P. wrote: Is there a recommended way of determining that the currentRunLoop in a subordinate task (executable) is, in fact, running and ready to receive a distributed notification?

Re: iPhone resource cache - memory question

2010-05-06 Thread Michael Ash
On Thu, May 6, 2010 at 2:12 PM, Jens Alfke j...@mooseyard.com wrote: An intermediate level would be if the library loads the _compressed_ audio. This is a lot less memory usage. It may even memory-map the file, which wouldn't affect your process's heap space at all. (I know the iPhone doesn't

Aliased text renders to the left of the drawing origin

2010-05-06 Thread Jonah Petri
Hello, I'm seeing a problem with rendering of certain fonts, when rendering them in a graphics context where antialiasing has been disabled. In particular, ArialMT 11 pt seems to render its double-u's one pixel to the left of the origin point. Also, a double-u at the end of the string seems

Re: Timing distributed notifications

2010-05-06 Thread Kyle Sluder
On Thu, May 6, 2010 at 1:38 PM, McLaughlin, Michael P. mp...@mitre.org wrote: I tried for a long time to get threads to work but they did not, even to the extent, sometimes, of seeing reverse scaling (longer runtimes with more threads). How about Grand Central Dispatch? A lot of the problems

Re: Aliased text renders to the left of the drawing origin

2010-05-06 Thread Jens Alfke
On May 6, 2010, at 1:41 PM, Jonah Petri wrote: I'm seeing a problem with rendering of certain fonts, when rendering them in a graphics context where antialiasing has been disabled. In particular, ArialMT 11 pt seems to render its double-u's one pixel to the left of the origin point.

Re: Timing distributed notifications

2010-05-06 Thread Jens Alfke
On May 6, 2010, at 1:38 PM, McLaughlin, Michael P. wrote: The reason, in my case, is almost certainly malloc contention (since threads share memory space). Each of my subtasks calls malloc more than a million times even for an average run. These are mostly dynamic allocations of vectors

Re: Aliased text renders to the left of the drawing origin

2010-05-06 Thread Jonah Petri
On May 6, 2010, at 5:12 PM, Jens Alfke wrote: On May 6, 2010, at 1:41 PM, Jonah Petri wrote: I'm seeing a problem with rendering of certain fonts, when rendering them in a graphics context where antialiasing has been disabled. In particular, ArialMT 11 pt seems to render its double-u's

Re: Aliased text renders to the left of the drawing origin

2010-05-06 Thread Jens Alfke
On May 6, 2010, at 2:40 PM, Jonah Petri wrote: Lots of glyphs extend to the left of the origin. It's especially common for italic letters with descenders. In some fonts, swashes extend way, way to the left. What is the value of boundingRect.origin.x? Zero, when I pass the options

Core Data and reading a data file

2010-05-06 Thread Paul Johnson
I have two programs. The first one (Setup) creates a file that the second one (Main) reads to initialize an array. I want to use the Data Modeler and Core Data. Setup is a Core Data Command Line Tool while Main is a Cocoa document-based application that also uses Core Data. In Main's

Cocoa/Objective-C flat name space problems

2010-05-06 Thread Stephen Blinkhorn
Hi all, I write audio unit plugins and Cocoa's flat name space is causing some real problems. Essentially I have a static library of Cocoa user interface classes that I use in multiple plug-in projects. These plug- ins are often run side by side by the user so I can't guarantee that a