Re: Core Data and reading a data file

2010-05-07 Thread Joanna Carter
Hi Jerry > Having made the mistake of using multiple projects for related products as a > beginner, I would strongly recommend that Paul consider developing these two > products as two targets within a single Xcode project. And if you're not > sure which is better, Paul, use a single project.

NSServerNotificationCenter Issues and Questions

2010-05-07 Thread Rick Mann
I'm trying to use NSServerNotificationCenter, but it's not working. That is, I'm not actually getting any notifications. When I set up the node on the server, I issue the commands as documented: $ notificationconf usessl me.com $ notificationconf setpass me.com myusername Enter password: $ noti

NSBrowser dragging

2010-05-07 Thread Micha Fuhrmann
Hi everyone, I've ran out of ideas, I just don't now what's wrong. I have an NSBrowser Object. I've set the delegate to another class which implements: - (BOOL)browser:(NSBrowser *)browser canDragRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column withEvent:(NSEvent *)event

Re: NSBox sizeToFit problem

2010-05-07 Thread Ingvar Nedrebo
On 6 May 2010, at 17:02, Bill Hernandez wrote: > 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 vario

Re: Submenus - What am I not understanding?

2010-05-07 Thread Graham Cox
On 07/05/2010, at 3:53 PM, Christopher Drum wrote: > 1. I have an NSPopUpButton in Interface Builder. When run in my live code, it > functions as expected. Pick an item and the menu properly reflects my choice. > Add a submenu cell to the list, populate it in Interface Builder, then run. > Now

Re: Submenus - What am I not understanding?

2010-05-07 Thread Alastair Houghton
On 7 May 2010, at 13:26, Graham Cox wrote: > On 07/05/2010, at 3:53 PM, Christopher Drum wrote: > >> 1. I have an NSPopUpButton in Interface Builder. When run in my live code, >> it functions as expected. Pick an item and the menu properly reflects my >> choice. Add a submenu cell to the list,

Re: drawRect not called when hosting Layers

2010-05-07 Thread Bill Garrison
On May 6, 2010, at 2:32 PM, Gustavo Pizano wrote: > 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, reta

Re: drawRect not called when hosting Layers

2010-05-07 Thread Gustavo Pizano
Hell Bill. Thanks for the reply. Yes, I realize I was just setting the ivar directly and not from the accessor. I change it and its working now. G. On May 7, 2010, at 4:17 PM, Bill Garrison wrote: > > On May 6, 2010, at 2:32 PM, Gustavo Pizano wrote: > >> David thanks for the info about th

NSPopupButtons work, but not in hierarchical mode, what am I missing here ?

2010-05-07 Thread Bill Hernandez
Hi everybody, I have a hierarchical popup button that should allow me to select a row and column, both at the same time instead of having to use one popup menu for row, and one for column If for example, I select (row, col) = (4,2) as shown, as soon as the mouse is released the selected item g

Re: EXC_BAD_ACCESS on breakpoint

2010-05-07 Thread Brent Smith
Its got to be something im doing wrong. Not certain though. On May 6, 2010, at 9:45 PM, Tino Rachui wrote: > Interesting I see this behavior as well when I debug my (completely > different) program. I ask on the ADC lists already. No answer so far. Maybe > this is a gdb bug!? > -Tino > > Sent

Creating a Bloom bluish CIFilter, silly question

2010-05-07 Thread Gustavo Pizano
Hello, all. Im applying aBloom Filter to a CALayer successfully but the filter its yellowish, I need it to have a bluish tone, I was thinking in stacking the Bloom filter and a Color filter, then apply it to the CALayer, but I don't see how achieving this filter stack. Thanks Gustavo ___

[Moderator] Re: Weird "iPhone OS 4.0 Library" dialog popping up

2010-05-07 Thread Scott Anguish
iPhone OS 4.0 is an unreleased product covered by a non-disclosure. You are breaking that non-disclosure by discussing it here. Doing so is not allowed. Emails such as this are forwarded to WWDR for further action. DO NOT TALK ABOUT NDA SOFTWARE ON THIS LIST. Scott [moderator] On May 5, 2010,

NSView subview transition issues

2010-05-07 Thread Nial Giacomelli
I've subclassed NSView to create a 'container' view (which I've called TRTransitionView) which I'm using to contain and display two subviews. These subviews transition between one another at the press of a button (with the undisplayed subview sliding in and replacing the current subview, and vice v

How do you set the text in an NSTextView?

