Re: Normalize an NSAttributedString

2009-08-26 Thread Michael Ash
On Wed, Aug 26, 2009 at 2:59 PM, Ken Thomasesk...@codeweavers.com wrote: On Aug 26, 2009, at 1:45 PM, Michael Ash wrote: On Wed, Aug 26, 2009 at 1:21 PM, Ken Thomasesk...@codeweavers.com wrote: I'm well aware of what it means.  The question is, which exact operations on the mutable string

_subtreeDescription: What do the ampersands mean?

2009-08-26 Thread Michael A. Crawford
In the line of GDB output below, what do the ampersands following the h= and v= mean? (gdb) po [self _subtreeDescription] [ D A W#] h=-- v=-- NDView 0x10012fca0 f=(0,113,480,473) b=(-) = CALayer: 0x1001304d0 TIME drawRect: min/mean/max 0.00/0.00/0.00 ms A=autoresizesSubviews,

Re: Why I have to load nib file?

2009-08-26 Thread simone gabbriellini
Hi, Try to look at the info.plist file, there should be a link to the nib file... Simone Sent from my iPhone On 26/ago/2009, at 07.48, Agha Khan agha.k...@me.com wrote: Dear Roland King: I admit I am new to iPhone and did read that book. which I mentioned. In future I will try not to ask

NSTableView drag from Finder Problem

2009-08-26 Thread Support
I fear that I may be asking a daft question here - but I've been puzzling over this for a while now and it's confusing the hell out of me. Probably only a quick fix too! I'm trying to implement NSTableView so that files can be dragged in from Finder. The NSTableView is within an NSSplitView

How to draw over all other windows

2009-08-26 Thread Gabriel Zachmann
I would like to replicate the behavior of this little application: http://krugazor.free.fr/software/highlight/ With it, you can draw over all other windows, like on a transparent canvas. What mystifies me is that this even works with Powerpoint being in presentation mode! I have already

Question regarding parsing files and NSTask

2009-08-26 Thread Brent Smith
Hey all, Ive been trying to think of a good way around my current solution for displaying contents of a text file. Right now I basically run an NSTask on tail -f and that's about it. I plan on redoing this section of the code to allow the scroll view to go all the way back to the beginning of the

Re: Autoscroll NSTableView

2009-08-26 Thread Thomas Willson
I have a related question; I wanted to figure out if the text view was scrolled to the bottom. I found this in the archives: Compare the -visibleRect to the -bounds of the text view. If the visible rect is at the end of the bounds, the user can see the end. Otherwise the user can not.

Re: NSTableView drag from Finder Problem

2009-08-26 Thread Nick Zitzmann
On Aug 26, 2009, at 10:10 AM, Support wrote: I can see from the debug that the init function is called and that the dragged types are therefore registered. Alas, ValidateDrop and AcceptDrop are never called. Does anyone have any idea what I've done wrong? Are you **really** sure it's

Re: NSSplitView resizing

2009-08-26 Thread Brandon Walkin
This can be done completely in IB if you use BWToolkit. http://brandonwalkin.com/bwtoolkit/ Demo video: http://brandonwalkin.com/blog/videos/iCalSplitView.mov Brandon On 2009-08-26, at 11:48 AM, Oftenwrong Soong wrote: Hi all, I have a window containing a NSSplitView. When the window is

Problem building for 10.4 on 10.6

2009-08-26 Thread Greg Hoover
Has anyone seen an error in XCode like this: GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file NSString+extras.m) I remove the referenced file and another pops up. I can build using the 10.5 SDK, but attempting to build with 10.4 doesn't seem to work. Thanks, Greg

Re: Problem building for 10.4 on 10.6

2009-08-26 Thread Glenn L. Austin
On Aug 26, 2009, at 8:41 PM, Greg Hoover wrote: Has anyone seen an error in XCode like this: GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file NSString+extras.m) I remove the referenced file and another pops up. I can build using the 10.5 SDK, but attempting to build with 10.4

Re: Problem building for 10.4 on 10.6

2009-08-26 Thread Ken Thomases
On Aug 26, 2009, at 10:41 PM, Greg Hoover wrote: Has anyone seen an error in XCode like this: GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file NSString+extras.m) I remove the referenced file and another pops up. I can build using the 10.5 SDK, but attempting to build with 10.4

Re: NSSplitView resizing

