Re: cocoa-dev vs. Apple's dev forums?

2010-03-08 Thread Jesse Armand
> Mailing list over forum any day. Don't make me hunt a bunch of forums every > day! x lists, one convenient interface (Mail.app). > > But my biggest beef: a closed forum will not be indexed by Google. So even if > you pay up and the dev forum has a great answer, you will not find it using > Goo

Re: NSDocumentController subclass not instantiated first? [SOLVED]

2010-03-08 Thread Keith Blount
Hi, Many thanks for your replies, much appreciated - they have helped me track and solve the problem, so I’m very grateful. > My app does it this way and it has always worked without any special work > needed. I'm not sure what your problem is, but doing it this way works for > me, suggesting

NSApp question

2010-03-08 Thread Rick C.
hello, i have a question regarding this line: [NSApp activateIgnoringOtherApps:YES]; now i know this will activate the app, but for example if the main window of the app is closed should it cause the window to show? i think it would not, but it seems some people claim that it does. as a note

Re: problems loading a sound with NSSound

2010-03-08 Thread Keith Blount
NSSound doesn't respond to -initWithContentsOfFile: (it responds to -initWithContentsOfFile:byReference:), so you should be seeing errors on the console if that is how you are trying to init your NSSound object. (Also note that in the code you posted there is a memory leak, so it would be better

Re: IsReadableFileAtPath

2010-03-08 Thread gMail.com
Hi, thanks to all of you. After some days trynign and thinking, I have used lstat to check the filePermissions because I need to check thousands files per session. However I realized that Permissions and isReadableFile or isWritableFile or isDeletableFile are two different things, so please may you

Re: reading text rom Pages doc

2010-03-08 Thread Keith Blount
Hi, As others have pointed out, there is no way to read .pages documents as the .pages format is proprietary and unpublished. Some of the specs were published here: http://developer.apple.com/mac/library/documentation/AppleApplications/Conceptual/iWork2-0_XML/Chapter02/02Pages.html But the Pag

Re: IsReadableFileAtPath

2010-03-08 Thread Jeremy Pereira
On 8 Mar 2010, at 11:32, gMail.com wrote: > Hi, thanks to all of you. > After some days trynign and thinking, I have used lstat to check the > filePermissions because I need to check thousands files per session. > However I realized that Permissions and isReadableFile or isWritableFile or > isDel

NSCollectionView and animating spinner crash