2010-05-07 Thread G S
Hi all. I have a couple of tabs on my window, each of which has an NSTextView. You have to declare the IBOutlet variable in the app delegate as an NSScrollView; only by doing that can you get the outlet to show up on the Control-drag to the widget in Interface Builder. So I have the outlets conn

Re: NSPopupButtons work, but not in hierarchical mode, what am I missing here ?

2010-05-07 Thread Bill Hernandez
I think I am having the same problem as : Submenus - What am I not understanding? I was hoping that someone might see what I am trying to do and perhaps offer some ideas on a work-around, the ideas I've come up with are not pretty... Thanks again, Bill Hernandez Plano, Texas___

Re: NSBrowser dragging

2010-05-07 Thread Jens Alfke
On May 7, 2010, at 1:01 AM, Micha Fuhrmann wrote: > If I click-drag in the browser either right or left, the method is called. > But if I click-drag up or down, it isn't. All that happens is the cells get > selected. I've compared with the Apple example "ComplexBrowser", and i just > cannot se

Re: How do you set the text in an NSTextView?

2010-05-07 Thread Jens Alfke
On May 7, 2010, at 7:33 AM, G S wrote: > So I have the outlets connected, but an attempt to call setTextValue on the > textview results in an "unrecognized selector" report. How do you set the > text in the textView? I tried getting the text container, but no dice. -setString:. It’s declared i

Re: How do you set the text in an NSTextView?

2010-05-07 Thread Nick Zitzmann
On May 7, 2010, at 8:33 AM, G S wrote: > So I have the outlets connected, but an attempt to call setTextValue on the > textview results in an "unrecognized selector" report. How do you set the > text in the textView? I tried getting the text container, but no dice. You were close; you need to

Re: How do you set the text in an NSTextView?

2010-05-07 Thread Kyle Sluder
On May 7, 2010, at 7:33 AM, G S wrote: Hi all. I have a couple of tabs on my window, each of which has an NSTextView. You have to declare the IBOutlet variable in the app delegate as an NSScrollView; only by doing that can you get the outlet to show up on the Control-drag to the widget i

Problem with font display

2010-05-07 Thread Gwynne Raskind
I'm working on porting an old application from OS 9 to modern Cocoa (quite a jump). Over and over I've run into an issue where the text just doesn't draw the same way no matter what I do. Until now I've been able to ignore it because the cosmetic change wasn't as obvious, but now it's causing di

Re: How do you set the text in an NSTextView?

2010-05-07 Thread Bill Hernandez
GS, // +-+-+-+-+-+-+-+-+ // testAppDelegate.h // test // +-+-+-+-+-+-+-+-+ #import @interface testAppDelegate : NSObject { NSWindow *window;

Custom callout view with button over a MKMapView

2010-05-07 Thread olivier destrebecq
I created a subclass of MKAnnotationView which when selected display a callout view (similar to the MKPinAnnotationView) which is just a subclass of UIView with a button and text for now. The callout is added to the annotation view. The problem i have is that the button i put in the callout view ne

Re: How do you set the text in an NSTextView?

2010-05-07 Thread Douglas Davidson
On May 7, 2010, at 9:41 AM, Bill Hernandez wrote: > [textView insertText:myString]; You don't want to call insertText: for this. From the documentation: "This method is the entry point for inserting text typed by the user and is generally not suitable for other purposes. Programmatic m

Re: NSBrowser dragging

