Re: Image Value Transformer setting image alpha less than 1.0

2010-06-14 Thread Gustavo Pizano
Hello Graham. So this is what I did, and its drawing ok. I subclasses the NSConllectionViewItem, in the copyWithzone method I weakly assigned self to its view (custom NSView also), then in the view subclass in the draw method I ask the controller (subclass of NSCollectionViewItem) for its r

Notification when network volume disappears

2010-06-14 Thread Boris Prohaska
Hi guys, i was just wondering, is there any way to determine when for example a network cable is plugged off while copying data to a network share? The Finder has a pretty long timeout... Is there a way in the FS API or ANY other way to get notified, when a volume isn't available for writing

Re: NSControl objects on a custom view

2010-06-14 Thread Florian Soenens
Hi Jens, thanks for the answer. If you drag an NSTextfield on your custom view in Interface Builder, doesn't it become a subview automatically? On 11 Jun 2010, at 19:03, Jens Alfke wrote: > > On Jun 11, 2010, at 7:04 AM, Florian Soenens wrote: > >> When i put default buttons or a NSSearchfiel

Re: NSControl objects on a custom view

2010-06-14 Thread jonat...@mugginsoft.com
On 14 Jun 2010, at 10:54, Florian Soenens wrote: > Hi Jens, > > thanks for the answer. > If you drag an NSTextfield on your custom view in Interface Builder, doesn't > it become a subview automatically? > Yes it does. In Xcode shift + right mouse click on a view to see the view hierarchy. R

Re: Image Value Transformer setting image alpha less than 1.0

2010-06-14 Thread Ken Ferry
On Mon, Jun 14, 2010 at 2:16 AM, Gustavo Pizano wrote: > Hello Graham. > > So this is what I did, and its drawing ok. > > I subclasses the NSConllectionViewItem, in the copyWithzone method I > weakly assigned self to its view (custom NSView also), then in the view > subclass in the draw method

Re: Image Value Transformer setting image alpha less than 1.0

2010-06-14 Thread Gustavo Pizano
Ken hi. I have it checked on IB, so it shall return YES. G. On Jun 14, 2010, at 12:12 PM, Ken Ferry wrote: > > > On Mon, Jun 14, 2010 at 2:16 AM, Gustavo Pizano > wrote: > Hello Graham. > > So this is what I did, and its drawing ok. > > I subclasses the NSConllectionViewItem, in the copyW

Re: NSControl objects on a custom view

2010-06-14 Thread Florian Soenens
Then my NSTextField is a subview of my custom view but still displays with a background, that's the behavior i don't want. Can this be fixed somehow? On 14 Jun 2010, at 12:03, jonat...@mugginsoft.com wrote: > > On 14 Jun 2010, at 10:54, Florian Soenens wrote: > >> Hi Jens, >> >> thanks for th

Re: NSControl objects on a custom view

2010-06-14 Thread jonat...@mugginsoft.com
On 14 Jun 2010, at 12:28, Florian Soenens wrote: > Then my NSTextField is a subview of my custom view but still displays with a > background, that's the behavior i don't want. > Can this be fixed somehow? > > On 14 Jun 2010, at 12:03, jonat...@mugginsoft.com wrote: > Do you want the gradient t

"draggedImage" and "draggedImageLocation:"

2010-06-14 Thread Chaitanya Pandit
Hey guys, I'm observing a very weird behavior with NSDraggingInfo, I have a NSTextView subclass where i have implemented dragging. When i drag an image from safari and drop it in the textView and try to access the draggedImage from the supplied sender, it returns nil. Also, the point that "dragge

Re: NSControl objects on a custom view

2010-06-14 Thread Florian Soenens
That's what i thought at first, but i seem to fill the whole [self bounds] with the gradient. On a sidenote, if i put a custom NSSearchfield onto my custom gradient view, the behavior is more obvious then with a default NSSearchfield, am i overlooking something in the NSSearchFieldCell behavior

Re: NSControl objects on a custom view

2010-06-14 Thread jonat...@mugginsoft.com
On 14 Jun 2010, at 13:02, Florian Soenens wrote: > That's what i thought at first, but i seem to fill the whole [self bounds] > with the gradient. > On a sidenote, if i put a custom NSSearchfield onto my custom gradient view, > the behavior is more obvious then with a default NSSearchfield, am

