Parsing xml files in Cocoa applications

2008-10-30 Thread Arnab Ganguly
Hi All, How do I read, parse xml files in Cocoa App ?Any standard parser is available? Thanks in advance Regards Arnab ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: inter-object communication

2008-10-30 Thread Nicko van Someren
On 29 Oct 2008, at 06:30, Charles Steinman wrote: From: Albert Jordan [EMAIL PROTECTED] What is the recommended way for Object B to inform Object A that it is done processing a request for the following scenario? Object A has a list of phone numbers to send SMS messages Object B implements

interface builder and nsarraycontroller binding newbie question

2008-10-30 Thread Bob Henkel
Hello, I'm pretty new to the OSX and really new to Cocoa. With the disclaimer aside For one my first learning projects I started to follow a tutorial that has me making use of a nsarraycontroller in IB and using bindings to bind an nsarraycontroller to a Employee class I created. CLASS

Re: Problem with NSData to NSString to NSData

2008-10-30 Thread Dave Geering
From your original implementation of putting the metadata directly into the PDF file, you'll now end up with obviously a proprietary file. i.e. No application that works with PDF will be able to work with that file. That is not at all true. You can embed the data into a PDF stream but never

Re: Problem with NSData to NSString to NSData

2008-10-30 Thread Jeff Dutky
On Wed, Oct 29, 2008 at 4:46 PM, Joel Norvell [EMAIL PROTECTED] wrote: Dear Cocoa-dev People, First, I wanted to thank Aki Inoue and Rob Keniger for pointing out the problem with my NSData-NSString-NSData approach. As an alternative, would it be fruitful to use a Directory Wrapper to

Re: Parsing xml files in Cocoa applications

2008-10-30 Thread Nick Zitzmann
On Oct 29, 2008, at 3:28 AM, Arnab Ganguly wrote: How do I read, parse xml files in Cocoa App ?Any standard parser is available? Did you see the documentation for the NSXML family of classes? Nick Zitzmann http://www.chronosnet.com/ ___

Re: Is there an equivalent to std::min/std::max for Cocoa programmer's

2008-10-30 Thread Michael A. Crawford
Done. See radar 6331394. -Michael On Oct 29, 2008, at 1:27 PM, Nick Zitzmann wrote: On Oct 29, 2008, at 5:19 PM, Michael A. Crawford wrote: Thank you. I did try to find these using the help feature in Xcode and the documentation that is included with Xcode but I did not get a hit. I

A way to disable all tooltips in an Application?

2008-10-30 Thread Vijay Malhan
Hello All, Is there a way to disable all tooltips in an Application. Regards, Vijay ___ 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: interface builder and nsarraycontroller binding newbie question

2008-10-30 Thread Ashley Clark
Hi! On Oct 29, 2008, at 9:43 AM, Bob Henkel wrote: Hello, snip What I want to do now is invoke a method on the object I have selected in nstableview by clicking a third button labeled Random Salary which will call the method giveRandomSalary that I created in my Employee class. The job of

Re: Parsing xml files in Cocoa applications

2008-10-30 Thread Colin Barrett
There's not one but two XML parsers built right in (NSXMLPaser, NSXMLDocument friends), and there's also any number of C libraries (expat, libxml, etc). If for some bizarre you reason you need to parse XML files backwards, there's http://boredzo.org/lmx/. On Wed, Oct 29, 2008 at 2:28 AM, Arnab

Programmatically change screensaver

2008-10-30 Thread Brad Peterson
Hi, Does anyone know how to programatically change the user's current screensaver? I've tried applescripts and poking around the ~/Library/Preferences/ByHost folder, but I can't find anything. I was hoping there's a proper API or at least a known (stable?) preferences file somewhere...

Help on cocoa app

2008-10-30 Thread Arnab Ganguly
Hi All, I am new to Cocoa application.I have developed a player application using QTKit. When I start my application it comes with an open and radio options under the File. Now from the open I can play mp3 files locally and from the radio button it launches the safari browser to go to a

Re: Help on cocoa app

2008-10-30 Thread Scott Anguish
You will need to explore the webkit api. Have a look at the minibrowser example on /Developer/Examples/Webkit Sent from my iPhone On Oct 30, 2008, at 6:26 AM, Arnab Ganguly [EMAIL PROTECTED] wrote: Hi All, I am new to Cocoa application.I have developed a player application using

Re: file references in CoreData