2010-05-07 Thread Corbin Dunn
On May 7, 2010, at 1:01 AM, Micha Fuhrmann wrote: > Hi everyone, > > I've ran out of ideas, I just don't now what's wrong. > > I have an NSBrowser Object. > > I've set the delegate to another class which implements: > > - (BOOL)browser:(NSBrowser *)browser canDragRowsWithIndexes:(NSIndexSet

Re: NSPopupButtons work, but not in hierarchical mode, what am I missing here ?

2010-05-07 Thread Gary L. Wade
Try a different UI approach. One thing to consider is using an NSBrowser if you have lots of upper-level options and a good number of sub items and want a cascading list where the leaf item is just a choice rather than a command. If you want commands but have a small number of upper-level options

Re: How do you set the text in an NSTextView?

2010-05-07 Thread Bill Hernandez
On May 7, 2010, at 11:49 AM, Douglas Davidson wrote: > You don't want to call insertText: for this. From the documentation: "This > method is the entry point for inserting text typed by the user and is > generally not suitable for other purposes. Programmatic modification of the > text is be

Re: Cocoa/Objective-C flat name space problems

2010-05-07 Thread Stephen Blinkhorn
On 7 May 2010, at 00:52, Jonathan Hess wrote: On May 6, 2010, at 7:27 PM, Stephen Blinkhorn wrote: Thanks Isaac, On 6 May 2010, at 16:35, Isaac Wankerl wrote: With #2, you might want to investigate using ibtool and the -- convert option to modify the nibs. Just from reading the man page,

Re: NSPopupButtons work, but not in hierarchical mode, what am I missing here ?

2010-05-07 Thread Bill Hernandez
Gary, This is way over my head, but I will re-read this several times, I am sure. Thanks for pointing the way. I will try to look at all the sources you mentioned. The biggest problem I've had, is that for the most part the demos that Apple provides are too advanced for where I am at in the lea

Modal window that does not block the main runloop

2010-05-07 Thread David Alter
I need to bring a window up that is modal for the application (i.e. you can not make other windows active, and you can not use menus while this window is up). However after bringing the modal window up I want control returned to the main runloop, not a modal runloop. If I use runModalForWindow: i

Re: NSView subview transition issues

2010-05-07 Thread Fritz Anderson
On 7 May 2010, at 5:14 AM, Nial Giacomelli wrote: > Within IB I have set my TRTransitionView sizing set to stretch to the bounds > of my window, and ideally I would like its subviews to stretch to the bounds > of the TRTransitionView container. By "stretch _to_ the bounds" do you mean what the

Good Resources ?

2010-05-07 Thread Bill Hernandez
Everybody, I started trying to learn Cocoa, Xcode, Objective C, etc sometime around November/December 2009 timeframe, and began trying to document what I learned along the way, mostly for myself as a learning experience, but also to help others trying to do the same. I realize there are tons of

NSCell and NSControl. Couple quick questions. Default tracking rects, and mouse states.

2010-05-07 Thread aaron smith
yo, I'm randomly tooling around with NSCell and NSControl. I wrote a quick test just to experiment with. It's a scale nine button. Here's a couple snippets on pastebin. They're really small. GDScale9Button.m: http://pastebin.com/MUV3EBma GDScale9ButtonCell.m: http://pastebin.com/YCG7Dv9V Scale9Ap

10.5 vs. 10.6 [NSMenu accessibilityIsIgnored] exception

2010-05-07 Thread Erik Benoist
All- I am developing a small NSMenuItem which works well in 10.6, but when ran in 10.5 it spits the following stack trace. I am building against the 10.6 SDK with a deployment target of 10.4. With that said I can and I have built against the 10.4, 10.5, and 10.6 APIs without any problem, but thi

Re: 10.5 vs. 10.6 [NSMenu accessibilityIsIgnored] exception

2010-05-07 Thread Laurent Daudelin
Well, it looks as if accessibilityIsIgnored is a 10.6 only method, it doesn't exist on 10.4 or 10.5. You should build against the 10.4 SDK to catch those problems. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logicie

Re: 10.5 vs. 10.6 [NSMenu accessibilityIsIgnored] exception

2010-05-07 Thread James Dempsey
We added support for -accessibilitySetOverrideValue:forAttribute: to NSMenu and NSMenuItem, for simple value types in 10.6 (NSString, NSNumber), primarily to enable adding an accessibility description to menu items which display only an image. This also included implementing accessibilityIsIgno

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

2010-05-07 Thread Barry Wark
On Thu, May 6, 2010 at 4:38 PM, Kyle Sluder wrote: > On Thu, May 6, 2010 at 4:18 PM, Barry Wark wrote: >> Thank you all for the suggestions. Using manual dynamic memory >> allocation somewhat defeats the purpose of using smart pointers, but >> it looks like that's the only option for now. For ref

Re: EXC_BAD_ACCESS on breakpoint

2010-05-07 Thread Brent Smith
When i run an NSLog on newLinesString I get this, 2010-05-07 11:56:07.604 testingApp[2573:a0f] ‡√Kpˇ When it should be some readable english form a text file. I am at a loss :( On May 6, 2010, at 8:08 PM, Kyle Sluder wrote: > On Thu, May 6, 2010 at 7:21 PM, Brent Smith wrote: >> I have an NS

Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread paul morel
Hi,I'm trying to use a c function: sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, n1, n1); When I compile my program for Mac OS X 10.5 and run the program everything is ok, whereas as soon as I use Mac OS X 10.6 the program crashes at this "sprintf" and there is a

Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread paul morel
Hi,I'm trying to use a c function: sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, n1, n1); When I compile my program for Mac OS X 10.5 and run the program everything is ok, whereas as soon as I use Mac OS X 10.6 the program crashes at this "sprintf" and there is a

Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread paul morel
Hi,I'm trying to use a c function: sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, n1, n1); When I compile my program for Mac OS X 10.5 and run the program everything is ok, whereas as soon as I use Mac OS X 10.6 the program crashes at this "sprintf" and there is a

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

2010-05-07 Thread Kyle Sluder
On Fri, May 7, 2010 at 11:47 AM, Barry Wark wrote: > Your comment brings things into better focus; it appears that template > instantiation is happening after the compiler attempts to synthesize > the ivar and accessor methods. Again, my C++-foo is weak but I recall > that template instantiation h

Re: EXC_BAD_ACCESS on breakpoint

2010-05-07 Thread Kyle Sluder
On Fri, May 7, 2010 at 11:57 AM, Brent Smith wrote: > When i run an NSLog on newLinesString I get this, > 2010-05-07 11:56:07.604 testingApp[2573:a0f] ‡√Kpˇ > > When it should be some readable english form a text file. > I am at a loss :( Well, it's quite apparent you have a memory management bug

Re: Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread Kyle Sluder
On Fri, May 7, 2010 at 11:59 AM, paul morel wrote: > Hi,I'm trying to use a c function: >        sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, > n1, n1); > When I compile my program for Mac OS X 10.5 and run the program everything is > ok, whereas as soon as I use Mac OS

Re: Modal window that does not block the main runloop

2010-05-07 Thread Jens Alfke
On May 7, 2010, at 10:28 AM, David Alter wrote: > I need to bring a window up that is modal for the application (i.e. you can > not make other windows active, and you can not use menus while this window > is up). However after bringing the modal window up I want control returned > to the main ru

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

2010-05-07 Thread Greg Parker
On May 6, 2010, at 4:18 PM, Barry Wark wrote: > Thank you all for the suggestions. Using manual dynamic memory > allocation somewhat defeats the purpose of using smart pointers, but > it looks like that's the only option for now. For reference, I've > filed this as rdar://7953539, but would be happ

Re: Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread Jens Alfke
On May 7, 2010, at 12:00 PM, paul morel wrote: > sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, > n1, n1); What’s the value of n1? How many bytes long is sFormat? Is the resulting string going to overflow it? To paraphrase Kyle, the debugger is your friend. —Jens_

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

2010-05-07 Thread Kyle Sluder
On Fri, May 7, 2010 at 12:29 PM, Greg Parker wrote: > Is there some reason why you can't declare your instance variables > explicitly, and tell @synthesize to use that ivar in the synthesized accessor > methods? He's trying to keep C++ out of his ObjC headers. --Kyle Sluder ___

Re: Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread Greg Parker
On May 7, 2010, at 11:59 AM, paul morel wrote: > Hi,I'm trying to use a c function: > sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, > n1, n1); > When I compile my program for Mac OS X 10.5 and run the program everything is > ok, whereas as soon as I use Mac OS X 10.6

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

2010-05-07 Thread Greg Parker
On May 7, 2010, at 12:33 PM, Kyle Sluder wrote: > On Fri, May 7, 2010 at 12:29 PM, Greg Parker wrote: >> Is there some reason why you can't declare your instance variables >> explicitly, and tell @synthesize to use that ivar in the synthesized >> accessor methods? > > He's trying to keep C++ ou

Re: Problem with font display

2010-05-07 Thread Jens Alfke
On May 7, 2010, at 9:36 AM, Gwynne Raskind wrote: > In OS 9, a particular string drawn in Geneva 9 with the old DrawString() API > was about 60 pixels wide. But when I draw that same string using the > NSStringDrawing methods and NSFont, I get much more "squished" text about 50 > pixels wide

Re: EXC_BAD_ACCESS on breakpoint

2010-05-07 Thread Brent Smith
I rolled back my xcode, seems to be an Xcode 3.2.3 issue. On May 7, 2010, at 12:04 PM, Kyle Sluder wrote: > On Fri, May 7, 2010 at 11:57 AM, Brent Smith wrote: >> When i run an NSLog on newLinesString I get this, >> 2010-05-07 11:56:07.604 testingApp[2573:a0f] ‡√Kpˇ >> >> When it should be som

Re: Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread Fritz Anderson
On 7 May 2010, at 2:00 PM, paul morel wrote: > sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, > n1, n1); You should also bear in mind that the printf() family lets you parameterize widths and precisions directly by using "*" instead of a number, and supplying the n

Re: Problem with font display

2010-05-07 Thread Gwynne Raskind
On May 7, 2010, at 3:40 PM, Jens Alfke wrote: >> In OS 9, a particular string drawn in Geneva 9 with the old DrawString() API >> was about 60 pixels wide. But when I draw that same string using the >> NSStringDrawing methods and NSFont, I get much more "squished" text about 50 >> pixels wide > O

Re: Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread Sean McBride
On Fri, 7 May 2010 15:03:31 -0500, Fritz Anderson said: >On 7 May 2010, at 2:00 PM, paul morel wrote: > >> sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1, >n1, n1); > >You should also bear in mind that the printf() family lets you >parameterize widths and precisions dire