NSButton with image

2010-06-14 Thread Adam Gerson
If all I want is an image that acts like a button, do I need to subclass NSButton? I just want my button to show only my image and no "Apple" style button backgrounds. Thanks, Adam ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Re: "draggedImage" and "draggedImageLocation:"

2010-06-14 Thread Graham Cox
On 14/06/2010, at 9:50 PM, Chaitanya Pandit wrote: > I'm observing a very weird behavior with NSDraggingInfo, I have a NSTextView > subclass where i have implemented dragging. > When i drag an image from safari and drop it in the textView and try to > access the draggedImage from the supplied s

Re: NSButton with image

2010-06-14 Thread Keary Suska
On Jun 14, 2010, at 6:46 AM, Adam Gerson wrote: > If all I want is an image that acts like a button, do I need to > subclass NSButton? I just want my button to show only my image and no > "Apple" style button backgrounds. No need to subclass. Playing around with button attribute setting in IB wil

Re: NSButton with image

2010-06-14 Thread Graham Cox
On 14/06/2010, at 10:46 PM, Adam Gerson wrote: > If all I want is an image that acts like a button, do I need to > subclass NSButton? I just want my button to show only my image and no > "Apple" style button backgrounds. You don't need to subclass, and it can be set in IB. Set the image (by nam

Re: NSButton with image

2010-06-14 Thread John Johnson
> If all I want is an image that acts like a button, do I need to > subclass NSButton? I just want my button to show only my image and no > "Apple" style button backgrounds. All this is easily found in the NSButton and NSButtonCell documentation. I believe what you are looking for is setImagePosi

NSAttributedString with columns

2010-06-14 Thread Alexander Cohen
Hello, I would like to use an NSAttributed string in order to render a type of key/value 2 column display in a NSTextField. As of now, i'm using tabs between key's and value's on each line but some values need to wrap to the next line and i would like them to wrap to the start of value column a

Re: NSAttributedString with columns

2010-06-14 Thread Graham Cox
On 14/06/2010, at 11:46 PM, Alexander Cohen wrote: > Is this possible using attributes and an NSAttaributedString I believe it is - experiment with the various settings of NSMutableParagraphStyle, such as -headIndent and -firstLineHeadIndent. You need to make each line a separate paragraph.

Re: NSAttributedString with columns

2010-06-14 Thread Gideon King
Suggest you look at the "Using Text Tables" section of the "Text Layout Programming Guide for Cocoa". It shows how to use the NSTextTable, NSTextTableBlock etc. Looks promising for what you describe. Disclaimer: I haven't used it myself. HTH Gideon On 14/06/2010, at 11:46 PM, Alexander Cohen

Re: NSAttributedString with columns

2010-06-14 Thread Paul Sanders
> I would like to use an NSAttributed string in order to render a type of > key/value 2 column display > in a NSTextField. As of now, i'm using tabs between key's and value's on each > line but some values > need to wrap to the next line and i would like them to wrap to the start of > value colu

Re: NSAttributedString with columns

2010-06-14 Thread Kyle Sluder
On Jun 14, 2010, at 6:46 AM, Alexander Cohen wrote: > Hello, > > I would like to use an NSAttributed string in order to render a type of > key/value 2 column display in a NSTextField. As of now, i'm using tabs > between key's and value's on each line but some values need to wrap to the > next

Re: NSAttributedString with columns

2010-06-14 Thread Douglas Davidson
On Jun 14, 2010, at 7:29 AM, Kyle Sluder wrote: > On Jun 14, 2010, at 6:46 AM, Alexander Cohen wrote: > >> Hello, >> >> I would like to use an NSAttributed string in order to render a type of >> key/value 2 column display in a NSTextField. As of now, i'm using tabs >> between key's and value

Re: Notification when network volume disappears

2010-06-14 Thread Ken Thomases
On Jun 14, 2010, at 4:52 AM, Boris Prohaska wrote: > i was just wondering, is there any way to determine when for example a > network cable is plugged off while copying data to a network share? The > Finder has a pretty long timeout... > > Is there a way in the FS API or ANY other way to get no