2008-10-30 Thread Georg Seifert
Many thanks for your replies. I will try out the aliases. Georg ___ 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 cocoa-dev-admins(at)lists.apple.com

RE: Re: Static text over an image

2008-10-30 Thread Mark Allan
I've seen this happen *every* time in IB if the items in question are within an NSView. It was driving me crazy for a while until I figured out (completely by accident) that the order has to be reversed when you're setting up the NIB/XIB file for it to work correctly. It's a real PITA because

Re: filtering a tableView from a pulldown

2008-10-30 Thread Amy Heavey
On 29 Oct 2008, at 14:42, I. Savant wrote: On Wed, Oct 29, 2008 at 4:49 AM, Amy Heavey [EMAIL PROTECTED] wrote: The pop up has selectedObject bound to Purchase Order Array Controller 2 selection.orderReference ... At the moment the content Object is bound to selection.orderReference of

Re: When does Cocoa get No more! from malloc?

2008-10-30 Thread Jerry Krinock
On 2008 Oct, 25, at 21:58, Ken Thomases wrote: On Oct 25, 2008, at 11:48 PM, Jerry Krinock wrote: Why did malloc say No more! on his Mac, but not on mine? Because you didn't let yours run amok for long enough. Thank you, Ken. I thought I did, but maybe I didn't. If your app is leaking

Re: NSBezierPath problems, seems to be two bugs [solved]

2008-10-30 Thread Jochen Moeller
Hello List two weeks ago I described a remaining shape in the sample code Movie_Overlay, when the NSColor -whiteColor was replaced by -clearColor. Now I have implemented an overlay window in my own app and found the cause for that shape. It is in MyDocument.m the code line:

RE: Re: Static text over an image

2008-10-30 Thread Alex Curylo
On 30-Oct-08, at 5:42 AM, [EMAIL PROTECTED] wrote: I've seen this happen *every* time in IB if the items in question are within an NSView. It was driving me crazy for a while until I figured out (completely by accident) that the order has to be reversed when you're setting up the NIB/XIB

Re: Static text over an image

2008-10-30 Thread Andre Masse
On Oct 30, 2008, at 01:32, Andrew Merenbach wrote: What operating system are you deploying to, and which SDK are you linking against? If you're using anything before Leopard, you're out of luck with your present method, as clipping was not enforced among sibling views prior to 10.5.

Re: Static text over an image

2008-10-30 Thread Andre Masse
On Oct 30, 2008, at 09:08, Alex Curylo wrote: Or you could do what I did when I had a project this was an intense annoyance for what with the several-times-a-day client updates, which is to just programmatically reverse the order on load. That smoothed development considerably. Pardon

Re: filtering a tableView from a pulldown

2008-10-30 Thread I. Savant
The pop up has selectedObject bound to Purchase Order Array Controller 2 selection.orderReference ... At the moment the content Object is bound to selection.orderReference of the Purchase Order Array Controller. If you're binding the content object(s), this is wrong. Again, you want the

Re: Static text over an image

2008-10-30 Thread John Joyce
On Oct 30, 2008, at 7:41 AM, [EMAIL PROTECTED] wrote: Date: Thu, 30 Oct 2008 10:31:03 From: Mark Allan [EMAIL PROTECTED] Subject: RE: Re: Static text over an image To: Brandon Walkin [EMAIL PROTECTED], Andre Masse [EMAIL PROTECTED] Cc: Cocoa Dev cocoa-dev@lists.apple.com

Re: When does Cocoa get No more! from malloc?

2008-10-30 Thread Michael Ash
On Thu, Oct 30, 2008 at 8:56 AM, Jerry Krinock [EMAIL PROTECTED] wrote: On 2008 Oct, 25, at 21:58, Ken Thomases wrote: On Oct 25, 2008, at 11:48 PM, Jerry Krinock wrote: Why did malloc say No more! on his Mac, but not on mine? Because you didn't let yours run amok for long enough. Thank

Re: When does Cocoa get No more! from malloc?

2008-10-30 Thread Chris Suter
An internet search shows me that the error message... malloc: *** mmap(size=2097152) failed (error code=12) is quite common. What is the significance of the number 2097152, besides the fact that it is 2^21? It's just the amount of memory in bytes it was trying to allocate when it

Re: filtering a tableView from a pulldown