Re: Problem with font display

2010-05-07 Thread Jens Alfke
On May 7, 2010, at 1:09 PM, Gwynne Raskind wrote: In any other situation, I'd do just that. This particular project, unfortunately, is supposed to be a "vintage" port of an old game, and the original code isn't even mine. I would strongly prefer to emulate the "look and feel" as much as po

Re: Problem with font display

2010-05-07 Thread Alastair Houghton
On 7 May 2010, at 21:09, Gwynne Raskind wrote: > In any other situation, I'd do just that. This particular project, > unfortunately, is supposed to be a "vintage" port of an old game, and the > original code isn't even mine. I would strongly prefer to emulate the "look > and feel" as much as po

Re: Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread Alastair Houghton
On 7 May 2010, at 21:16, Sean McBride wrote: > Also, you should never use sprintf. Use snprintf instead. snprintf() is safer, certainly, but "never" is a little strong for my taste. Like goto or longjmp(), it depends who is using it and what for. *Anyway*, this is cocoa-dev, and that being th

Re: 10.5 vs. 10.6 [NSMenu accessibilityIsIgnored] exception

2010-05-07 Thread Erik Benoist
Thats the thing I have built this against the 10.4SDK and I don't use any of the accessibility options in my code. -(void)awakeFromNib { imageFromBundle = [NSImage imageNamed:@"defaultimage20.png"]; statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableSta

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

