How to safely break read stream?

2009-05-24 Thread Chris Gardner
Hi guys, I create a read stream with CFReadStreamOpen(), but I don't know how to safely break it. Eagerly waiting for your reply. Best Regards, Chris _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.c

Re: Core Data and ordered to-many relations

2009-05-24 Thread Kevin Gessner
On May 25, 2009, at 12:15 AM, Kelvin Chung wrote: Is there a way to represent an ordered to-many relation? It sounds like you need Brain Webster's BWOrderedManagedObject: http://www.fatcatsoftware.com/blog/2008/per-object-ordered-relationships-using-core-data It adds mutableOrderedValueForKe

Re: Header Differences

2009-05-24 Thread Ken Thomases
On May 25, 2009, at 12:16 AM, Michael Ash wrote: On Mon, May 25, 2009 at 12:51 AM, Chunk 1978 wrote: is there a difference? which one should be used? No difference. Use whatever makes you happy. IBOutlet is just a hint to help Interface Builder parse your header. It literally does nothing

Re: Best way to draw text in CAOpenGLLayer

2009-05-24 Thread Anshul jain
Ya i also thought that way but the problem is that between two rss feed there should be a separator image. So if i use scroll layer then it can be a problem of drawing the image. On 22-May-09, at 11:16 PM, David Duncan wrote: On May 21, 2009, at 11:25 PM, Anshul jain wrote: Hi thanks for

Re: Header Differences

2009-05-24 Thread Michael Ash
On Mon, May 25, 2009 at 12:51 AM, Chunk 1978 wrote: > i'm following a tutorial that lists the header file like this: > > > -=-=-=-=- > @interface PickersAppDelegate : NSObject >        { >        IBOutlet UIWindow *window; >        IBOutlet UITabBarController *rootController; >        } > > @prop

Header Differences

2009-05-24 Thread Chunk 1978
i'm following a tutorial that lists the header file like this: -=-=-=-=- @interface PickersAppDelegate : NSObject { IBOutlet UIWindow *window; IBOutlet UITabBarController *rootController; } @property (nonatomic, retain) UIWindow *window; @property (nonatomic, ret

Re: Core Data and ordered to-many relations

2009-05-24 Thread jmunson
Didn't the OP want the relatives joined in a specific order (or, at least, be able to retrieve them in a specific order)? "in the order prescribed." To do that, joins alone won't satisfy his query (Core Data structures are not guaranteed to return in any order). As I read them, his option

Positioning images in buttons?

2009-05-24 Thread Jo Meder
Hi, In Carbon there is a lot of control over the placement of images in bevel buttons particularly, through SetBevelButtonGraphicAlignment(). You have good control over the initial positioning of the image and you can also specify offsets from those initial positions to fine tune placemen

Re: Core Data and ordered to-many relations

2009-05-24 Thread Jerry Krinock
If there's only two relatives, as in your example, use two to-one relationships. If there's an indeterminate number, you can add an intermediate "joiner" entity, as explained here: http://www.cocoabuilder.com/archive/message/cocoa/2007/9/16/189293 The above joins between two different enti

Emulating Carbon menu bevel button?

2009-05-24 Thread Jo Meder
Hi, I was wondering if anyone has emulated a Carbon menu bevel button in Cocoa? I find this to be a notable lack in Cocoa. I've tried using a NSPopUpButton but that's obviously not suited to the purpose. At this stage I'm thinking of custom drawing the button to have a smaller arrow in th

Re: NSScrollView, NSTableView and NSSplitView Glitch

2009-05-24 Thread Dave Keck
Nice. I spent an hour or two fiddling with your test project and eventually gave up. Good to see you solved it. David ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

RE: NSScrollView, NSTableView and NSSplitView Glitch

2009-05-24 Thread Ulai Beekam
Well I'll be damned. I finally found out how to fix this thing. Turns out it is trivial when you know about it :) Simply do this in IB: http://dl.getdropbox.com/u/496106/tableViewIBSetting.png for the *table view* (not just the scroll view). Then it starts behaving properly, even when we r

Re: Properly scaling a vector image with CG

2009-05-24 Thread WT
Hi Gwynne, I'm not sure if this will help, but UIView instances have a 'contentMode' property which you can set to UIViewContentModeRedraw, which forces the instance to redraw itself (by auto-calling - setNeedsDisplay) when the view's'bounds' property changes. You can also set it through I

Re: which temp dir to use?

2009-05-24 Thread Greg Guerin
Michael Ash wrote: Malevolent process C fails. Or maybe malevolent process C works because it's running with the same uid as unprivileged process A. The sticky-bit on a directory only prevents one uid from interfering with another uid's files. It has no effect if the uids of the proce

