XCode Debugger - a couple of questions from newbie

2009-01-28 Thread Alexander Bokovikov
Hi, All, Please, anybody, help me to understand how this thing works: I'm trying to set a breakpoint at the main() call in the main.m. I'd like to see the arguments. Or maybe there is NS to get them? One way or another, my bp doesn't work for some reason. Please take a look at the

Re: Binding Buttons and Popup Menus to NSDictionary made from a prefs plist?

2009-01-28 Thread Ken Thomases
On Jan 26, 2009, at 9:09 AM, Robert Monaghan wrote: I am trying to wrap my head around using a plist. When you refer to a plist, are you referring to a property list data structure as it might exist in memory, or a property list file? Or perhaps you're referring to user defaults? In

Re: Is there a more efficient way to get the first 4 bytes off a NSInputStream to compare

2009-01-28 Thread Ken Thomases
On Jan 27, 2009, at 8:23 AM, Adam Venturella wrote: Will thanks for the heads up, for my purposes this time around, the input stream will be coming in off the file system, but I did not want to load the whole thing into an NSData object. Have you considered NSFileHandle and its

Re: Is there a more efficient way to get the first 4 bytes off a NSInputStream to compare

2009-01-28 Thread Jeremy Pereira
On 27 Jan 2009, at 23:07, Graham Cox wrote: On 28 Jan 2009, at 2:24 am, Jeremy Pereira wrote: Yes. That is correct, but since buffer is already a pointer to the first byte of the array and then you are taking a reference to it, key will end up containing the address of the buffer. You

Canvas View really large?

2009-01-28 Thread Rick Langschultz
Hello everyone, I am developing some drawing software and needed some assistance. I have a basic view: TSLabel which is just a small plain view that doesn't really do anything - just a rectangle. This rectangle can be dragged and moved around it's superview - TSCanvasView which is a

drag the whole window just by dragging the Image placed on it

2009-01-28 Thread Rahulkumar
Few days ago I posted a querry that I can move a Window i.e. a NSWindow object with the just a simple call [myWindow setMovableByWindowBackground:TRUE]. This makes window movable from every point I drag my mouse pointer. Now if I place an NSImage Object over the window and try to drag the

action on double click of image

2009-01-28 Thread Rahulkumar
Hi, I am trying to perform some action on double click of image. Can anybody suggest me some solution. something which gets called after double clicking on the image. any help will be appreciated. Thanks in advance. Regards, PersistentSystemsPrivateLimited P Rahulkumar

Multiple NSTabViewItems that can't fit in a Single NSTabView

2009-01-28 Thread Rahulkumar
I want to display Multiple NSTabViewItems that can't fit in a Single NSTabView. In windows, if tabview items doesn't fit in a tab then they are displayed by dividing them in 2 lines. Is there anything like this on Mac platform so that I can display around 10 TabViewItems in a single NSTabView?

Re: action on double click of image

2009-01-28 Thread Mike Abdullah
As a very cursory search with Google would have found you: http://www.google.com/search?client=safarirls=en-gbq=nsimageview+double+clickie=UTF-8oe=UTF-8 http://lists.apple.com/archives/Cocoa-dev/2007/Mar/msg00542.html Mike. On 28 Jan 2009, at 09:47, Rahulkumar wrote: Hi, I am trying to

Re: drag the whole window just by dragging the Image placed on it

2009-01-28 Thread Mike Abdullah
Look at -[NSView mouseDownCanMoveWindow] On 28 Jan 2009, at 09:07, Rahulkumar wrote: Few days ago I posted a querry that I can move a Window i.e. a NSWindow object with the just a simple call [myWindow setMovableByWindowBackground:TRUE]. This makes window movable from every point I

Re: Canvas View really large?

2009-01-28 Thread jonat...@mugginsoft.com
On 28 Jan 2009, at 08:09, Rick Langschultz wrote: Hello everyone, I am developing some drawing software and needed some assistance. I have a basic view: TSLabel which is just a small plain view that doesn't really do anything - just a rectangle. This rectangle can be dragged and moved

Re: Update your app

2009-01-28 Thread Filip van der Meeren
The same as Adium! Nice, thank you... Filip van der Meeren fi...@code2develop.com http://sourceforge.net/projects/xlinterpreter On 28 Jan 2009, at 15:00, Scott Anguish wrote: You want Sparkle. http://sparkle.andymatuschak.org/ On 28-Jan-09, at 8:43 AM, Filip van der Meeren wrote: Good

Spaces: Receiving a space change notification.