2010-05-07 Thread Barry Wark
On Fri, May 7, 2010 at 12:37 PM, Greg Parker wrote: > On May 7, 2010, at 12:33 PM, Kyle Sluder wrote: >> On Fri, May 7, 2010 at 12:29 PM, Greg Parker wrote: >>> Is there some reason why you can't declare your instance variables >>> explicitly, and tell @synthesize to use that ivar in the synthes

Re: Problem mac os X version 10.6 when using sprinft

2010-05-07 Thread Sean McBride
On Fri, 7 May 2010 21:50:46 +0100, Alastair Houghton said: >On 7 May 2010, at 21:16, Sean McBride wrote: > >> Also, you should never use sprintf. Use snprintf instead. > >snprintf() is safer, certainly, but "never" is a little strong for my >taste. Like goto or longjmp(), it depends who is using

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

2010-05-07 Thread Greg Parker
On May 7, 2010, at 4:25 PM, Barry Wark wrote: > Yes! That's the ticket. I hadn't realized that the runtime still > provided non-fragile ivar support even when you explicitly declared > the ivar. Leave it to the runtime guru. Thanks, Greg. That's right. On iPhone OS devices and 64-bit Mac, all ivar

UIImage, UIColor colorWithPatternImage:, and PNG transparency

2010-05-07 Thread Matt James
Hey everyone, I'm having trouble getting a png with transparency to show up properly as a background image. Right now it *looks* like the transparent area is coming over as black. Here's the relevant code: self.selectedBackground = [UIImage imageNamed:@"selected-group.png"]; self.backgroundColo

Re: Are there any tools or techniques for detecting / debugging retain-cycles?

2010-05-07 Thread Michael A. Crawford
Thanks. Mike's article was extremely helpful. -Michael On May 5, 2010, at 11:32 PM, Andy Lee wrote: > > > > > --Andy > __

self = [super init], nil?

2010-05-07 Thread Patrick M. Rutkowski
Will NSObject's init method ever really return nil? E.g. if I sub-class NSObject, then is it worth checking for nil after doing self = [super init]? I know there are many classes in UIKit and Cocoa which most definitely can return nil from their -init's, as an indication of failure. But will this

Re: self = [super init], nil?

2010-05-07 Thread Bill Bumgarner
On May 7, 2010, at 11:34 AM, Patrick M. Rutkowski wrote: > Will NSObject's init method ever really return nil? > > E.g. if I sub-class NSObject, then is it worth checking for nil after > doing self = [super init]? > > I know there are many classes in UIKit and Cocoa which most definitely > can