2008-10-30 Thread Amy Heavey
On 30 Oct 2008, at 14:11, I. Savant wrote: The pop up has selectedObject bound to Purchase Order Array Controller 2 selection.orderReference ... At the moment the content Object is bound to selection.orderReference of the Purchase Order Array Controller. If you're binding the content

Re: When does Cocoa get No more! from malloc?

2008-10-30 Thread Chris Suter
On Fri, Oct 31, 2008 at 1:28 AM, Michael Ash [EMAIL PROTECTED] wrote: Apparently it asks for 2MB at a time. For tiny regions (for blocks = 16 bytes), it looks like it appears to allocate 1 MB chunks. For small regions (blocks = 512 bytes), I think it's around 8MB blocks. I think the 2 MB must

Re: filtering a tableView from a pulldown

2008-10-30 Thread I. Savant
On Thu, Oct 30, 2008 at 10:31 AM, Amy Heavey [EMAIL PROTECTED] wrote: So now, the pulldown filters the tableview. but there's a snag. I select a Purchase Order in my window, and click a button which opens the panel with the Purchase Orders 'line items' in the table. The Purchase Order is in

Re: filtering a tableView from a pulldown

2008-10-30 Thread Amy Heavey
On 30 Oct 2008, at 14:41, I. Savant wrote: Is it possible for you to post a pared-down version of your project somewhere for myself and others on the list to take a look at? I've uploaded the project folder to www.amygibbs.co.uk/xcode/powizard one thing to note, is that at the moment the

Re: When does Cocoa get No more! from malloc?

2008-10-30 Thread Shawn Erickson
Try out vmmap against your (or some) application to see how things are getting allocated. It can give you insights into how things are working at the VM level. [0:502] vmmap iTunes Virtual Memory Map of process 7842 (iTunes) Output report format: 2.2 -- 32-bit process Non-writable

Re: Static text over an image

2008-10-30 Thread Shawn Erickson
On Wed, Oct 29, 2008 at 9:48 PM, Andre Masse [EMAIL PROTECTED] wrote: Hi, I want to have text over an image. Even though I set it up in IB (move image to the back, bring the label to the front), the label is always drawn behind the image. Is there a setting to be set in IB for that or do I

coredata: building tree from Entities

2008-10-30 Thread Georg Seifert
hello, once again a beginner question on coredata. I want to display my data in a outlineview grouped one of the entities attributes. my Data: Elements ( {titel1, name1}, {titel1, name2}, {titel2, name3}, {titel2, name4}, {titel2, name5} ) the

Image from font file