2009-01-28 Thread Half Activist
Hello everyone, Is it possible to receive a notification when the active space changes? Or is it possible to programatically make an application display on all spaces? h.a. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Modal Sheet without Spaghetti?

2009-01-28 Thread Matt Neuburg
On Tue, 27 Jan 2009 17:10:20 -0800, Jerry Krinock je...@ieee.org said: Butt if the possible problem involves a document, I believe it would be a better user experience to use a sheet instead of a dialog. But, arghhh, the method -[NSApp

Re: Multiple NSTabViewItems that can't fit in a Single NSTabView

2009-01-28 Thread Raleigh Ledet
Rahul, This is a classic sign that you really really need to rethink your UI. No, really, tabs are the wrong solution to your problem. I don't know your exact problem, so I can't tell you what is the best solution in your case., but a multi-line tab control is definitely not it. Off the

-finstrument-functions and program startup

2009-01-28 Thread Karan, Cem (Civ, ARL/CISD)
First off, I know this question is going to the wrong list, but I have NO idea which list would be best. If anyone wants to jump in and tell me a better list, I'll gladly move there. Background: I have an application that is working very, very hard to drive me insane. It is multithreaded,

Drag and drop from NSCollectionView

2009-01-28 Thread Eric Gorr
I am going to need to the same thing (dragging one or more items from a NSCollectionView to some place else) and I found this old thread: http://lists.apple.com/archives/cocoa-dev/2008/Oct/msg00104.html Unfortunately, no clear solution was mentioned and I was wondering if someone might be

Multiple Nib Question

2009-01-28 Thread Joseph Crawford
Hello Everyone, I had my project all working smooth using 1 nib file which contained my MainMenu and my window. I have since separated them because a lot of people suggested it. However this separation has led me to hit an issue. In my ManManu nib I have my App Delegate which then

setIntercellSpacing

2009-01-28 Thread Mr. Gecko
Hello, I'm having a problem where [self setIntercellSpacing:NSMakeSize(0.0, 0.0)]; will make all my rows disappear from the table... I need this so I can have a custom background for the selected rows. How might I fix this? Mr. Gecko ___

[SOLVED] Re: CoreData silently failing to insert?

2009-01-28 Thread Nick Zitzmann
Thanks to everyone that responded. One off-list message I received made me think about the problem a little more, and after some debugging, I realized I had a PEBKAC problem on my hands. My app does some fetch requests to check on existing data in the database, compares it to what's in a

(no subject)

2009-01-28 Thread David Blanton
Using this code: NSIndexSet *is = [NSIndexSet indexSetWithIndex:rowIndex]; [_tableView selectRowIndexes:is byExtendingSelection:YES]; to select rows, the rows are selected and highlighted, but the first column is not

NStableView roe selection

2009-01-28 Thread David Blanton
oops no subject previously, sorry. Using this code: NSIndexSet *is = [NSIndexSet indexSetWithIndex:rowIndex]; [_tableView selectRowIndexes:is byExtendingSelection:YES]; to select rows, the rows are selected and highlighted, but

Re: Check URL Status

2009-01-28 Thread Mr. Gecko
yeah that wouldn't work for what I need, if I could just do NSHTTPURLResponse *response = [NSURLConnection responseForRequest:request]; that would work, but it's not in cocoa... On Jan 19, 2009, at 5:39 AM, Mike Abdullah wrote: Create a NSURLConnection for the HD URL. It will receive an

Re: -finstrument-functions and program startup

2009-01-28 Thread Greg Parker
On Jan 28, 2009, at 10:33 AM, Karan, Cem (Civ, ARL/CISD) wrote: First off, I know this question is going to the wrong list, but I have NO idea which list would be best. If anyone wants to jump in and tell me a better list, I'll gladly move there. Background: I have an application that is

Re: XCode Debugger - a couple of questions from newbie

2009-01-28 Thread Scott Ribe
Try turning off lazy loading of symbols, in Xcode's preferences. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: setIntercellSpacing

2009-01-28 Thread Mr. Gecko
It only seemed to mess up when I resized the window. Now it seems to not be doing it, I don't know what I changed... On Jan 28, 2009, at 3:30 PM, Corbin Dunn wrote: hi mr gecko, you probably have something else wrong; the intercell spacing just affects the spacing between cells in the

Re: setIntercellSpacing

2009-01-28 Thread Corbin Dunn
Le Jan 28, 2009 à 1:51 PM, Mr. Gecko a écrit : It only seemed to mess up when I resized the window. Now it seems to not be doing it, I don't know what I changed... Oh, well, you forgot to mention that earlier. It may be due to live- resize caching. Try subclassing the tableview, override

Re: NStableView roe selection

2009-01-28 Thread Corbin Dunn
Le Jan 28, 2009 à 12:43 PM, David Blanton a écrit : oops no subject previously, sorry. Using this code: NSIndexSet *is = [NSIndexSet indexSetWithIndex:rowIndex]; [_tableView selectRowIndexes:is byExtendingSelection:YES]; to

Re: Check URL Status

2009-01-28 Thread Andrew Farmer
On 28 Jan 09, at 13:15, Mr. Gecko wrote: yeah that wouldn't work for what I need, if I could just do NSHTTPURLResponse *response = [NSURLConnection responseForRequest:request]; that would work, but it's not in cocoa... Actually, it is. It's just named slightly differently...

Re: Modal Sheet without Spaghetti?

2009-01-28 Thread Jan Brittenson
Jerry Krinock wrote: Does anyone have an idiom or way of appreciating this problem which does not produce such spaghetti and headaches? How about a state machine: enum State { STATE_INIT, STATE_PREPARE, STATE_EXECUTE, STATE_FINISHED, STATE_DEAD }; State state; HandleEvent(event) {

Re: Modal Sheet without Spaghetti?

2009-01-28 Thread Alex Kac
That's how we do it. Of course, we try to handle all this in the controllers, not in the model, so it propagates up to the controller from the model via a delegate or something and then we use the state machine there. On Jan 28, 2009, at 4:19 PM, Jan Brittenson wrote: Jerry Krinock

how to override all keyboard events?

2009-01-28 Thread Carlo Gulliani
Good time, everybody. I use WebView in my app, which is loading html with flash. I'm trying to catch keyboard events, so i added the next function to my NSWindow's class - (void)keyDown: (NSEvent *) event { NSLog(@KEYDOWN: %@, event); } It works while i didn't press on any buttons in my flash,

NSTableView Grows with # of rows

2009-01-28 Thread Jason Cox
Hey guys, Im using a tableview linked up to an array controller. I want the height of the tableview to grow with the # of objects in the array controller. Like addressbook, add an e-mail and it just appears below it. Any ideas or code samples on how to do this would be great... Perhaps

NObjective .NET -- Objective-C bridge

2009-01-28 Thread Евгений Гришуль
Hello, I'm happy to present a new release of NObjective bridge. NObjective bridge to Objective-C provides the necessary classes to develop and run .NET applications which interact with Objective-C frameworks and libraries under Mac OS X with high performance, reliability and provides

Re: NSTextView.preferredPasteboardTypeFromArray

2009-01-28 Thread Douglas Davidson
On Jan 26, 2009, at 8:36 PM, Chris Idou wrote: This method's list of allowedTypes when I do the drag doesn't include my TokenPboardType. Now if I return TokenPboardType anyway, it seems to work. my readSelectionFromPasteboard gets called with TokenPboardType and it all seems to work. But

Re: [Q] efficient or good model for send/receive with streams scheduled in runloop?

2009-01-28 Thread Shawn Erickson
On Tue, Jan 27, 2009 at 8:33 AM, JongAm Park joshua_park2006-applel...@yahoo.com wrote: However, I have difficulty in making it to send data and receive ack from a server. Sometimes, it receives some meaningful data about changed information from a server, if a client send a request to change

Re: NSTableView Grows with # of rows

2009-01-28 Thread I. Savant
On Jan 28, 2009, at 1:50 PM, Jason Cox wrote: Im using a tableview linked up to an array controller. I want the height of the tableview to grow with the # of objects in the array controller. Like addressbook, add an e-mail and it just appears below it. Maybe I'm not understanding

NSMouseEntered during drag op, losing window reference

2009-01-28 Thread Luke Evans
I've been following some Apple sample code with respect to mouse dragging logic (within a table - but that's probably not important). The particular approach involves maintaining full control of the drag state by starting a loop that processes all pertinent events until the mouse button is

Re: NSTableView Grows with # of rows

2009-01-28 Thread I. Savant
On Jan 28, 2009, at 7:15 PM, Sean McBride wrote: Smiley aside, I think it's more than just 'typical'. Unless I'm missing some magic incantation, IB does not let you remove a tableview from its scrollview. No doubt it's possible programatically... Select the table (the scroll view

Detecting Initialization

2009-01-28 Thread David H. Silber
Is there some means of detecting if an instance has been initialized? I'm thinking not. Apple's NSObject Class Reference says The init method defined in the NSObject class does no initialization, and googling around on the topic has not produced any means of doing so. I ask here in case someone

Re: NSTableView Grows with # of rows

2009-01-28 Thread Sean McBride
On 1/28/09 7:26 PM, I. Savant said: Smiley aside, I think it's more than just 'typical'. Unless I'm missing some magic incantation, IB does not let you remove a tableview from its scrollview. No doubt it's possible programatically... Select the table (the scroll view becomes selected),

Re: Check URL Status

2009-01-28 Thread Mr. Gecko
but wouldn't that return the data of the file it self as well? Because I don't want the data because it's like 130MB and it'll take a long time to get the data just for a check... On Jan 28, 2009, at 4:12 PM, Andrew Farmer wrote: On 28 Jan 09, at 13:15, Mr. Gecko wrote: yeah that wouldn't

Re: Check URL Status

2009-01-28 Thread Andrew Farmer
On 28 Jan 09, at 16:30, Mr. Gecko wrote: but wouldn't that return the data of the file it self as well? Because I don't want the data because it's like 130MB and it'll take a long time to get the data just for a check... It'll return whatever response is appropriate for your request.

Re: Detecting Initialization

2009-01-28 Thread Graham Cox
On 29 Jan 2009, at 11:06 am, David H. Silber wrote: Is there some means of detecting if an instance has been initialized? I'm thinking not. Apple's NSObject Class Reference says The init method defined in the NSObject class does no initialization, and googling around on the topic has not

Custom Class Bindings

2009-01-28 Thread Richard Somers
How are custom class bindings exposed to Interface Builder? Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: Custom Class Bindings

2009-01-28 Thread Richard Somers
Just found my answer in Interface Builder User Guide. Objects with bindable properties can expose those properties in Interface Builder through their Interface Builder plug-in object. You configure bindings in Interface Builder by starting at the object that exposes a bindable property.

Re: Check URL Status

2009-01-28 Thread Mike Abdullah
On 29 Jan 2009, at 00:30, Mr. Gecko wrote: but wouldn't that return the data of the file it self as well? Because I don't want the data because it's like 130MB and it'll take a long time to get the data just for a check... Which is precisely why the URL loading system is asynchronous by

Sub-pixel font smoothing with CGBitmapContext

2009-01-28 Thread Slava Pestov
Hi all, When I render text into a CGBitmapContext that has been filled with a solid color, sub-pixel font smoothing is not applied and text looks suboptimal compared to text rendered elsewhere. How can I enable font smoothing? Calling CGContextSetShouldSmoothFonts doesn't seem to help. Slava

Plain Text UTI Madness

2009-01-28 Thread Seth Willits
I'm trying to get this NSOpenPanel to select all plain text files. This should be *simple* right? Sheesh. So I thought I'd use a UTI (in addition to some specific extensions and the HFS type 'TEXT'), so I added kUTTypePlainText. That really should be just dandy for my needs. Except it's

Re: Detecting Initialization

2009-01-28 Thread David H. Silber
On Thu, Jan 29, 2009 at 11:39:21AM +1100, Graham Cox wrote: On 29 Jan 2009, at 11:06 am, David H. Silber wrote: Is there some means of detecting if an instance has been initialized? I'm thinking not. Apple's NSObject Class Reference says The init method defined in the NSObject class

Re: Plain Text UTI Madness

2009-01-28 Thread Sean McBride
Seth Willits (sli...@araelium.com) on 2009-01-28 8:56 PM said: I'm trying to get this NSOpenPanel to select all plain text files. This should be *simple* right? Sheesh. So I thought I'd use a UTI (in addition to some specific extensions and the HFS type 'TEXT'), so I added kUTTypePlainText. That

Re: setIntercellSpacing

2009-01-28 Thread Mr. Gecko
found out, I forgot to run -reloadData On Jan 28, 2009, at 4:02 PM, Corbin Dunn wrote: Le Jan 28, 2009 à 1:51 PM, Mr. Gecko a écrit : It only seemed to mess up when I resized the window. Now it seems to not be doing it, I don't know what I changed... Oh, well, you forgot to mention that

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-28 Thread Adam Gerson
According to the documentation its not exactly recommended to use them in 10.5 either, even though it appears to draw just fine in 10.5. If my client wants to keep overlapping sibling views to save the time of refactoring is this a terrible idea if he only plans to support 10.5+? For performance

Re: NSTableView Grows with # of rows

2009-01-28 Thread I. Savant
On Jan 28, 2009, at 7:24 PM, Sean McBride wrote: So it does. Neat. Odd that the click-and-hold that works for moving other views around in the hierarchy does not work with the tableview. Very odd. First thing I noticed when I double-checked my assertions when I saw your message. :-)

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-28 Thread Jim Correia
On Jan 28, 2009, at 9:44 PM, Adam Gerson wrote: According to the documentation its not exactly recommended to use them in 10.5 either, even though it appears to draw just fine in 10.5. If my client wants to keep overlapping sibling views to save the time of refactoring is this a terrible idea