Re: self = [super init], nil?

2010-05-07 Thread Roland King
Since NSObject is defined to return self from init the answer to the question is would appear to be no, it cannot return nil. But .. I cannot think of a good reason not to follow the recommended code, the templated code, all of apple's code (that I've seen thus far) and just check it for nil a

Re: self = [super init], nil?

2010-05-07 Thread Kyle Sluder
On May 7, 2010, at 11:34 AM, "Patrick M. Rutkowski" wrote: Will NSObject's init method ever really return nil? Realistically, no. If it does, there's nothing you can do about it, and you might as well abort. You've probably run out of memory, and I don't believe there's any guarantee th

Determining when dragging begins and ends

2010-05-07 Thread Dave DeLong
Hi everyone, I've got an outlineView that's displaying some managed objects for me. One of the properties being displayed is a countForFetchRequest: integer. Whenever the outlineView reloads, this count is re-evaluated by querying the managedObjectContext. I have a problem when I start dragg

Program crashed after edit values at NSTableView

2010-05-07 Thread Peter C
Hello all, I am doing a program to input align image values for horizontal and vertical. Basically it uses NSTableview to enter integer at horizontal and vertical columns. It work fine until the close button is clicked, the window is suppose to end modal mode and close window. But somehow it cr

Re: self = [super init], nil?

2010-05-07 Thread Roland King
On 08-May-2010, at 12:11 PM, Kyle Sluder wrote: > On May 7, 2010, at 11:34 AM, "Patrick M. Rutkowski" > wrote: > >> Will NSObject's init method ever really return nil? > > Realistically, no. If it does, there's nothing you can do about it, and you > might as well abort. You've probably run o

Re: Determining when dragging begins and ends

2010-05-07 Thread Seth Willits
On May 7, 2010, at 9:14 PM, Dave DeLong wrote: > How can I reliably know when dragging begins and ends? NSDraggingSource protocol? -- Seth Willits ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: Determining when dragging begins and ends

2010-05-07 Thread Graham Cox
On 08/05/2010, at 2:14 PM, Dave DeLong wrote: > I could tell all my objects to start caching this count, and then return that > cached value until I finish dragging. Why not cache the count anyway? If it is taking a long time to evaluate the count, caching it will give general performance ben

Re: Program crashed after edit values at NSTableView

2010-05-07 Thread Graham Cox
On 08/05/2010, at 2:21 PM, Peter C wrote: > How do I prevent [] or NSTableView updating after window is close ? Looks like the table view is asking your data source for something after that something has been deallocated. Try setting the table's dataSource to nil when the controller is deallo

prevent drag from QTMovieView

2010-05-07 Thread Rainer Standke
Hello, I have a Collection View whose prototype view includes a QTMovieView. I need the collection view to be a drag source, and that works fine. I need the QTMovieView to not be a drag source, so I subclassed it with a method that looks like this: - (NSDragOperation)draggingSourceOperationMas

Re: Modal window that does not block the main runloop

2010-05-07 Thread Ken Thomases
On May 7, 2010, at 2:26 PM, Jens Alfke wrote: > On May 7, 2010, at 10:28 AM, David Alter wrote: > >> I need to bring a window up that is modal for the application (i.e. you can >> not make other windows active, and you can not use menus while this window >> is up). However after bringing the mod

Re: How do you set the text in an NSTextView?

2010-05-07 Thread G S
Thanks for the replies, guys. On Fri, May 7, 2010 at 9:20 AM, Jens Alfke wrote: > -setString:. It’s declared in the superclass NSText, which makes it easy to > miss. (NSText is an abstract class and really only exists for historical > reasons.) > > This doesn't do anything, because the IBOutlet

Re: self = [super init], nil?

2010-05-07 Thread Kyle Sluder
On May 7, 2010, at 9:27 PM, Roland King wrote: If you're out of memory then it would be alloc returning nil, not init. In that case init wouldn't be called at all. The OP's question was about whether you need to check [ super init ] for nil in your subclass init method, if you get to that

Re: How do you set the text in an NSTextView?

2010-05-07 Thread Kyle Sluder
On May 7, 2010, at 11:02 PM, G S wrote: Interface Builder shows that this control is an NSScrollView. Repeatedly clicking on it does not drill down any further; NSScrollView is the end of the line. The class is never shown as NSTextView. Check out what happens if you Control-drag from