NSView click through

2009-05-24 Thread Mr. Gecko
Hello, I'll start off by saying what I'm trying to do. I'm making a status item that uses a view to scroll text across the menu and I'm trying to make it so if you click it, it goes to the status item and the status item displays the menu and highlights. The way I have it now is I have a mous

Properly scaling a vector image with CG

2009-05-24 Thread Gwynne Raskind
I have a UIView inside a UIScrollView. The UIView has a bunch of CALayers with custom drawing code which render vector images. A nice thing about vector images is that when you zoom in on them, they still look good. But using UIScrollView's zooming support, I still get nasty bitmap zooming

Re: which temp dir to use?

2009-05-24 Thread Kyle Sluder
On Sun, May 24, 2009 at 3:18 PM, Michael Ash wrote: > /tmp has a special permissions bit set called the sticky bit. When set > on directories, the sticky bit modifies the standard UNIX permissions > model and makes it so that the directory's contents can only be > deleted or renamed by the owner o

Re: dot notation doesn’t work as expected fo r some library classes

2009-05-24 Thread Michael Ash
On Sun, May 24, 2009 at 6:00 PM, Marc Liyanage wrote: > > I was playing around a bit with the Obj-C 2.0 dot notation to clarify some > things for me. In my own classes getters and setters are called as expected, > but I noticed several times already that library classes sometimes don’t > allow the

Re: which temp dir to use?

2009-05-24 Thread Michael Ash
On Sun, May 24, 2009 at 12:52 PM, Kyle Sluder wrote: > 1. Non-privileged process A running as user Alice creates a file > called /tmp/ipc. > 2. A signals to privileged process B, running as root, that the file exists. > 3. Malevolent process C, running as user Eve, notices the file, > unlinks it (

Re: dot notation doesn’t work as expected f or some library classes

2009-05-24 Thread Gwynne Raskind
On May 24, 2009, at 6:00 PM, Marc Liyanage wrote: I was playing around a bit with the Obj-C 2.0 dot notation to clarify some things for me. In my own classes getters and setters are called as expected, but I noticed several times already that library classes sometimes don’t allow the dot not

Core Data and ordered to-many relations

2009-05-24 Thread Kelvin Chung
Is there a way to represent an ordered to-many relation? For example, suppose you have an entity, Person, related to itself (one-to-many). Now suppose Alice is related to Carol and Dave, and Bob is related to Dave and Carol, in the order prescribed. Is there a way to model that using a re

dot notation doesn’t work as expected for som e library classes

2009-05-24 Thread Marc Liyanage
I was playing around a bit with the Obj-C 2.0 dot notation to clarify some things for me. In my own classes getters and setters are called as expected, but I noticed several times already that library classes sometimes don’t allow the dot notation (that’s the reason why I’m trying to clar

Re: Show alert via NSStatusicon and popup message

2009-05-24 Thread Kyle Sluder
On Sun, May 24, 2009 at 3:23 AM, Mangesh Kute wrote: > 1. Is there any way to alert user via NSStatusIcon e.g. blinking > status icon or changing image etc. ? 1. Blinking is annoying; don't do it. Changing the image is useful. 2. There's no class called NSStatusIcon. There is, however, NSStatus

Re: Can't understand this build error

2009-05-24 Thread Greg Guerin
Kyle Sluder wrote: One of the following has happened: Variations: 4. The build configuration that worked last week (e.g. Debug) isn't the one that's being compiled today (e.g. Release), and there are differences in something specific to the config, such as lib search paths, include pat

Re: Can't understand this build error

2009-05-24 Thread Kyle Sluder
On Sat, May 23, 2009 at 6:21 AM, Ian Piper wrote: > (In red)                "_TLTableBgColorKey", referenced from: > (in grey)                       _TLTableBGColorKey$non_lazy_ptr in > MyDocument.o > (in red)                "_TLColorChangedNotification", referenced from: > (in grey)              

RE: NSFormatter Question

2009-05-24 Thread Ulai Beekam
You're right, you can't edit the formatter's error in control:didFailToFormatString:errorDescription: because the error description has already been determined. You need to override the getObjectValue:forString:errorDescription: method of NSFormatter to set a custom error description. As fo

Can't understand this build error

2009-05-24 Thread Ian Piper
Hi all, I hope someone can help me shine some light on this error. I have two errors coming up on build, but they are not highlighted anywhere in the code as is normally the case with warnings and errors. This is what I see in the Errors and Warnings list: (In red)"_TLTabl

NSFormatter Question

2009-05-24 Thread Dietmar Kuttelwascher
This is a newbie question, my apologies if it has been discussed in the past. I haven't been programming on a Mac since the System 7 days and trying to catch up with OS X and Cocoa... I have text field bound to an NSObjectController with an NSNumberFormatter to ensure that there are only in

Show alert via NSStatusicon and popup message

2009-05-24 Thread Mangesh Kute
Hi, 1. Is there any way to alert user via NSStatusIcon e.g. blinking status icon or changing image etc. ? 2. Is there any way to show popup message ? Regards, Mangesh ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requ

Re: which temp dir to use?

2009-05-24 Thread Kyle Sluder
On Sun, May 24, 2009 at 11:28 AM, Dave Keck wrote: > I debated whether I should mention my technique thinking someone might > bring up this precise vulnerability. :) It is possible to use /tmp safely, but you have to be very careful. Just like when doing anything sensitive on the filesystem. > M

Re: which temp dir to use?

2009-05-24 Thread Dave Keck
> 1. Non-privileged process A running as user Alice creates a file > called /tmp/ipc. > 2. A signals to privileged process B, running as root, that the file exists. > 3. Malevolent process C, running as user Eve, notices the file, > unlinks it (which it can do due to the permissions on /tmp) and >

Re: strange menu item key equivalent behavior

2009-05-24 Thread Rick C.
Thanks again Sean for the reply. I do appreciate it! Rick From: Sean McBride To: Rick C. ; cocoa dev Sent: Sunday, May 24, 2009 2:00:10 AM Subject: Re: strange menu item key equivalent behavior Rick C. (jo_p...@yahoo.com) on 2009-05-23 12:40 PM said: >Tha

Re: which temp dir to use?

2009-05-24 Thread Kyle Sluder
On Sun, May 24, 2009 at 9:52 AM, Kyle Sluder wrote: > If you *must* use /tmp for some reason (not linking > against Foundation, etc.) use FSFindFolder. Sorry, wasn't clear here. I meant "If you can't use NSTemporaryDirectory", not "If you *must* use /tmp". --Kyle Sluder

Re: which temp dir to use?

2009-05-24 Thread Kyle Sluder
On Sun, May 24, 2009 at 5:58 AM, Dave Keck wrote: > I use /tmp. Works great for me - I use it to save temporary files that > another privileged process then moves to a permanent location. Launchd > uses it too, along with a host of other things. Please don't just toss things in /tmp. Launchd doe

Re: which temp dir to use?

2009-05-24 Thread Greg Guerin
Richard Frith-Macdonald wrote: What you want is user specific and application specific I presume (ie you want to store the data your your application, and for the person who is running the application). I guess it's not really temporary (or you wouldn't need a fixed path), but is actually