Re: NSTableView Grows with # of rows

2009-01-28 Thread Jonathan Hess
On Jan 28, 2009, at 4:24 PM, Sean McBride wrote: On 1/28/09 7:26 PM, I. Savant said: Smiley aside, I think it's more than just 'typical'. Unless I'm missing some magic incantation, IB does not let you remove a tableview from its scrollview. No doubt it's possible programatically...

Re: Detecting Initialization

2009-01-28 Thread Stuart Malin
On Jan 28, 2009, at 4:46 PM, cocoa-dev-requ...@lists.apple.com wrote: On Thu, Jan 29, 2009 at 11:39:21AM +1100, Graham Cox wrote: On 29 Jan 2009, at 11:06 am, David H. Silber wrote: Is there some means of detecting if an instance has been initialized? I'm thinking not. Apple's

Setting cocoa application in system menu bar.

2009-01-28 Thread Vijay Kanse
Hello, I need my application to set in system menu bar. I am able to set in menu bar. and i am getting all the events associated with application click menu. I stetted two click events on menu bar. openWindow and quit. on click of openWindow I am loading nib file. this nib contains multiple

URL Parsing

2009-01-28 Thread Seth Willits
I can put together my own solution, but I'm *sure* there has to be some real way of doing this built-in *somewhere*, so I have to ask... My app has a URL handler, and I want the user to be able to click a link to save some time to things. The URL would have the form:

Re: Multiple Nib Question

2009-01-28 Thread Michael Ash
On Wed, Jan 28, 2009 at 2:04 PM, Joseph Crawford codeb...@gmail.com wrote: Hello Everyone, I had my project all working smooth using 1 nib file which contained my MainMenu and my window. I have since separated them because a lot of people suggested it. However this separation has led me to

Apple Events and Modal Sessions

2009-01-28 Thread Seth Willits
I'm fiddling with a URL handler in my app and I noticed that if a modal session was running, the handler - registered with my NSApp's delegate - was not being called, even after the dialog closed. I looked around the docs for a bit to find a reason/workaround and discovered by chance

Re: Apple Events and Modal Sessions

2009-01-28 Thread Seth Willits
On Jan 28, 2009, at 9:50 PM, Seth Willits wrote: Does anyone know what's really going on here? Should AppleEvents always be firing during a modal session? Call me a fool on this one. I didn't realize my AppleEvent handler was being set up after the call to runModal, thus it never would

want to get position of Statusmenu item in menubar

2009-01-28 Thread Gami Ravi
Hi All, I created one NSStatusMenuItem and i am displaying it to Menubar.I want to get position of that item in screen coordinates. How can i get that position of that item? Pleasle suggest. Any pointer should be appreciated. Thanks Regards, R. --