Re: Custom NSCell mouse events

2010-06-14 Thread Corbin Dunn
On Jun 10, 2010, at 9:43 AM, Michael Hanna wrote: > OK I'm really stumped on this one. I want to make a checkbox with a > NSTextFieldCell combined together. It's important that the checkbox > goes ON if the mouse hits the box, NOT the text. I've accomplished > this, more or less, but the issue is

Re: Notification when network volume disappears

2010-06-14 Thread Boris Prohaska
Thats exactly the problem. IF the OS was aware of it, then there would be no problem. There is also no setting for timeouts etc when performing blocking operations onto the filesystem. Maybe that is a OS X limitation?? Boris On 14.06.2010, at 17:04, Ken Thomases wrote: > On Jun 14, 2010, at 4:

Re: Notification when network volume disappears

2010-06-14 Thread Ken Thomases
On Jun 14, 2010, at 11:40 AM, Boris Prohaska wrote: > Thats exactly the problem. IF the OS was aware of it, then there would be no > problem. There is also no setting for timeouts etc when performing blocking > operations onto the filesystem. > Maybe that is a OS X limitation?? The way around i

Re: Notification when network volume disappears

2010-06-14 Thread Jens Alfke
On Jun 14, 2010, at 11:13 AM, Ken Thomases wrote: > The way around it is to not do blocking operations. Use non-blocking, > asynchronous I/O operations, and impose the timeout yourself. Last I heard (admittedly, a few years ago) there wasn’t any good way to do async/nonblocking filesystem ope

How can I get the domain name for a user logged into a Mac via Active Directory?

2010-06-14 Thread Larry Johnston
In my Cocoa app how can I get the current user's domain when they're logged in via Active Directory? I need to determine two things: 1. If the current user is logged on to an Active Directory domain (only need to handle Active Directory). 2. If 1, the domain of the user. I've found referen

Adding attributes to NSMutableAttributedString

2010-06-14 Thread Tom Korsgren
Hi! I'm trying to add some attributes to a NSMutableAttributedString using the code below but only get errors. NSMutableAttributedString *string = @"aaa"; NSRange selectedRange; selectedRange.location = 1; selectedRange.length = 2; NSLog(@"

Image pinching and double tapping issue.

2010-06-14 Thread SanthoshKumarGundu
Hi, I have an issue with the scrollview zooming. In my application I have an image which is added to the scrollview. I want to have zooming effect when user double taps and also pinching . The issue I am facing is when double taps , the image is zooming (zoomed to maximum zoomscale) ,

Opening a file for writing text in /private/var/log

2010-06-14 Thread Pierre Fournier
Hi,I want to log something in a file at /private/var/log, using NSFileHandle.With the app launched as root, everything runs ok using [NSFileHandle fileHandleForWritingToURL:url error:&err]. I get a valid handle and can write what I want to. With the app launched as non-root user, I create an Au

Re: How to debug invalidated core data object

2010-06-14 Thread mm w
Hello, you might place some breakpoints, you did only post the consequences, debugging is matter of understanding. On Sun, Jun 13, 2010 at 8:49 AM, Gideon King wrote: > I have a situation where I create a temporary managed object context and do a > bunch of things with various managed objects

CocoaEcho

2010-06-14 Thread B. Mitchell Loebel
Hello list ... three questions: 1. CocoaEcho has two main() functions. How come X-Code doesn't complain? 2. How can I create a daemon to run in the background which will persist across machine boots? 3. How can I kill the daemon if I choose to do that? -- B. Mitchell L

How to Create Auto-resize TableView or NSTextField?

2010-06-14 Thread John Gordon
All, I am tasked with creating a receipt for printing purposes, imagine a grocery receipt: Item 1$5 Item 2$5.95 Given that the list of items on a receipt can be as long as needed, I need a way to add the items to the NSView and have the items properly size themselves

CalendarStore updating without iCal?

2010-06-14 Thread Zajkowski, James
Hi there, I'm trying to write a tool that uses CalendarStore to read events that are stored in Exchange calendars. In general this works, however it requires iCal be open and running if I want to get new events posted from Exchange. If iCal is not open, I get the version of the calendar as of