2009-08-26 Thread Oftenwrong Soong
On Wednesday, August 26, 2009 8:22:24 PM, Brandon Walkin bwal...@gmail.com wrote: This can be done completely in IB if you use BWToolkit. http://brandonwalkin.com/bwtoolkit/ Demo video: http://brandonwalkin.com/blog/videos/iCalSplitView.mov Brandon Wow, that is a *really* impressive

Re: Problem building for 10.4 on 10.6

2009-08-26 Thread Greg Hoover
Thanks, I knew it had to be something simple that I was overlooking. On Aug 26, 2009, at 8:50 PM, Glenn L. Austin wrote: On Aug 26, 2009, at 8:41 PM, Greg Hoover wrote: Has anyone seen an error in XCode like this: GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file NSString+extras.m)

Re: Syntax Coloring?

2009-08-26 Thread Uli Kusterer
On Aug 25, 2009, at 5:13 AM, Rob Keniger wrote: On 25/08/2009, at 11:36 AM, Keitaroh Kobayashi wrote: Anyways, I was thinking I could keep the basic flex part, and apply it only to the changed portions of the text. The problem with that is that I would have to check for quotes and record

Re: [IPhone 3.0] How do I make a UITextField the first responder?

2009-08-26 Thread Thomas Mueller
That's where I'm doing it and it works fine for me. Thomas 2009/8/25 Andy Lee ag...@mac.com: On Aug 25, 2009, at 9:34 AM, Luke the Hiesterman wrote: On Aug 25, 2009, at 6:33 AM, Andy Lee wrote: You seem to be right about this part -- becomeFirstResponder doesn't bring up the keyboard

Re: Normalize an NSAttributedString

2009-08-26 Thread Alastair Houghton
On 26 Aug 2009, at 00:56, Martin Wierschin wrote: Note that there is an issue with this approach, which is that attribute runs that start in the middle of a grapheme cluster might result in odd behaviour wrt normalisation. However, it generally doesn't make sense to have such an attribute

Re: Binding exception on Tiger

2009-08-26 Thread Ken Thomases
On Aug 25, 2009, at 2:02 PM, James Walker wrote: When my app ran on Tiger, there was an NSInvalidArgumentException with the reason: -observeValueForKeyPath:ofObject:change:context: only defined for abstract class. Define -[NSCFString observeValueForKeyPath:ofObject:change:context:]!

Re: Normalize an NSAttributedString

2009-08-26 Thread Ken Thomases
On Aug 25, 2009, at 7:21 PM, Ross Carter wrote: I haven't tried it, but this should work: NSAttributedString* original = whatever; NSMutableAttributedString* normalized = [[original mutableCopy] autorelease]; CFMutableStringRef str = (CFMutableStringRef)[original mutableString];

Using shortcuts and FirstResponder

2009-08-26 Thread Reinhard Segeler
Hallo, I have a serious problem with using Apple's default shortcuts, that are assigned in IB - standard and individual menuItems. None of the standard items is called, if I don't integrate them in my performKeyEquivalent method and tell what has to be done with them. The app crashes because the

Re: How is Open Recent identified and populated?

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 12:18 AM, Jerry Krinock wrote: On 2009 Aug 25, at 16:43, Jeff Johnson wrote: http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-part-5-open-recent-menu/ So, maybe Interface Builder sends _setMenuName:@NSRecentDocumentsMenu to the submenu of its Open

Re: Selection highlight in NSTextFieldCell

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 1:30 AM, bryscomat wrote: So if there's no way to do that, on to my next question. Is there a way to change the color the highlighted portion of text, i.e. the text is normally white, but the highlighted portion of the text will be black. Have you tried the

Re: [IPhone 3.0] How do I make a UITextField the first responder?