2010-03-08 Thread David Hoerl
I am getting consistent crashes when a newly created NSCollectionViewItem has a view with an animating spinner (the animation property is enabled through bindings that kick in immediately on creation). It happens on 10.5 as well as 10.6. [ rdar://7727603 bug has demo project included]. Log me

what is the difference between open /Applications/TextEdit.app and /Applications/TextEdit.app/Contents/MacOS/TextEdit

2010-03-08 Thread Arun
Hi All, What is the difference between the following two commands 1. open /Applications/TextEdit.app 2. /Applications/TextEdit.app/Contents/MacOS/TextEdit Both launches TextEdit.app if i type both the commands in Terminal. Also in Leopard if i use "open" then i can't pass any program arguments

Re: what is the difference between open /Applications/TextEdit.app and /Applications/TextEdit.app/Contents/MacOS/TextEdit

2010-03-08 Thread Charles Srstka
On Mar 8, 2010, at 9:17 AM, Arun wrote: > Hi All, > > What is the difference between the following two commands > > 1. open /Applications/TextEdit.app > 2. /Applications/TextEdit.app/Contents/MacOS/TextEdit > > Both launches TextEdit.app if i type both the commands in Terminal. Also in > Leopa

Re: reading text rom Pages doc

2010-03-08 Thread Charles Srstka
On Mar 8, 2010, at 5:43 AM, Keith Blount wrote: > Hi, > > As others have pointed out, there is no way to read .pages documents as the > .pages format is proprietary and unpublished. Some of the specs were > published here: > > http://developer.apple.com/mac/library/documentation/AppleApplicati

Re: Custom View in Toolbar

2010-03-08 Thread David Blanton
You never need to call anything to result in display. Apparently you do as the custom view containing two buttons placed in the tool bar is not displayed. The docs for -validate indicate that -setEnabled should be called if the custom view is a control and that NStoolbarItem has no idea on h

Weird Bug Report on 10.5

2010-03-08 Thread Brent Smith
I am getting an EXC_BAD_ACCESS on 10.5 only, it works fine in 10.6 I cant seem to deduce the problem b/c its crashing on events that AppKit is calling, and nothing that I am calling. Any help would be greatly appreciated. Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_A

Re: Weird Bug Report on 10.5

2010-03-08 Thread Steve Bird
On Mar 8, 2010, at 11:57 AM, Brent Smith wrote: > I am getting an EXC_BAD_ACCESS on 10.5 only, it works fine in 10.6 > > I cant seem to deduce the problem b/c its crashing on events that AppKit is > calling, and nothing that I am calling. Notice that it's thread ONE that crashed, not thread ZE

Re: reading text rom Pages doc

2010-03-08 Thread Keith Blount
Hi, I filed an enhancement request on this back in November 2007, #ID 5597713, asking for NSAttributedString additions that would read and write .pages files. (One of the most common questions I get from new users is why my app can import Microsoft formats but not Apple's own.) Regarding my ea

Re: Weird Bug Report on 10.5

2010-03-08 Thread Eric Gorr
You almost certainly have a data source assigned to your table that is being called as the table is trying to draw itself. Perhaps something has gone wrong in there...? On Mar 8, 2010, at 11:57 AM, Brent Smith wrote: > I am getting an EXC_BAD_ACCESS on 10.5 only, it works fine in 10.6 > > I c

Re: Weird Bug Report on 10.5

2010-03-08 Thread Brent Smith
The datasource is being hooked up with bindings and core data. maybe there is something that just doesnt work on 10.5 with bindings and CD? On Mar 8, 2010, at 9:03 AM, Eric Gorr wrote: > You almost certainly have a data source assigned to your table that is being > called as the table is tryin

Re: Weird Bug Report on 10.5

2010-03-08 Thread Eric Gorr
ooo...good point. I missed that too. Problems involving objc_msgSend can usually be caught by reproducing the crash with zombies enabled. On Mar 8, 2010, at 12:02 PM, Steve Bird wrote: > > On Mar 8, 2010, at 11:57 AM, Brent Smith wrote: > >> I am getting an EXC_BAD_ACCESS on 10.5 only, it w

Re: Weird Bug Report on 10.5

2010-03-08 Thread Dave DeLong
Like Steve Bird said, it's not your GUI thread that crashed, it's the thread you've created via NSThread. Perhaps it's trying to invoke a selector on a deallocated object or something? Dave On Mar 8, 2010, at 10:05 AM, Brent Smith wrote: > The datasource is being hooked up with bindings and c

Modeling a seat reservation: iPhone

2010-03-08 Thread Gustavo Pizano
Hello all, I was reading some older post about something similar. What I want to achieve is that I have a room with seats and I want to check the seats to reserve. Now I did something alike in Cocoa retrieving the view under the hitTest, then I got the id of the view (custom identification) a

Re: Weird Bug Report on 10.5

2010-03-08 Thread Brent Smith
The thing is, im on 10.6, not 10.5. Is my only option to get a dev machine with 10.5 on it? On Mar 8, 2010, at 9:06 AM, Eric Gorr wrote: > ooo...good point. I missed that too. > > Problems involving objc_msgSend can usually be caught by reproducing the > crash with zombies enabled. > > > >

Re: Custom View in Toolbar

2010-03-08 Thread Kyle Sluder
On Mon, Mar 8, 2010 at 8:56 AM, David Blanton wrote: > Apparently you do as the custom view containing two buttons placed in the > tool bar is not displayed. There is no reason to believe that the solution to your problem is to manually provoke -display. That's not how drawing works in AppKit. Yo

Re: Weird Bug Report on 10.5

2010-03-08 Thread Brent Smith
I am doing one NSThread method which basically phones home. However thats in my appDelegate, in the init method, and it only runs once. I cant really see my appDelegate being unallocated when the app starts? On Mar 8, 2010, at 9:12 AM, Dave DeLong wrote: > Like Steve Bird said, it's not your GU

Re: Weird Bug Report on 10.5

2010-03-08 Thread Eric Gorr
Well, you can partition your HD and install Leopard on the other partition. There is no need to use a different computer. But, yes, your best bet is likely to be able to reproduce the crash yourself. Of course, you could try running your app with Zombies enabled under 10.6. You may be able to s

Re: Weird Bug Report on 10.5

2010-03-08 Thread Kyle Sluder
On Mon, Mar 8, 2010 at 9:17 AM, Brent Smith wrote: > The thing is, im on 10.6, not 10.5. Is my only option to get a dev machine > with 10.5 on it? If you're supporting 10.5, you should have a 10.5 machine (or at least a bootable volume) at the ready for situations just like this. You have a bug

Re: Weird Bug Report on 10.5

2010-03-08 Thread Steve Bird
On Mar 8, 2010, at 12:17 PM, Brent Smith wrote: > The thing is, im on 10.6, not 10.5. Is my only option to get a dev machine > with 10.5 on it? What else is different between your machine and the crashed machine? Perhaps it's fast CPU vs. slow. Perhaps it's x86 vs. PPC. > > > On Mar 8, 2

Re: NSApp question

2010-03-08 Thread Quincey Morris
On Mar 8, 2010, at 03:03, Rick C. wrote: > i have a question regarding this line: > > [NSApp activateIgnoringOtherApps:YES]; > > now i know this will activate the app, but for example if the main window of > the app is closed should it cause the window to show? i think it would not, > but it

Re: Weird Bug Report on 10.5

2010-03-08 Thread Sean McBride
On 3/8/10 12:22 PM, Eric Gorr said: >Well, you can partition your HD and install Leopard on the other >partition. There is no need to use a different computer. Not necessarily. Newer Macs only support 10.6. Another option is to run 10.5 (Server) in a virtual machine. -- ___

[MEET] Chicago CocoaHeads / CAWUG tomorrow 7:00 @ Apple Store

2010-03-08 Thread Bob Frank
Hi all, Chicago CocoaHeads / CAWUG is holding our next meeting Tuesday, March 9th, at 7:00 PM at the Apple Store on Michigan Ave. in the 2nd floor theater. Agenda: - NSConference recap - CoreData Pro & Con - adjournment to O'Toole's When:

CA transition suddenly too fast

2010-03-08 Thread Fritz Anderson
I have a layer-hosting view, with the tree extending to about 60 layers total. In particular I have two one-sided "card" views with three CATextLayer sublayers each. They are in the same frame, and backless; I switch between them by doing an x-axis rotation so it appears that the two make a sing

Re: Weird Bug Report on 10.5

2010-03-08 Thread Matt Neuburg
On Mon, 8 Mar 2010 09:17:51 -0800, Brent Smith said: >The thing is, im on 10.6, not 10.5. Is my only option to get a dev machine with 10.5 on it? That is not a Cocoa question; you should really be raising this on the Xcode list. But if you are just after advice, my experience is that one cannot d

Re: Modeling a seat reservation: iPhone

2010-03-08 Thread Quincey Morris
On Mar 8, 2010, at 09:13, Gustavo Pizano wrote: > I was reading some older post about something similar. What I want to achieve > is that I have a room with seats and I want to check the seats to reserve. > Now I did something alike in Cocoa retrieving the view under the hitTest, > then I got

Re: CA transition suddenly too fast

2010-03-08 Thread Fritz Anderson
On 8 Mar 2010, at 11:46 AM, Fritz Anderson wrote: > I've changed the bus-stop layers from being single CATextLayers (bad layout) > to CALayers with text sublayers). That approximately quadrupled the > stop-related layers. > > Since then, the card flip has become almost instantaneous. You can s

Re: Weird Bug Report on 10.5

2010-03-08 Thread Steve Bird
On Mar 8, 2010, at 12:49 PM, Matt Neuburg wrote: > my experience is that one cannot > develop reliably for 10.x with a machine running 10.x on which test. Maybe change "with" to "without", and I'd agree with you Steve Bird Cu

Re: Weird Bug Report on 10.5

2010-03-08 Thread Matt Neuburg
On or about 3/8/10 10:14 AM, thus spake "Steve Bird" : > > On Mar 8, 2010, at 12:49 PM, Matt Neuburg wrote: > >> my experience is that one cannot >> develop reliably for 10.x with a machine running 10.x on which test. > > Maybe change "with" to "without", and I'd agree with you Maybe. Or i

Re: Custom View in Toolbar

2010-03-08 Thread David Blanton
Ok. Let me back up and repeat myself. I sure would like to solve this problem. Using IB I have added a Custom View from the Views & Cells Layout Views to the Allowed Toolbar Items palette. To this view I have added two Square Buttons from the Views & Cells Buttons selection. I then drag

Re: Custom View in Toolbar

2010-03-08 Thread Kyle Sluder
On Mon, Mar 8, 2010 at 10:58 AM, David Blanton wrote: > @implementation View I would not recommend using this as the name for your NSView subclass, since ObjC lacks namespaces. I doubt there's still a View class hanging around anywhere, but it's safer to prefix it with some initialism of your own

Proper control for a list of actions

2010-03-08 Thread Dave DeLong
Hi everyone, I'm recreating a rules interface (ie, under these conditions, perform those actions). I have an NSPredicateEditor in place for the conditions portion, and it's working great. However, I'm wondering what would be most appropriate to use for the actions area. My initial reaction w

Re: Custom View in Toolbar

2010-03-08 Thread David Blanton
You did not look at what I provided. @interface View : NSToolbarItem { @public } @end @implementation View - (void)validate { [self setEnabled:YES]; } @end View is a subclass of NSToolbarItem. So validate is being called on the NSToolbarItem. I believe you have no clu

Re: Custom View in Toolbar

2010-03-08 Thread Quincey Morris
On Mar 8, 2010, at 10:58, David Blanton wrote: > When I build and run the view is not visible. So I read about validating > tool bar items: > > [snip] > > I have sub classed as suggested: > > @interface View : NSToolbarItem { > @public > > } > > @end > > > @implementation View > > - (voi

Re: Custom View in Toolbar

2010-03-08 Thread Kyle Sluder
On Mon, Mar 8, 2010 at 11:19 AM, David Blanton wrote: > You did not look at what I provided. Yes, I did. But I got confused by your second screenshot and got it in my head that you had the view itself selected when you in fact had the toolbar item selected. So that was in fact my error. But my p

is as high as mine

2010-03-08 Thread David Blanton
Your overall knowledge was not being questioned, but if you had first hand knowledge of this approach I am sure I would know of it by now. That is all. I'll figure this out and post a comprehensive solution when I have time. -db On Mar 8, 2010, at 12:45 PM, Kyle Sluder wrote: On Mon, Mar

Unable to right align text when drawing via [NSAttributedString drawAt:]

2010-03-08 Thread Neil Clayton
Hello All! I seem unable to align text when drawing using drawAt:point. The NSTextView shows it OK (so the attributes appear correct), but drawing of the text doesn't show alignment... My code is: - (void) awakeFromNib { NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]

Re: Unable to right align text when drawing via [NSAttributedString drawAt:]

2010-03-08 Thread Kevin Wojniak
You could try using -[NSMutableAttributedString setAlignment:range:] On Mar 8, 2010, at 12:27 PM, Neil Clayton wrote: > > Hello All! > > I seem unable to align text when drawing using drawAt:point. The NSTextView > shows it OK (so the attributes appear correct), but drawing of the text > do

Re: Custom View in Toolbar

2010-03-08 Thread Andy Lee
On Monday, March 08, 2010, at 11:56AM, "David Blanton" wrote: >>> So two hours later I still cannot display a custom view containing >>> buttons >>> in an NSToolbar. Something that in MFC is trivial is near >>> impossible with >>> Cocoa. The Windows guys here are laughing their ... off at my

Re: Unable to right align text when drawing via [NSAttributedString drawAt:]

2010-03-08 Thread Kevin Wojniak
Never mind, ignore that. Use drawInRect instead of drawAtPoint. My guess is that when when you draw at a point, Cocoa obviously doesn't have a boundary to right (or center) align the text to, so it just defaults to left-aligned. On Mar 8, 2010, at 12:36 PM, Kevin Wojniak wrote: > You could try

Re: Custom View in Toolbar

2010-03-08 Thread Richard Somers
On Mar 8, 2010, at 11:58 AM, David Blanton wrote: I sure would like to solve this problem. Check this thread out from about one year ago. It sounds similar to your problem. Subject: NSToolbarItem with custom view in Interface Builder 3 (Leopard) http://lists.apple.com/archive

NSNumberFormatter dropping trailing zeros?

2010-03-08 Thread Ryan Stephens
Hi all, I'm trying to use an NSNumberFormatter to format the text of a UITextField as a user enters characters. The issue I'm currently having is that the number formatter always drops a trailing zero. For example, see the following code: - (BOOL)textField:(UITextField *)textField shouldChangeC

Re: Unable to right align text when drawing via [NSAttributedString drawAt:]

2010-03-08 Thread Neil Clayton
Ta daaa! And that was it! thank you. drawRect works just fine. Neil On 9/03/2010, at 10:02 AM, Kevin Wojniak wrote: > Never mind, ignore that. Use drawInRect instead of drawAtPoint. My guess is > that when when you draw at a point, Cocoa obviously doesn't have a boundary > to right (or cente

Re: Unable to right align text when drawing via [NSAttributedString drawAt:]

2010-03-08 Thread Kyle Sluder
On Mon, Mar 8, 2010 at 1:26 PM, Neil Clayton wrote: > drawRect works just fine. I'm guessing that if all you were doing is what you've shown, you wouldn't really need this code at all. :) But you might want to consider building a text system stack and reusing it, rather than using -drawInRect: w

short question but I don't know how to describe it

2010-03-08 Thread Marx Bievor
Hi, I can substitute a String with %@ and an int with %d... like in return @"Hi I am %@ and %d years old", name, age; what is the right command to substitute a bool and a float? I cannot find any reference at apple's docs. does anyone have a list of those commands? thank you! -M___

NSServices - Validation bug

2010-03-08 Thread tresa
Hi ,       I have some queries regarding Services menu validation . I would like to enable different services provided by my app based on whether a file or folder is   selected in the Finder. I have set NSFilenamesPboardType  as the send type for the services.I have gone through the  - (

Re: reading text rom Pages doc

2010-03-08 Thread Ruedi Heimlicher
Hi Thanks for all advices. I found a workarround to open and read the file with applescript. This is also possible from within Xcode, but very pedantically. I only have to read in some names from a list. No interest in text attributes. I offer the user to import name lists as .doc and .txt files

Re: Custom View in Toolbar

2010-03-08 Thread Jon Pugh
At 9:56 AM -0700 3/8/10, David Blanton wrote: >So I ask again, how does one display a custom view containing controls in a >toolbar? Typically, all views are told to draw themselves via - [view setNeedsDisplay: YES] Jon ___ Cocoa-dev mailing list (Co

Re: Weird Bug Report on 10.5

2010-03-08 Thread Jon Pugh
At 9:17 AM -0800 3/8/10, Brent Smith wrote: >The thing is, im on 10.6, not 10.5. Is my only option to get a dev machine >with 10.5 on it? According to the Internet, some people have had success running 10.5 under VMWare on 10.6. For example:

Creating NSOutlineView programmatically

2010-03-08 Thread Zack Bartel
Hi Everyone, I am trying to create an NSOutlineView programmatically inside of an NSDrawer. I am using the example datasource from /Developer/Examples/ AppKit/OutlineView the "FileSystemItem". My issue is that although the root item is displayed in the OutlineView, it is not expandable and d

Re: short question but I don't know how to describe it

2010-03-08 Thread Nick Zitzmann
On Mar 7, 2010, at 5:07 PM, Marx Bievor wrote: > I can substitute a String with %@ and an int with %d... like in return @"Hi I > am %@ and %d years old", name, age; > what is the right command to substitute a bool and a float? I cannot find any > reference at apple's docs. You generally want t

Re: reading text rom Pages doc

2010-03-08 Thread Charles Srstka
On Mar 8, 2010, at 10:12 AM, Ruedi Heimlicher wrote: > Hi > Thanks for all advices. I found a workarround to open and read the file with > applescript. This is also possible from within Xcode, but very pedantically. > I only have to read in some names from a list. No interest in text > attribut

Re: short question but I don't know how to describe it

2010-03-08 Thread Ed Wynne
On Mar 8, 2010, at 4:55 PM, Nick Zitzmann wrote: On Mar 7, 2010, at 5:07 PM, Marx Bievor wrote: I can substitute a String with %@ and an int with %d... like in return @"Hi I am %@ and %d years old", name, age; what is the right command to substitute a bool and a float? I cannot find any ref

Re: [NSTableview] can't make selected text stay black

2010-03-08 Thread Corbin Dunn
On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote: > Hi, > > I'm trying to make a NSTableView selected row not look selected. I > subclassed NSTableView & added the following class & delegate methods: > > // remove selection indication > - (void)highlightSelectionInClipRect:(NSRect)clipRect > { >

Re: NSNumberFormatter dropping trailing zeros?

2010-03-08 Thread Fritz Anderson
On 8 Mar 2010, at 3:06 PM, Ryan Stephens wrote: > Hi all, > > I'm trying to use an NSNumberFormatter to format the text of a > UITextField as a user enters characters. The issue I'm currently > having is that the number formatter always drops a trailing zero. For > example, see the following c

Re: Custom View in Toolbar

2010-03-08 Thread Graham Cox
On 06/03/2010, at 5:45 AM, David Blanton wrote: > Something that in MFC is trivial is near impossible with Cocoa. The Windows > guys here are laughing their ... off at my inability to accomplish a trivial > MFC task in a Cocoa equivalent. It's not "near impossible", it's straightforward. I've

Re: Creating NSOutlineView programmatically

2010-03-08 Thread Kevin Wojniak
You may need to use setOutlineTableColumn: method to set the outline column specifically. On Mar 8, 2010, at 1:07 PM, Zack Bartel wrote: > Hi Everyone, > > I am trying to create an NSOutlineView programmatically inside of an > NSDrawer. I am using the example datasource from > /Developer/Exa

UIImageView animationImages problem

2010-03-08 Thread patrick machielse
I'm trying to run small, full screen, 1 second long animations using the UIImageView animationImages property. The animation consists of a maximum of 9 frames, running at 18 frames per second. UIImages are re-used in the image array to conserve memory. Each time an animation runs, a new set of i

EventLoop

2010-03-08 Thread Tony Romano
I have an application that updates the image on a cell. Sometimes I present a modal sheet right after I setImage. This code is executing in an action sent from the NSMatrix containing the cells. The behavior I am seeing is the sheet rendering occurs then the image is updated. I suspect since

Re: EventLoop

2010-03-08 Thread Paul Sanders
Calling -[NSView displayIfNeeded] on the NSMatrix before you display the modal sheet might do what you want. You might also need to call -[NSWindow flushWindow] on the window containing the NSMatrix, but try it first without. Unnecessary flushes hurt performance. Paul Sanders. - Origina

Re: [NSTableview] can't make selected text stay black

2010-03-08 Thread Kent Hauser
On Mon, Mar 8, 2010 at 12:20 PM, Corbin Dunn wrote: > > On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote: > > > Hi, > > > > I'm trying to make a NSTableView selected row not look selected. I > > subclassed NSTableView & added the following class & delegate methods: > > > > > How about this: [tableVi

Re: short question but I don't know how to describe it

2010-03-08 Thread Marx Bievor
Thanks to everyone who answered me. I appreciate your effort. -M Am 08.03.2010 um 23:16 schrieb Ed Wynne: > > On Mar 8, 2010, at 4:55 PM, Nick Zitzmann wrote: >> On Mar 7, 2010, at 5:07 PM, Marx Bievor wrote: >> >>> I can substitute a String with %@ and an int with %d... like in return @"Hi >>>

Re: [NSTableview] can't make selected text stay black

2010-03-08 Thread Kevin Wojniak
What about overriding the drawTitleXXX method and just draw the text yourself? On Mar 8, 2010, at 3:15 PM, Kent Hauser wrote: > On Mon, Mar 8, 2010 at 12:20 PM, Corbin Dunn wrote: > >> >> On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote: >> >>> Hi, >>> >>> I'm trying to make a NSTableView sele

Re: Creating NSOutlineView programmatically

2010-03-08 Thread Zack Bartel
Thank you, Kevin. That was exactly what I was missing Thanks!! On Mar 8, 2010, at 2:37 PM, Kevin Wojniak wrote: You may need to use setOutlineTableColumn: method to set the outline column specifically. On Mar 8, 2010, at 1:07 PM, Zack Bartel wrote: Hi Everyone, I am trying to create an

Re: Custom View in Toolbar

2010-03-08 Thread Gregory Weston
David Blanton wrote: > So, it is not the workman it is the tool. Proven by how long it took > Apple to include toolbar support in IB and the fact that there is not > one answer or example anywhere on how to do what is supposed to be > trivial. Ergo, I stand by may statement that a trivial t

Re: short question but I don't know how to describe it

2010-03-08 Thread Clark Cox
On Mon, Mar 8, 2010 at 2:16 PM, Ed Wynne wrote: > > On Mar 8, 2010, at 4:55 PM, Nick Zitzmann wrote: >> >> On Mar 7, 2010, at 5:07 PM, Marx Bievor wrote: >> >>> I can substitute a String with %@ and an int with %d... like in return >>> @"Hi I am %@ and %d years old", name, age; >>> what is the rig

Objective-C Garbage Collection problems

2010-03-08 Thread Josh de Lioncourt
This is a very perplexing problem. I hope someone can shed some light on it. 1. I have a project which uses an open source framework which is already compiled. 2. The open source framework, in its own Xcode project, compiles just fine whether Objective-C garbage colection is set to supported o

Re: short question but I don't know how to describe it

2010-03-08 Thread Greg Parker
On Mar 8, 2010, at 3:54 PM, Clark Cox wrote: > For types smaller than int, there is no need to explicitly cast; the > standard guarantees that such values are converted to int (or unsigned > int) implicitly. In fact, the 'h' and 'hh' modifiers are completely > redundant and are ignored when passed

Re: short question but I don't know how to describe it

2010-03-08 Thread Clark Cox
On Mon, Mar 8, 2010 at 4:04 PM, Greg Parker wrote: > On Mar 8, 2010, at 3:54 PM, Clark Cox wrote: >> For types smaller than int, there is no need to explicitly cast; the >> standard guarantees that such values are converted to int (or unsigned >> int)  implicitly. In fact, the 'h' and 'hh' modifie

Using Core Data in Command Line utility

2010-03-08 Thread Paul Johnson
I've created an Xcode project using the Command Line Tool template with the Type set to "Core Data". I defined an Entity with 3 Properties. Two of the Properties are strings and one is an integer (Int 16). I fetch data from 3 files read from the internet and use a scanner which extracts the strin

Re: Using Core Data in Command Line utility

2010-03-08 Thread Roland King
Paul Johnson wrote: In the innermost scanner loop, I am trying to use NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext, to create an NSManagedObject which I then want to populate with the two strings and the integer using [object setValue:forKey:] The problem I'm hav

Re: Using Core Data in Command Line utility

2010-03-08 Thread Jim Correia
On Mar 8, 2010, at 8:44 PM, Paul Johnson wrote: > The problem I'm having is the line that tries to store the integer: > [object setValue:i forKey:@"fileIndex"]; > > I get the compiler error "Passing argument 1 of 'setValue"forKey' > makes pointer from integer without a cast”. -setValue:forKey: t

NSImage change of behaviour?

2010-03-08 Thread Graham Cox
Not sure if this is a bug or not, but it's certainly something that seems to have changed and I can find no mention of it in the release notes or elsewhere. Typically when making an image for use as a drag image, I draw a bunch of things into an image, then copy it to itself with 50% alpha. This

Re: Objective-C Garbage Collection problems

2010-03-08 Thread Quincey Morris
On Mar 8, 2010, at 16:01, Josh de Lioncourt wrote: > 1. I have a project which uses an open source framework which is already > compiled. > > 2. The open source framework, in its own Xcode project, compiles just fine > whether Objective-C garbage colection is set to supported or unsupported. No

Re: Using Core Data in Command Line utility

2010-03-08 Thread Paul Johnson
Thanks for the quick reply, Roland. That's exactly what I needed to solve the problem. A couple of side questions: 1. Another way to archive the data is to use "dataOfType:error:" and I wonder if one way is preferable over the other. 2. I use the save: method to write the data and there are two fi

Re: NSApp question

2010-03-08 Thread Rick C.
thanks for the reply! yes i asked because according to my testing using activateIgnoringOtherApps does not show a window that is not visible. it will definitely bring to the front a window that is already visible. and in this case i am not using makeKeyAndOrderFront which i know will also s

Determining bounds of a glyph

2010-03-08 Thread Philip White
Sorry, that's not a very good subject title. Here's what I'm giving myself a headache trying to do: For a fixed-pitch font I want to generate images of various glyphs for use in OpenGL. I may be generating large numbers of such images so I don't want to use the NSString/NSAttributedString conve

Re: NSImage change of behaviour?

2010-03-08 Thread Ken Ferry
Hi Graham, I don't think the problem is exactly what is described here. A test app behaves as expected. . However, I could believe that what your seeing does have something to do with locking focus on an image and then drawing from that image

Re: problems loading a sound with NSSound

2010-03-08 Thread Jonathan Chacón
Hello, this works great! NSSound *logoSound = [NSSound soundNamed: @"logoSound"]; [logoSound play]; thanks! regards Jonathan Chacón El 08/03/2010, a las 12:20, Keith Blount escribió: > NSSound doesn't respond to -initWithContentsOfFile: (it responds to > -initWithContentsOfFile:byR

NSTableViewDropAbove visual remnant

2010-03-08 Thread Steve Cronin
Folks; I have a tableView which is working pretty handily. I support a form of import by dropping a text file on it. The backing arrayController returns an NSTableViewDropAbove for UI feedback purposes. (the row the file is dropped on (or above) doesn't actually matter) I

Re: NSImage change of behaviour?

2010-03-08 Thread Graham Cox
On 09/03/2010, at 3:53 PM, Ken Ferry wrote: > Drawing an image while focus is locked on it should be avoided. There are > probably lots of ways to get the effect your app wants (most more readable > than the following), but a direct way to halve the alpha channel is to draw > with Destination

NSTextView attachments and context menus

2010-03-08 Thread Martin Hewitson
Dear list, I have an NSTextView which support dragging files in, either to create a link to the file, or to add the file as an attachment. So far so good. Now I want to offer the user a context menu to perform operations on the attachment (open, save, etc). So far I was unable to find a way to