Re: How to draw text with fade out effect?

2009-01-28 Thread Kyle Sluder
On Wed, Jan 28, 2009 at 10:57 AM, Thomas Davie tom.da...@gmail.com wrote: This solution will also throw sub-pixel anti-aliasing in the bin. Perhaps the better solution is to draw the text as normal and then re-draw the background with the appropriate alpha on top. --Kyle Sluder

Re: How to draw text with fade out effect?

2009-01-28 Thread Quincey Morris
On Jan 28, 2009, at 22:32, Kyle Sluder wrote: On Wed, Jan 28, 2009 at 10:57 AM, Thomas Davie tom.da...@gmail.com wrote: This solution will also throw sub-pixel anti-aliasing in the bin. Perhaps the better solution is to draw the text as normal and then re-draw the background with the

bind right part of NSPredicateEditor's row to array of strings

2009-01-28 Thread Vitaly Ovchinnikov
Hello all, Still have problems with predicate editor. My items have tags and I want to be able to filter items by those tags. My document has array of all tags, so I added a row template with three popup buttons and wanted to bind the third one to that array. I tried the following: NSPopUpButton

one more NSPredicateEditor question

2009-01-28 Thread Vitaly Ovchinnikov
Hello once again, just a quick question: It seems that predicate editor remains what right view was used for each operation. If I add a row with numeric parameter and two operators (less and greater) and then switch between them - predicate editor will remember value I entered for less and when I