Re: Notification when network volume disappears

2010-06-14 Thread mm w
I don't know which kind of connection you want to observe, but basically SCNetwork and SCNetworkReachability are your friends. then control these (and get the right conf) using two callback handlers use NSWorkspace to get your entry and your exit (if this case happens) NSWorkspaceDidMountNotif

Re: Notification when network volume disappears

2010-06-14 Thread mm w
no you are in the weed there On Mon, Jun 14, 2010 at 9:40 AM, Boris Prohaska wrote: > Thats exactly the problem. IF the OS was aware of it, then there would be no > problem. There is also no setting for timeouts etc when performing blocking > operations onto the filesystem. > Maybe that is a OS

Re: Notification when network volume disappears

2010-06-14 Thread Ken Thomases
On Jun 14, 2010, at 1:37 PM, Jens Alfke wrote: > On Jun 14, 2010, at 11:13 AM, Ken Thomases wrote: > >> The way around it is to not do blocking operations. Use non-blocking, >> asynchronous I/O operations, and impose the timeout yourself. > > Last I heard (admittedly, a few years ago) there wa

Re: Adding attributes to NSMutableAttributedString

2010-06-14 Thread Stephen J. Butler
On Thu, Jun 10, 2010 at 5:18 PM, Tom Korsgren wrote: > Hi! > I'm trying to add some attributes to a NSMutableAttributedString using the > code below but only get errors. > >        NSMutableAttributedString *string = @"aaa"; The @"" notation is a constant NSString/CFString. If

Re: Adding attributes to NSMutableAttributedString

2010-06-14 Thread jonat...@mugginsoft.com
On 10 Jun 2010, at 23:18, Tom Korsgren wrote: > Hi! > I'm trying to add some attributes to a NSMutableAttributedString using the > code below but only get errors. > > NSMutableAttributedString *string = @"aaa"; This creates an NSString instance, not an NSMutableAttri

Re: Opening a file for writing text in /private/var/log

2010-06-14 Thread Nick Zitzmann
On Jun 13, 2010, at 9:24 AM, Pierre Fournier wrote: > Hi,I want to log something in a file at /private/var/log, using > NSFileHandle.With the app launched as root, everything runs ok using > [NSFileHandle fileHandleForWritingToURL:url error:&err]. I get a valid handle > and can write what I wa

Re: CocoaEcho

2010-06-14 Thread Dave DeLong
1. They're not being compiled into the same executable. CocoaEcho has two targets: CocoaEchoClient and EchoServer. Each one has only one main() function. 2. That's called a LaunchDaemon. Go research those and then come back with more questions. :) 3. You could kill the daemon if its runn

Re: Adding attributes to NSMutableAttributedString

2010-06-14 Thread Ken Thomases
On Jun 10, 2010, at 5:18 PM, Tom Korsgren wrote: > I'm trying to add some attributes to a NSMutableAttributedString using the > code below but only get errors. > > NSMutableAttributedString *string = @"aaa"; This line is wrong. You are taking a NSString literal object

Re: CocoaEcho

2010-06-14 Thread Nick Zitzmann
On Jun 14, 2010, at 12:22 AM, B. Mitchell Loebel wrote: > Hello list ... three questions: > > 1. CocoaEcho has two main() functions. How come X-Code doesn't complain? 1. It's "Xcode", not "X-Code". 2. Xcode doesn't "complain"; the compilers raise warnings and errors, and Xcode reports them. 3.

Re: How to Create Auto-resize TableView or NSTextField?

2010-06-14 Thread Nick Zitzmann
On Jun 14, 2010, at 7:24 AM, John Gordon wrote: > I've tried using the NSTextfield, but it hasn't been too successful. I've > also tried an NSTableView, but can't figure out how to force it to resize > based on the number of rows in the table. > > What approach would you use NSTableViews auto-

Re: Opening a file for writing text in /private/var/log

2010-06-14 Thread Ken Thomases
On Jun 13, 2010, at 10:24 AM, Pierre Fournier wrote: > Hi,I want to log something in a file at /private/var/log, using NSFileHandle. Do you really want to do that? Have you considered ~/Library/Logs? Or using the Apple System Log facility