Re: System Preference like App

2009-05-24 Thread Uli Kusterer
On 24.05.2009, at 16:22, cocoa learner wrote: I tried but getting the following error - "Stub implementation of -setTarget by NSCell does nothing." NSImageCell is a subclass of NSCell. Seems it does not support setTarget/setAction. If you want to get informed of clicks in your icons you ne

Re: System Preference like App

2009-05-24 Thread cocoa learner
Hi Uli, I got how to do it by doing some hit and trial method. I need not to drag and drop the NSImageCell. I can directly set the "Image" attribute of each NSMatrix cell. Thank you all. Cocoa.learner On Sun, May 24, 2009 at 8:22 PM, cocoa learner wrote: > Hi Uli,I tried but getting the follow

Re: System Preference like App

2009-05-24 Thread cocoa learner
Hi Uli,I tried but getting the following error - "Stub implementation of -setTarget by NSCell does nothing." tell me summaries what I have done just to see if the NSMatrix is behaving properly - 1>. I created an 2x2 NSMatrix. Set the mode as "Highlight". Even I tried all modes. 2>. From IB dragge

RE: NSScrollView, NSTableView and NSSplitView Glitch

2009-05-24 Thread Ulai Beekam
Thanks for the reply, Here is my sample project: http://dl.getdropbox.com/u/496106/scrollViewSplitViewGlitch.zip I have added a simple data source to it that gives the table view 10 rows. Just to emphasize that unchecking "show vertical scroller" is not really an option for me because I indee

Re: which temp dir to use?

2009-05-24 Thread Dave Keck
I use /tmp. Works great for me - I use it to save temporary files that another privileged process then moves to a permanent location. Launchd uses it too, along with a host of other things. But yeah, where you put your temporary files really depends on the context and who needs to see the them. D