2009-08-26 Thread Brian Bruinewoud
Ok, apologies to Georg. That does work. My fingers still type 'NS' by default sometimes, it seems :( Thanks all. On 25/08/2009, at 23:02 , Andy Lee wrote: On Aug 25, 2009, at 8:28 AM, Brian Bruinewoud wrote: On 25/08/2009, at 20:42 , Georg C. Brückmann wrote: On 25.08.2009, at 12:30, Brian

Performance Issue with Drawing PDFPages on NSView

2009-08-26 Thread Naresh Kongara
Hi , I'm drawing the pages from the pdf document onto an NSVIew. The fallowing method draws all the pages from the document in a View, this method will be called from the view's drawrect. Its taking much time when there are more than 40 pages as all the pages needs to be displayed at a

How to create GPS enabled Iphone application?

2009-08-26 Thread rethish
Hi I need to create GPS enabled Iphone application which is to display the nearby hotels and other facilities. How can I do it? I am using iphone sdk 2.2 Thank you in advance ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 8:34 AM, rethish wrote: I need to create GPS enabled Iphone application which is to display the nearby hotels and other facilities. How can I do it? Broad question? Broad answer: 1 - Familiarize yourself with the platform and its capabilities via its documentation.

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Jeffrey Oleander
On Wed, 2009/08/26, rethish reth...@newtok.com wrote: From: rethish reth...@newtok.com Subject: How to create GPS enabled Iphone application? To: Cocoa Dev Cocoa-dev@lists.apple.com Date: Wednesday, 2009 August 26, 07:34 I need to create GPS enabled Iphone application which is to display

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Luke the Hiesterman
Read: http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html Luke On Aug 26, 2009, at 6:27 AM, Jeffrey Oleander wrote: On Wed, 2009/08/26, rethish reth...@newtok.com wrote: From: rethish reth...@newtok.com Subject: How to create GPS

Re: Selection highlight in NSTextFieldCell

2009-08-26 Thread bryscomat
Have you tried the documentation? NSTextFieldCell is an NSCell, right? -[NSCell highlightColorWithFrame:inView:] Yes, I came across this in the documentaion. After playing with it for a little bit (and a couple other methods like it) I thought it was just not honored in an

Re: Selection highlight in NSTextFieldCell

2009-08-26 Thread Kyle Sluder
On Aug 26, 2009, at 6:34 AM, bryscomat brysco...@gmail.com wrote: Yes, I came across this in the documentaion. After playing with it for a little bit (and a couple other methods like it) I thought it was just not honored in an NSTextFieldCell. That method never gets called when I override

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Jeffrey Oleander
On Wed, 2009/08/26, Luke the Hiesterman luket...@apple.com wrote: From: Luke the Hiesterman luket...@apple.com Subject: Re: How to create GPS enabled Iphone application? To: Jeffrey Oleander jgo...@yahoo.com Cc: Cocoa Dev Cocoa-dev@lists.apple.com, rethish reth...@newtok.com Date: Wednesday,

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 10:19 AM, Jeffrey Oleander wrote: Thanks. I filed feed-back against the docs, because the info on how to positively stop the iPhone from transmitting GPS location data to the cell is not there. Huh? That's because it's a user setting. And a sensitive one, too. I

Cocoaheads Bonn meeting tomorrow CANCELED

2009-08-26 Thread Stefan Wolfrum
Hi all, just a short notice: our 10th meeting (CocoaHeads chapter Bonn, Germany) that was planned for tomorrow (2009-08-27, 1900 GMT+2) was canceled! The next meeting will be on 2009-09-24 (the usual last Thursday each month). See http://cocoaheads-bonn.de for details. Happy coding,

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Luke the Hiesterman
As stated, the application doesn't get to decide whether location services are on or off. It can only request them or not request them. Also, the user can override an application's request for location info. Luke On Aug 26, 2009, at 7:23 AM, I. Savant wrote: On Aug 26, 2009, at 10:19 AM,

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Jeffrey Oleander
On Wed, 2009/08/26, Luke the Hiesterman luket...@apple.com wrote: From: Luke the Hiesterman luket...@apple.com Subject: Re: How to create GPS enabled Iphone application? To: I. Savant idiotsavant2...@gmail.com Cc: Jeffrey Oleander jgo...@yahoo.com, Cocoa Dev Cocoa-dev@lists.apple.com Date:

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 11:33 AM, Jeffrey Oleander wrote: That's not my question. Can a USER shut off broadcasting of his location to the cell(s), either directly via a nice big hardware switch with an indicator light (and, preferably, a switch that makes a nice audio and tactile clunk like a

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Pat Homelvig
System wide user setting: Settings App-General-Location Services. Toggle switch turns it off. Also as stated, you should not be able to turn on / off location services system wide via API. It can be requested if it is needed, and the user is notified of this, so they can decide if they want to

Re: Normalize an NSAttributedString

2009-08-26 Thread Michael Ash
On Wed, Aug 26, 2009 at 5:42 AM, Ken Thomasesk...@codeweavers.com wrote: On Aug 25, 2009, at 7:21 PM, Ross Carter wrote: I haven't tried it, but this should work:        NSAttributedString* original = whatever;        NSMutableAttributedString* normalized = [[original mutableCopy]

NSSplitView resizing

2009-08-26 Thread Oftenwrong Soong
Hi all, I have a window containing a NSSplitView. When the window is resized, both panes of the split view resize proportionally. I would like one pane to remain fixed while the other resizes. Xcode does this, as well as iCal and other apps. Is there a delegate method that does this or must I

Re: NSSplitView resizing

2009-08-26 Thread Benjamin Stiglitz
I have a window containing a NSSplitView. When the window is resized, both panes of the split view resize proportionally. I would like one pane to remain fixed while the other resizes. Xcode does this, as well as iCal and other apps. Is there a delegate method that does this or must I

Re: Normalize an NSAttributedString

2009-08-26 Thread Douglas Davidson
On Aug 26, 2009, at 1:30 AM, Alastair Houghton wrote: On 26 Aug 2009, at 00:56, Martin Wierschin wrote: Note that there is an issue with this approach, which is that attribute runs that start in the middle of a grapheme cluster might result in odd behaviour wrt normalisation. However, it

Re: NSSplitView resizing

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 11:48 AM, Oftenwrong Soong wrote: I have a window containing a NSSplitView. When the window is resized, both panes of the split view resize proportionally. I would like one pane to remain fixed while the other resizes. Xcode does this, as well as iCal and other apps.

Re: NSSplitView resizing

2009-08-26 Thread jonat...@mugginsoft.com
On 26 Aug 2009, at 16:48, Oftenwrong Soong wrote: Hi all, I have a window containing a NSSplitView. When the window is resized, both panes of the split view resize proportionally. I would like one pane to remain fixed while the other resizes. Xcode does this, as well as iCal and other

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Clark Cox
On Wed, Aug 26, 2009 at 8:33 AM, Jeffrey Oleanderjgo...@yahoo.com wrote: On Wed, 2009/08/26, Luke the Hiesterman luket...@apple.com wrote: From: Luke the Hiesterman luket...@apple.com Subject: Re: How to create GPS enabled Iphone application? To: I. Savant idiotsavant2...@gmail.com Cc:

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Luke the Hiesterman
On Aug 26, 2009, at 8:33 AM, Jeffrey Oleander wrote: On Wed, 2009/08/26, Luke the Hiesterman luket...@apple.com wrote: From: Luke the Hiesterman luket...@apple.com Subject: Re: How to create GPS enabled Iphone application? To: I. Savant idiotsavant2...@gmail.com Cc: Jeffrey Oleander

Beep

2009-08-26 Thread DKJ
Once upon a time, there was a computer language called BASIC. It was installed in just about every computer; usually with a soldering iron. And a favourite beginner programmer project was getting the computer to emit sounds when keys were pressed. As I recall, there was something like a

Re: Beep

2009-08-26 Thread Sumanth Peddamatham
NSBeep(). http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Miscellaneous/AppKit_Functions/Reference/reference.html#/ /apple_ref/c/func/NSBeep Best, Sumanth P. On Aug 26, 2009, at 12:47 PM, DKJ wrote: Once upon a time, there was a computer language called BASIC. It

Re: Beep

2009-08-26 Thread Kyle Sluder
On Wed, Aug 26, 2009 at 9:47 AM, DKJhatzicw...@shaw.ca wrote: Have I missed something simple? If so, please point me to the right place in the docs. No you haven't missed anything. You're going to need to generate and feed PCM samples to the audio hardware. You'll want to ask the

Re: Beep

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 12:47 PM, Sumanth Peddamatham wrote: NSBeep(). http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Miscellaneous/AppKit_Functions/Reference/reference.html#//apple_ref/c/func/NSBeep That doesn't let you control frequency or duration. It merely

Re: Beep

2009-08-26 Thread Randall Meadows
On Aug 26, 2009, at 10:47 AM, Sumanth Peddamatham wrote: NSBeep(). I've been searching though the iPhone audio API ^^ Impedance mismatch. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Resize Text Field When Wraps

2009-08-26 Thread Mr. Gecko
Hello, I'm trying to resize a text field height when it wraps but I'm having a problem. I tried using [[self cell] cellSize] but it's only working when I push return and I need to get the height of it with the wraps. How might I do that? Thanks for the help, Mr. Gecko.

Re: Normalize an NSAttributedString

2009-08-26 Thread Ken Thomases
On Aug 26, 2009, at 10:43 AM, Michael Ash wrote: On Wed, Aug 26, 2009 at 5:42 AM, Ken Thomasesk...@codeweavers.com wrote: On Aug 25, 2009, at 7:21 PM, Ross Carter wrote: I haven't tried it, but this should work: NSAttributedString* original = whatever;

SUUpdater == nil, only on 64-bit, when created inside framework (crazy!)

2009-08-26 Thread Steven Degutis
Hello, I've isolated a very strange issue that I'm having with Sparkle's SUUpdater, though the issue is more to do with 64-bit and how frameworks work, I think. My apps all use a common framework SDToolkit, which has an App Delegate superclass that does a lot of work for me, called

[iphone] UIScrollView event handling

2009-08-26 Thread Dragos Ionel
Hi, I have a UIVew that contains a UIScrollView. UIScrollView is handling tap events, by moving the photos. I would like to be able to handle swipe events in the UIView (the parent of the scroll view). Is it possible? Thanks a lot, Dragos ___

Re: SUUpdater == nil, only on 64-bit, when created inside framework (crazy!)

2009-08-26 Thread Kyle Sluder
On Wed, Aug 26, 2009 at 10:42 AM, Steven Degutissteven.degu...@gmail.com wrote: I have verified that the Sparkle framework bundle is in fact 64-bit (excepting ppc64) and my SDToolkit is as well. How have you verified this? Are you getting any console logs (especially from dlopen_preflight)?

QLGenerator PLUGIN_ID

2009-08-26 Thread David Blanton
My QLGenerator PLUGIN_ID is defined as: #define PLUGIN_ID 5183C784-F224-4D1E-81A2-3DDB63C867D1 (Generated by Xcode) My Generator is not working. When I run qlmanange -t filename.xxx I get Cannot find function pointer QuickLookGeneratorPluginFactory for factory

Re: Binding exception on Tiger

2009-08-26 Thread James Walker
Ken Thomases wrote: On Aug 25, 2009, at 2:02 PM, James Walker wrote: When my app ran on Tiger, there was an NSInvalidArgumentException with the reason: -observeValueForKeyPath:ofObject:change:context: only defined for abstract class. Define -[NSCFString

Re: Normalize an NSAttributedString

2009-08-26 Thread Michael Ash
On Wed, Aug 26, 2009 at 1:21 PM, Ken Thomasesk...@codeweavers.com wrote: On Aug 26, 2009, at 10:43 AM, Michael Ash wrote: On Wed, Aug 26, 2009 at 5:42 AM, Ken Thomasesk...@codeweavers.com wrote: On Aug 25, 2009, at 7:21 PM, Ross Carter wrote: I haven't tried it, but this should work:      

Re: QLGenerator PLUGIN_ID

2009-08-26 Thread Nick Zitzmann
On Aug 26, 2009, at 12:20 PM, David Blanton wrote: Which implies to me the systems is looking for a PLUGIN_ID 011FBC8A- E945-457D-8252-98120F9C9D8C Why would this be? IIRC, the plugin factory ID must also be written in the info.plist file. Are you sure it's written correctly in there?

Re: Normalize an NSAttributedString

2009-08-26 Thread Ken Thomases
On Aug 26, 2009, at 1:45 PM, Michael Ash wrote: On Wed, Aug 26, 2009 at 1:21 PM, Ken Thomasesk...@codeweavers.com wrote: I'm well aware of what it means. The question is, which exact operations on the mutable string proxy does CFStringNormalize perform. If CFStringNormalize performs the

Re: F-Script 2.0 available

2009-08-26 Thread Philippe Mougin
Thanks André. I know of several people using F-Script to learn Cocoa and I've got a few reports of children having used it as their first programming language. Smalltalk + Cocoa... that's a rather yummy start! Anyway, for those interested, I think these are the two tutorials that make the

Re: Performance Issue with Drawing PDFPages on NSView

2009-08-26 Thread John Calhoun
On Aug 26, 2009, at 4:20 AM, Naresh Kongara wrote: I'm drawing the pages from the pdf document onto an NSVIew. The fallowing method draws all the pages from the document in a View, this method will be called from the view's drawrect. Its taking much time when there are more than 40 pages

Re: F-Script 2.0 available

2009-08-26 Thread André Berg
Am 26.08.2009 um 21:04 schrieb Philippe Mougin: I've got a few reports of children having used it as their first programming language. Smalltalk + Cocoa... that's a rather yummy start! Hey what a coincidence! I was just watching the Allan Key documentary where he explains how children

Help viewer problem in Tiger Mac OS X

2009-08-26 Thread Arun
Hi All, I am using .help files to provide help for my application. My application help is localised. In tiger when i switch the languages, always the help viewer launches the help in english. But in leopard as the language the help viewer displays the help pages. Does anyone know or has an idea

Re: Help viewer problem in Tiger Mac OS X

2009-08-26 Thread Ken Thomases
On Aug 26, 2009, at 3:25 PM, Arun wrote: I am using .help files to provide help for my application. My application help is localised. In tiger when i switch the languages, always the help viewer launches the help in english. But in leopard as the language the help viewer displays the help

Autoscroll NSTableView

2009-08-26 Thread PCWiz
How do I make it so that an NSTableView automatically scrolls to the bottom as new rows are added to it? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Autoscroll NSTableView

2009-08-26 Thread Corbin Dunn
On Aug 26, 2009, at 2:17 PM, PCWiz wrote: How do I make it so that an NSTableView automatically scrolls to the bottom as new rows are added to it? There is no automatic way; you have to add code to do it. You should probably only do it if the prior row was scrolled to the bottom.

Making failed NSAsserts crash an app

2009-08-26 Thread Squ Aire
I am planning on using one of the nice crash reporter code/frameworks that are available on the internet that allow me to do stuff that I have seen in many Mac apps. Namely, to allow the user to more easily send me a crash log (plus some user comments on what the user was doing when the app

Cross-user and cross-process shared settings

2009-08-26 Thread Dave DeLong
Hi everyone, I have two processes - a user process and a root-level LaunchDaemon. I'd like both processes to have shared settings. I've tried getting this to work via a sqlite database, but have run into corruption issues. I've thought about using NSUserDefaults, but the

Re: QLGenerator PLUGIN_ID [SOLVED]

2009-08-26 Thread David Blanton
I had the generator stripped using project settings. I added a run script to do strip -u -r (which according to the strip docs should be OK). It was this additional strip that caused the problem. Removing the run script strip and leaving the project settings strip and the generator ran

Re: Autoscroll NSTableView

2009-08-26 Thread PCWiz
Thanks, that code worked perfectly. On 2009-08-26, at 3:26 PM, Corbin Dunn wrote: On Aug 26, 2009, at 2:17 PM, PCWiz wrote: How do I make it so that an NSTableView automatically scrolls to the bottom as new rows are added to it? There is no automatic way; you have to add code to do it.

Re: QLGenerator PLUGIN_ID [SOLVED]

2009-08-26 Thread Nick Zitzmann
On Aug 26, 2009, at 3:58 PM, David Blanton wrote: I had the generator stripped using project settings. I added a run script to do strip -u -r (which according to the strip docs should be OK). It was this additional strip that caused the problem. Removing the run script strip and leaving

Re: Cross-user and cross-process shared settings

2009-08-26 Thread Dave Keck
I've tried reading and writing an XML file directly, and I can get this to work fine with multiple threads (via a simple NSLock), but when I attempt to apply an O_EXLOCK to the file to prevent one process from writing to the file while the other is, but it doesn't seem to be working. How

Re: Cross-user and cross-process shared settings

2009-08-26 Thread Ken Thomases
On Aug 26, 2009, at 4:51 PM, Dave DeLong wrote: I have two processes - a user process and a root-level LaunchDaemon. I'd like both processes to have shared settings. [...] How can I effectively implement cross-process and cross-user shared settings? Have you considered using a

How to Convert #FF00FF String Specifying RGB Color to 32 bit int

2009-08-26 Thread Peter Zegelin
Hi, I have some xml where an rgb color value is specified via a #XXYYZZ type string. The xml is being read in via NSXMLParser. I can't seem to find an easy Cocoa way to convert this value to an unsigned int. I need an unsigned int rather than an NSColor as the value is used in C+ + code.

Re: Making failed NSAsserts crash an app

2009-08-26 Thread Rob Keniger
On 27/08/2009, at 7:49 AM, Squ Aire wrote: Since I absolutely want some information on whenever my NSAsserts fail (because they should NEVER fail and I want to know about it if they do! (at least during beta testing!)), my question is: How can I guarantee that a failed NSAssert will crash

NSOperation: Selector being called before process finished

2009-08-26 Thread PCWiz
Hi, I have a class which is a subclass of NSOperation, that runs a shell script with AuthorizationExecuteWithPrivileges. Something like this: // Alloc my auth class and authenticate Authentication *auth = [[Authentication alloc] init]; [auth authenticate]; // Set permissions on script and

Leaks in NSDateComponenets object.

2009-08-26 Thread Agha Khan
Hi: I have leaks in my application, and while I was googling I found http://stackoverflow.com/questions/674724/using-instruments-leaks-object-alloc-are-autoreleased-objects-counted-as-leaks where I have the same issue. Is there work around or we just have to wait until it is fixed if it is a

Re: How to Convert #FF00FF String Specifying RGB Color to 32 bit int

2009-08-26 Thread Graham Cox
On 27/08/2009, at 9:50 AM, Peter Zegelin wrote: Hi, I have some xml where an rgb color value is specified via a #XXYYZZ type string. The xml is being read in via NSXMLParser. I can't seem to find an easy Cocoa way to convert this value to an unsigned int. I need an unsigned int rather

Re: How to Convert #FF00FF String Specifying RGB Color to 32 bit int

2009-08-26 Thread Rob Keniger
On 27/08/2009, at 9:50 AM, Peter Zegelin wrote: I have some xml where an rgb color value is specified via a #XXYYZZ type string. The xml is being read in via NSXMLParser. I can't seem to find an easy Cocoa way to convert this value to an unsigned int. I need an unsigned int rather than an

Re: Making failed NSAsserts crash an app

2009-08-26 Thread Graham Cox
On 27/08/2009, at 10:00 AM, Rob Keniger wrote: You could raise exceptions instead of generating assertion failures. Exceptions are caught by several of the crash reporting frameworks. You could probably map the NSAssert macros to exception-generation code for your beta builds. The

Re: How to Convert #FF00FF String Specifying RGB Color to 32 bit int

2009-08-26 Thread Waqar Malik
Peter, I use NSScanner to parse the string to get individual values. NSRange range = NSMakeRange(1, 2); NSUInteger value = 0; [[NSScanner scannerWithString:[string substringWithRange:range]] scanHexInt:value] // WARNING: code typed in email --Waqar On Aug 26, 2009, at 4:50 PM, Peter

Re: How to Convert #FF00FF String Specifying RGB Color to 32 bit int

2009-08-26 Thread Gideon King
Here's what we use to convert from an ARGB hex value to an NSColor - you could perhaps use a similar method and just shift the bytes and or them together as required for your unsigned int. + (NSColor *)colorWithHexARGB:(NSString*)hexString { unsigned int redByte, greenByte, blueByte,

Re: NSOperation: Selector being called before process finished

2009-08-26 Thread Kyle Sluder
On Wed, Aug 26, 2009 at 5:01 PM, PCWizpcwiz.supp...@gmail.com wrote: I have a class which is a subclass of NSOperation, that runs a shell script with AuthorizationExecuteWithPrivileges. Something like this: You are not using AuthorizationExecuteWithPrivileges correctly. For security reasons,

Does touch input require rotaion also?

2009-08-26 Thread Erg Consultant
When i rotate my view 90 degrees, some of the touches I receive give weird coordinates that appear to be incorrect. Do I need to apply a transform to the touch input matrix as well as the view when I rotate it? Thanks, Erg ___ Cocoa-dev

Re: NSOperation: Selector being called before process finished

2009-08-26 Thread Kyle Sluder
No. Take a look at BetterAuthorizationSample: http://developer.apple.com/SampleCode/BetterAuthorizationSample/listing6.html I should have just sent you there in the first place, because true to form I have recommended something you shouldn't do. BAS does *not* use a setuid tool. --Kyle Sluder

Re: Leaks in NSDateComponenets object.

2009-08-26 Thread Agha Khan
Dear Erg Cosultant: Are you suggesting I should write my own DateComponenets? If your answer is yes then it makes some sense. Best regards Agha On Aug 26, 2009, at 5:37 PM, Erg Consultant wrote: There is no guarantee autorreleased objects will be free immediately - they may be freed at some