Re: CocoaEcho

2010-06-14 Thread Jens Alfke
On Jun 14, 2010, at 12:09 PM, Nick Zitzmann wrote: > Use launchd's launch daemons feature. There’s an Apple tech note on daemons and agents — required reading if you want to get into this. Search for it in the Xcode doc viewer. The difference between the two is that a daemon is per-machine whi

Re: Adding attributes to NSMutableAttributedString

2010-06-14 Thread Flavio Donadio
Tom, On 14/06/2010, at 16:01, cocoa-dev-requ...@lists.apple.com wrote: > I'm trying to add some attributes to a NSMutableAttributedString using the > code below but only get errors. > > NSMutableAttributedString *string = @"aaa"; Try replacing the line above with:

Re: CocoaEcho

2010-06-14 Thread lbland
hi- Never looked at CocoaEcho before, but here it goes ... On Jun 14, 2010, at 2:22 AM, B. Mitchell Loebel wrote: > 1. CocoaEcho has two main() functions. How come X-Code doesn't complain? Because EchoServer (target) is the server process and CocoaEchoClient (target) is the client process? ie:

NSRunLoop

2010-06-14 Thread Ariel Feinerman
Hi, I wish to make programme has cpu-related (one thread per core) number of worker threads. When user inputs the data, main thread splits up the data and send to the workers. Then worker threads go to sleep in anticipation of the next chunk of data. How can I do it? I think to NSRunLoop is the bes

Re: NSRunLoop

2010-06-14 Thread Laurent Cerveau
You may want to look at NSOperation. Regards laurent Sent from my road phone On Jun 15, 2010, at 12:22 AM, Ariel Feinerman wrote: Hi, I wish to make programme has cpu-related (one thread per core) number of worker threads. When user inputs the data, main thread splits up the data an

Re: NSRunLoop

2010-06-14 Thread Jean-Daniel Dupas
Le 15 juin 2010 à 00:22, Ariel Feinerman a écrit : > Hi, > I wish to make programme has cpu-related (one thread per core) number of > worker threads. When user inputs the data, main thread splits up the data > and send to the workers. Then worker threads go to sleep in anticipation of > the next

Applications using RegexKitLite no longer being accepted at the AppStore

2010-06-14 Thread John Engelhart
Bad News, Everyone! -- Professor Farnsworth I've received nearly half a dozen reports that iOS4 applications using RegexKitLite are now being rejected when they are submitted for AppStore approval due to violating section 3.3.1. I don't wish to speculate publicly as to why at this point due to th

Re: Adding attributes to NSMutableAttributedString

2010-06-14 Thread Graham Cox
On 11/06/2010, at 8:18 AM, Tom Korsgren wrote: > NSMutableAttributedString *string = @"aaa"; What you might have missed is that NS(Mutable)AttributedString is not a subclass of NSString. --Graham ___ Cocoa-dev mailing list (Co

Re: How to Create Auto-resize TableView or NSTextField?

2010-06-14 Thread Gary L. Wade
Try "connecting the dots" (figuratively and literally) between NSTextView and NSDecimalTabStopType. On 06/14/2010 6:24 AM, "John Gordon" wrote: > All, > > I am tasked with creating a receipt for printing purposes, imagine a grocery > receipt: > > Item 1$5 > Item 2$5.95

Re: NSRunLoop

2010-06-14 Thread vincent habchi
Le 15 juin 2010 à 00:41, Jean-Daniel Dupas a écrit : > > Le 15 juin 2010 à 00:22, Ariel Feinerman a écrit : > >> Hi, >> I wish to make programme has cpu-related (one thread per core) number of >> worker threads. When user inputs the data, main thread splits up the data >> and send to the workers

Re: Notification when network volume disappears

2010-06-14 Thread vincent habchi
Le 14 juin 2010 à 20:37, Jens Alfke a écrit : > Last I heard (admittedly, a few years ago) there wasn’t any good way to do > async/nonblocking filesystem operations. The standard system calls block; the > O_NONBLOCK mode for fcntl only works on network socket streams; and the AIO > API has (had