2008-10-30 Thread Georg Seifert
hello, I wonder what is the best way to render images from a font file with a given string. The font is not activated in the system. I came up with: - using Quicklook, but I could only get images with Ag (like the icon for font files), not the alphabetic overview I get in the finder. (is

Re: Static text over an image

2008-10-30 Thread Andre Masse
Thanks for the link Shawn. I guess I'll have to live with that. Andre Masse On Oct 30, 2008, at 11:26, Shawn Erickson wrote: http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaViewsGuide/WorkingWithAViewHierarchy/chapter_5_section_5.html Note: For performance reasons, Cocoa

Re: What's wrong with this font thing?

2008-10-30 Thread Randall Meadows
On Oct 29, 2008, at 6:05 PM, Aki Inoue wrote: The threshold being discussed here is the boundary between the screen font vs printer font in NSFont jargon. For font size smaller than 16pt, we automatically substitute the default printer font to its corresponding screen font. The metrics

Re: What's wrong with this font thing?

2008-10-30 Thread Randall Meadows
On Oct 30, 2008, at 9:53 AM, Randall Meadows wrote: On Oct 29, 2008, at 6:05 PM, Aki Inoue wrote: The threshold being discussed here is the boundary between the screen font vs printer font in NSFont jargon. For font size smaller than 16pt, we automatically substitute the default printer

Re: Static text over an image

2008-10-30 Thread Alex Curylo
On 30-Oct-08, at 8:01 AM, [EMAIL PROTECTED] wrote: which is to just programmatically reverse the order on load. That smoothed development considerably. Pardon my ignorance (still learning Cocoa) but can you point to me what class/method to use for that? The exact details escape me now,

Re: What's wrong with this font thing?

2008-10-30 Thread Randall Meadows
On Oct 30, 2008, at 10:02 AM, Randall Meadows wrote: On Oct 30, 2008, at 9:53 AM, Randall Meadows wrote: So how can I get a the width that a particular string is going to be drawn in, *and* disable that subsitution? Will calling NSLayoutManager setUsesScreenFonts:NO before calling

Re: [MEET] CocoaHeads Mac Developer Meetings

2008-10-30 Thread Negm-Awad Amin
Am Mi,29.10.2008 um 23:29 schrieb Stephen Zyszkiewicz: Greetings, CocoaHeads is an international Mac programmer's group. We specialize in Cocoa, but everything Mac programming related is welcome. Why Should I Attend? Meeting other Mac OS X developers in person is both fun and immensely

Re: Static text over an image

2008-10-30 Thread Andre Masse
Thanks for your code snippet, I get the idea now. Andre Masse On Oct 30, 2008, at 12:07, Alex Curylo wrote: The exact details escape me now, but I seem to recall that since the order of -subviews was not completely deterministic depending on what the latest mucking about in the nib had

Re: coredata: building tree from Entities

2008-10-30 Thread Quincey Morris
On Oct 30, 2008, at 08:39, Georg Seifert wrote: once again a beginner question on coredata. I want to display my data in a outlineview grouped one of the entities attributes. my Data: Elements ( {titel1, name1}, {titel1, name2}, {titel2, name3}, {titel2,

-[_NSZombie methodSignatureForSelector:] not working

2008-10-30 Thread Michael Ash
The famous TN2124 (http://developer.apple.com/technotes/tn2004/tn2124.html) has this to say about debugging using zombies: You can use GDB to set a breakpoint on -[_NSZombie methodSignatureForSelector:] to further debug this sort of problem. However this does not appear to work. GDB cannot

Porting from Windows to Mac

2008-10-30 Thread Rakesh Singhal
Hi all I have to port a project form windows to Mac. The existing code is in C++ and classes are inherited from MFC library classes. Do I have any alternative for MFC in MAC OS? I have gone through some posting on Apple lists and I found that there are 2 cross-platform tools Power Plant and Code

Re: Parsing xml files in Cocoa applications

2008-10-30 Thread Paul Reilly
There is also some good sample code on the iPhone Developer site, called SeismicXML which shows how to parse an XML document. Paul ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Customizing controls: Inheritance bad?

2008-10-30 Thread Brian Williams
Hello, I'm brand new to Cocoa/Obj-C and I'm working on converting an app. to use Cocoa... I've heard that, in general, if you are using inheritance in Cocoa, you're not following the typical standard design pattern. Is this true? To respond to special keyboard events in an

Type comparison warning

2008-10-30 Thread DKJ
I'm probably missing something simple, but I don't understand why this line: return (i == -1 ? [NSNull null] : [NSNumber numberWithInteger:i]); (where i is an NSInteger) produces this warning: comparison of distinct Objective-C types lacks a cast (The return type of the

Re: [MEET] CocoaHeads Mac Developer Meetings

2008-10-30 Thread Torsten Curdt
Greetings, CocoaHeads is an international Mac programmer's group. We specialize in Cocoa, but everything Mac programming related is welcome. Why Should I Attend? Meeting other Mac OS X developers in person is both fun and immensely useful. There's no better way to learn Cocoa or get help

Re: Customizing controls: Inheritance bad?

2008-10-30 Thread Jean-Daniel Dupas
Le 30 oct. 08 à 16:51, Brian Williams a écrit : Hello, I'm brand new to Cocoa/Obj-C and I'm working on converting an app. to use Cocoa... I've heard that, in general, if you are using inheritance in Cocoa, you're not following the typical standard design pattern. Is this true? To

Re: Type comparison warning

2008-10-30 Thread Dave Carrigan
On Oct 30, 2008, at 10:12 AM, DKJ wrote: I'm probably missing something simple, but I don't understand why this line: return (i == -1 ? [NSNull null] : [NSNumber numberWithInteger:i]); (where i is an NSInteger) produces this warning: comparison of distinct Objective-C

Re: Porting from Windows to Mac

2008-10-30 Thread Scott Ribe
Do I have any alternative for MFC in MAC OS? No. I have gone through some posting on Apple lists and I found that there are 2 cross-platform tools Power Plant and Code Warrior. CodeWarrior was a suite of tools, which was discontinued years ago, and never supported Intel Macs. PowerPlant

NSOperationQueue broken?

2008-10-30 Thread Michael Ash
I hate to blame an OS bug but I see no other explanation, so here we go. I have a program which uses NSOperationQueue heavily. It uses lots of different queues each of which has a max concurrent operation count set to 1. In this way, the NSOperationQueue functions as a serialization mechanism,

Re: -[_NSZombie methodSignatureForSelector:] not working

2008-10-30 Thread Chris Kane
As long as you don't foolishly have a signal handler for SIGTRAP setup to ignore it, the zombie mechanism causes its own debugger trap for you in 10.5 and later. For stopping in the debugger purposes, no breakpoint is needed. If you have a SIGTRAP handler, it will get called instead of a

Re: Type comparison warning

2008-10-30 Thread Scott Ribe
First off, NSInteger is an object not an int and can't be directly compared to an int. Second, i is not likely an NSInteger, it's a pointer to an NSInteger, which means it can be compared to an int, via implicit or explicit casting, but in the absence of an explicit cast, the compiler assumes

RE: Porting from Windows to Mac

2008-10-30 Thread Gary L. Wade
Check out this article on Apple's web site: http://developer.apple.com/documentation/Porting/Conceptual/win32porting/win32porting.html Essentially, CodeWarrior, for Mac development, should not be considered for new development (I have to use it for a legacy product, and there's lots of

Re: Type comparison warning

2008-10-30 Thread Clark Cox
On Thu, Oct 30, 2008 at 10:47 AM, Scott Ribe [EMAIL PROTECTED] wrote: First off, NSInteger is an object not an int and can't be directly compared to an int. Not true, NSInteger and NSUInteger are typedefs for plain integer types, *not* Objective-C objects. -- Clark S. Cox III [EMAIL

Re: Customizing controls: Inheritance bad?

2008-10-30 Thread Andy Lee
On Oct 30, 2008, at 11:51 AM, Brian Williams wrote: I've heard that, in general, if you are using inheritance in Cocoa, you're not following the typical standard design pattern. Is this true? I would say that's an overstatement. Many Cocoa classes are designed so that you should only

Re: Type comparison warning

2008-10-30 Thread Scott Ribe
Not true, NSInteger and NSUInteger are typedefs for plain integer types, *not* Objective-C objects. Yes, yes, yes. Thanks for pointing that out. I'm not doing 10.5-only development yet, so I read NSNumber because I'm not used to seeing NSInteger anywhere. -- Scott Ribe [EMAIL PROTECTED]

Re: Type comparison warning

2008-10-30 Thread Jean-Daniel Dupas
Le 30 oct. 08 à 19:01, Scott Ribe a écrit : Not true, NSInteger and NSUInteger are typedefs for plain integer types, *not* Objective-C objects. Yes, yes, yes. Thanks for pointing that out. I'm not doing 10.5-only development yet, so I read NSNumber because I'm not used to seeing NSInteger

Re: Porting from Windows to Mac

2008-10-30 Thread Christopher Hickman
***DO NOT*** expect that it's merely a matter of finding the corresponding Mac API call for each Windows API call--the differences run deeper than that. In order to be successful, you ***WILL*** have to learn to be a Mac developer, period, no shortcuts. Don't let that scare you. It's easier than

Re: -[_NSZombie methodSignatureForSelector:] not working

2008-10-30 Thread Michael Ash
On Thu, Oct 30, 2008 at 1:41 PM, Chris Kane [EMAIL PROTECTED] wrote: As long as you don't foolishly have a signal handler for SIGTRAP setup to ignore it, the zombie mechanism causes its own debugger trap for you in 10.5 and later. For stopping in the debugger purposes, no breakpoint is needed.

Re: Porting from Windows to Mac

2008-10-30 Thread Martin Stoufer
wax sentimental='true'Ah, CodeWarrior. I first cut my coding teeth on that ol' app. What an experience it was to actually design my own apps. Those were the days./wax OK, so I actually used gcc before that, but still I have to agree with Gary on this one. I have ported over a few

Re: NSOperationQueue broken?

2008-10-30 Thread Quincey Morris
On Oct 30, 2008, at 10:40, Michael Ash wrote: [_queue addOperation:op]; Have you tried using performSelectorOnMainThread: to force serializing of the queuing? It might be an acceptable workaround, if it works. ___ Cocoa-dev mailing list

Need help programatically wiring up an NSTreeController to an NSOutlineView

2008-10-30 Thread Ken Tozier
Hi I've been Googling bindings, and reading the Apple bindings documentation for a week, but have gotten nowhere on this one. I desperately need help from someone who knows programmatic bindings. I have a class where I store all properties in an NSMutableDictionary and wrote a few

Re: NSOperationQueue broken?

2008-10-30 Thread Michael Ash
On Thu, Oct 30, 2008 at 2:45 PM, Quincey Morris [EMAIL PROTECTED] wrote: On Oct 30, 2008, at 10:40, Michael Ash wrote: [_queue addOperation:op]; Have you tried using performSelectorOnMainThread: to force serializing of the queuing? It might be an acceptable workaround, if it works. I

Re: Porting from Windows to Mac

2008-10-30 Thread Ricky Sharp
On Oct 30, 2008, at 12:49 PM, Gary L. Wade wrote: Check out this article on Apple's web site: http://developer.apple.com/documentation/Porting/Conceptual/win32porting/win32porting.html Essentially, CodeWarrior, for Mac development, should not be considered for new development (I have to

Re: Porting from Windows to Mac

2008-10-30 Thread Paul Archibald
Amen. Codewarrior is dead, long live Xcode. (I still mourn CodeWarrior, but what's past is past.) I did some work with MFC a couple of years ago, and thought it was pretty nice (not elegant, but productive). Now, I am trying to port my Cocoa app to Windows, and for various reasons

Re: Porting from Windows to Mac

2008-10-30 Thread Stefan Werner
On Oct 30, 2008, at 8:31 AM, Rakesh Singhal wrote: I have to port a project form windows to Mac. The existing code is in C++ and classes are inherited from MFC library classes. Do I have any alternative for MFC in MAC OS? I have gone through some posting on Apple lists and I found that there

Re: Image from font file

2008-10-30 Thread Jason Coco
On Oct 30, 2008, at 11:40 , Georg Seifert wrote: hello, I wonder what is the best way to render images from a font file with a given string. The font is not activated in the system. I came up with: - using Quicklook, but I could only get images with Ag (like the icon for font files),

Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?

2008-10-30 Thread Nathan Vander Wilt
So I was reading through the Leopard AppKit release notes today, and stumbled across the Support for UTIs in NSView and NSWindow (a few sections below http://developer.apple.com/releasenotes/Cocoa/AppKit.html#UTIs) . It states: NSView's

Re: Image from font file

2008-10-30 Thread Georg Seifert
Thanks for your answer. I found this with google, too. The problem is, I want to build somthing like a font preview app. So it needs to be fast and may happen with 10 or even 50 fonts at once. And it may conflict with activated fonts. Georg Am 30.10.2008 um 20:22 schrieb Jason Coco: On

Re: NSTask and get results

2008-10-30 Thread Jason Coco
On Oct 30, 2008, at 16:54 , J. Todd Slack wrote: Hi All, Can I run an NSTask and get the results back for parsing? I looked at CocoaDev and I see that I can specify a pipe, which needs a file to write to, but can I just get the results back in an array or something? You would have to

Re: Image from font file

2008-10-30 Thread Jason Coco
On Oct 30, 2008, at 16:32 , Georg Seifert wrote: Thanks for your answer. I found this with google, too. The problem is, I want to build somthing like a font preview app. So it needs to be fast and may happen with 10 or even 50 fonts at once. And it may conflict with activated fonts.

detecting an option-click on a button

2008-10-30 Thread Paul Archibald
Is there a simple way to detect that the option key was down when a button was clicked? I have a method in my controller that gets the button click, of course, and I have been trying this: -(IBAction) handleButton:(id)sender { if( [[NSApp currentEvent] modifierFlags]

Re: Porting from Windows to Mac

2008-10-30 Thread Νικόλας Τουμπέλης
I haven't done any porting between the two platforms, but I have worked with both for some time. It's not easy to port such an application and be prepared to rewrite most of the code (not counting the learning curve). All the GUI stuff, you have to separate from the model, in order to have a

Re: NSOperationQueue broken?

2008-10-30 Thread Jamie Johnson
Looks like you're hosing memory because the subsequent invocation operations are being released prior to their completion as seen in this call stack: #0 0x1a0c in -[MyOp dealloc] at NSOp-Test.m:27 #1 0x94fba20f in NSPopAutoreleasePool #2 0x9504f3a8 in -[NSOperation

Re: Porting from Windows to Mac

2008-10-30 Thread Tommy Nordgren
On 30 okt 2008, at 08.31, Rakesh Singhal wrote: Hi all I have to port a project form windows to Mac. The existing code is in C++ and classes are inherited from MFC library classes. Do I have any alternative for MFC in MAC OS? I have gone through some posting on Apple lists and I found that

Re: Porting from Windows to Mac

2008-10-30 Thread Bill Bumgarner
On Oct 30, 2008, at 3:14 PM, Tommy Nordgren wrote: I suggest you port your app to use the Qt framework from TrollTech (http://www.trolltech.com) It is implemented in C++, and the native layer on Mac OS X is implemented using Carbon and Cocoa. You might have to implement some

Re: Porting from Windows to Mac

2008-10-30 Thread Stefan Werner
I would also recommend that you start over with the design of your GUI, for the sensibilities and design principles of Mac OS X are very different. This difference is exacerbated if you consider the age of MFC... You are aware that MFC (1992) is younger than NextStep (1988)? ;-) And if

Re: Porting from Windows to Mac

2008-10-30 Thread Νικόλας Τουμπέλης
You are aware that MFC (1992) is younger than NextStep (1988)? ;-) I was mostly referring to the Mac OS X user interface..., And if age is a criteria, we should always prefer Carbon over Posix. True :) - Nick email: [EMAIL PROTECTED] twitter: macsphere

Re: Need help programatically wiring up an NSTreeController to an NSOutlineView

2008-10-30 Thread Ron Lue-Sang
A higher level object (PMController ) contains an NSMutableArray property which stores a collection of PMProject objects and an NSTreeController property to serve as the intermediary between the NSMutableArray and an NSOutlineView. I'm setting up the NSTreeController like so: -

Re: detecting an option-click on a button

2008-10-30 Thread Graham Cox
On 31 Oct 2008, at 8:51 am, Paul Archibald wrote: but of course the currentEvent is not necessarily related to the sender I think you'll find it is. Only one event is handled per event loop, and when the action method is called it's synchronous with that loop. Thus the current event

Horizontal Stepper

2008-10-30 Thread Jeffrey Goines
Hi, is there an easy way to get a horizontal NSStepper? I've tried it in Interface Builder with Affine Transform through Content Filters (in the Effects Inspector) but this rotates the visual representation out of the clickable space. thank you, Jeffrey

When and how often do you mix C++ with Objective C in your project?

2008-10-30 Thread Boon Chew
Hi all, I am a newbie to the cocoa world (PC - Mac switcher).  I have a fair amount of experience coding in C and C++ and I am just getting into Obj C now.  Right now I am trying to learn the language idioms and patterns in the Obj C world, specifically, when do you find yourself mixing C++

Re: Type comparison warning

2008-10-30 Thread Scott Ribe
All my projects that target 10.4 already use NSInteger (and are 64 bits safe). I got an error when I first tried. Perhaps that was with a project that still supports 10.3.9... -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice

Help with NSBitmapImageRep, please

2008-10-30 Thread M Pulis
Group, I have a sensor device that give me raw data for an image of 1201 by 861 pixels at 16 bits per pixel. Although monochromatic, I would like to represent it in an RGB bitmap. I use an NSInteger [3] to populate the pixels via setPixel. The result I get looks like the old TV

Re: Type comparison warning

2008-10-30 Thread Nick Zitzmann
On Oct 30, 2008, at 6:03 PM, Scott Ribe wrote: I got an error when I first tried. Perhaps that was with a project that still supports 10.3.9... If you're using an older SDK, then you can support NS(U)Integer and CGFloat in your older code just by copying the definitions from the

Re: When and how often do you mix C++ with Objective C in your project?

2008-10-30 Thread Kiel Gillard
On 31/10/2008, at 10:33 AM, Boon Chew wrote: Hi all, I am a newbie to the cocoa world (PC - Mac switcher). I have a fair amount of experience coding in C and C++ and I am just getting into Obj C now. Right now I am trying to learn the language idioms and patterns in the Obj C world,

Re: NSOperationQueue broken?

2008-10-30 Thread Michael Ash
On Thu, Oct 30, 2008 at 6:04 PM, Jamie Johnson [EMAIL PROTECTED] wrote: Looks like you're hosing memory because the subsequent invocation operations are being released prior to their completion as seen in this call stack: #0 0x1a0c in -[MyOp dealloc] at NSOp-Test.m:27 #1

Re: Help with NSBitmapImageRep, please

2008-10-30 Thread Graham Cox
On 31 Oct 2008, at 11:12 am, M Pulis wrote: Error: CGBitmapContextCreate: unsupported parameter combination: 16 integer bits/component; 48 bits/pixel; 3-component colorspace; kCGImageAlphaNone; 7206 bytes/row. Error: CGContextScaleCTM: invalid context So, what is wrong am I missing here?

Re: Help with NSBitmapImageRep, please

2008-10-30 Thread Graham Cox
On 31 Oct 2008, at 11:44 am, Graham Cox wrote: You can't have 16 bits per pixel RGB bitmaps I mean 16 bits per *COMPONENT*, not pixel - slip of the pen ;-) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: What's wrong with this font thing?

2008-10-30 Thread Aki Inoue
Looks like the typesetter behavior used by these NSStringDrawing methods are affecting the default line height. Please file a bug. Thanks, Aki On 2008/10/30, at 9:19, Randall Meadows wrote: On Oct 30, 2008, at 10:02 AM, Randall Meadows wrote: On Oct 30, 2008, at 9:53 AM, Randall Meadows

NSTextView actions

2008-10-30 Thread Randall Meadows
OK, last text-related question of the day (I promise, only because I'm calling it a day after I send this)... I have an NSTextView, in an NSScrollView, (loaded from a nib) that I embed in a custom view at runtime; I also draw a reflection of that custom view. I figured out how to do a

Re: Help with NSBitmapImageRep, please

2008-10-30 Thread Adam R. Maxwell
On Thursday, October 30, 2008, at 05:12PM, M Pulis [EMAIL PROTECTED] wrote: NSBitmapImageRep *aFrameBitmap=nil; aFrameBitmap = [NSBitmapImageRep alloc]; [aFrameBitmap initWithBitmapDataPlanes:nil Missed this in my previous

Re: When and how often do you mix C++ with Objective C in your project?

2008-10-30 Thread Peter N Lewis
AI am a newbie to the cocoa world (PC - Mac switcher). I have a fair amount of experience coding in C and C++ and I am just getting into Obj C now. Right now I am trying to learn the language idioms and patterns in the Obj C world, specifically, when do you find yourself mixing C++ code with

Re: NSTextView actions

2008-10-30 Thread Randall Meadows
On Oct 30, 2008, at 7:23 PM, Randall Meadows wrote: When I hit, for example, the Page Up area of the scroll bar, it animates to it's new position; my reflection updates only a very small portion of this change. It doesn't at all when I hit the Page Up key, though. Is the animation

Re: Silicon Valley CocoaHeads ... ?

2008-10-30 Thread j o a r
On Oct 30, 2008, at 2:10 PM, Jay Reynolds Freeman wrote: Excuse me wasting bandwidth, but I have the impression that the Silicon Valley CocoaHeads group is dead or at least catatonic at the moment, and thought I would double-check by asking here ... Sorry for the delay. The lack of events

Re: When and how often do you mix C++ with Objective C in your project?

2008-10-30 Thread Chris Hanson
On Oct 30, 2008, at 6:30 PM, Peter N Lewis wrote: About the biggest issue is that you cannot have C++ objects in an Objective C object (their constructors and destructors wont be called). You can enable this for code that targets Tiger and later using the Call C++ Default Ctors/Dtors in

Re: When and how often do you mix C++ with Objective C in your project?

2008-10-30 Thread Colin Barrett
On Thu, Oct 30, 2008 at 4:33 PM, Boon Chew [EMAIL PROTECTED] wrote: Hi all, I am a newbie to the cocoa world (PC - Mac switcher). I have a fair amount of experience coding in C and C++ and I am just getting into Obj C now. Right now I am trying to learn the language idioms and patterns in

Re: NSOperationQueue broken?

2008-10-30 Thread Colin Barrett
On Thu, Oct 30, 2008 at 5:30 PM, Michael Ash [EMAIL PROTECTED] wrote: Based on the state of the program when it crashes, it appears that the problem is caused by a race condition which occasionally causes two of the worker threads that NSOperationQueue spawns to dequeue and execute the same

Re: Need help programatically wiring up an NSTreeController to an NSOutlineView

2008-10-30 Thread Ken Tozier
On Oct 30, 2008, at 7:22 PM, Ron Lue-Sang wrote: Reverse the order here. Add the column to the outlineView and then bind it (the column). The binding for the column should be [nameColumn bind: @value toObject: tableController withKeyPath: @arrangedObjects.name options: nil]; And you

  1   2   >