Re: NSTextField woes

2009-03-04 Thread Robert Bielik
Nick Zitzmann skrev: Did you try -setTextColor:? setTextColor sets the nominal text color of the NSTextField, works fine, but I want a *different* color when the text (or part of it) is selected in the NSTextField (for contrast) and setTextColor has nothing to do with that... /R _

Making NSTableView behave more like a spreadsheet with arrow keys

2009-03-04 Thread Dave Geering
Hi all, Is there a clean way to subclass NSTableView or the field editor to provide a way for users to change the currently editable cell in an NSTableView by pressing the arrow keys? I've already tried subclassing NSTableView but that will only be sent keyDown if a cell isn't being edited, and I'

Re: MVC - Model View Control

2009-03-04 Thread Graham Cox
On 05/03/2009, at 2:34 PM, Smith, Steven (MCP) wrote: I'm trying to do coding with adherence to MVC, but I haven't found a good reference (eg book, ebook, amazon.com, et.al.) that wraps the elements together. There are are lots of white-papers and blogs, but can any recommend a good book that '

Re: Tag-At-Selected-Item?

2009-03-04 Thread Graham Cox
On 05/03/2009, at 11:39 AM, Dave wrote: With regard to Menus and PopUpButtons; How do I get the item tag using the indexOfSelectedItem? with a pop-up button: [[popUpButton itemAtIndex:[popUpButton indexOfSelectedItem] tag]; or far more simply: [[popUpButton selectedItem] tag]; For a pl

MVC - Model View Control

2009-03-04 Thread Smith, Steven (MCP)
Hi List! I'm trying to do coding with adherence to MVC, but I haven't found a good reference (eg book, ebook, amazon.com, et.al.) that wraps the elements together. There are are lots of white-papers and blogs, but can any recommend a good book that 'glues' the ideas together. I think I understand

Caps Lock Icon in NSTextField

2009-03-04 Thread Rich Collyer
Is there a standard way to have the Caps Lock icon show up in an NSTextField? If not, is the icon available for general use, so I can place it there when I notice the state change of the caps lock key? +++ Rich Collyer - Senior Software Engineer +++

Tag-At-Selected-Item?

2009-03-04 Thread Dave
With regard to Menus and PopUpButtons; How do I get the item tag using the indexOfSelectedItem? Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mo

Re: Saving a plist file from a thumbdrive

2009-03-04 Thread Olivier Palliere
On Mar 4, 2009, at 9:49 PM, Benjamin Dobson wrote: On 4 Mar 2009, at 20:17:21, Francois Cournoyer wrote: Hi, We have an installer app that runs from the root folder of a thumbdrive like device, The installer is ran from a subfolder or from subfolder on a hard disk works correctly. The p

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread mmalc Crawford
On Mar 4, 2009, at 2:37 PM, Steve Steinitz wrote: On 4/3/09 4:40 PM, Biagio wrote: Hello. My first post. I'm learning to program using Xcode 3.1.2 in OS X Leopard. My current plan of attack is working through these books: Core Data is a wonderful, powerful technology that, to a certain exte

Re: A question about Apple Policy

2009-03-04 Thread Andrew Farmer
On 04 Mar 09, at 18:07, Development wrote: Ok I'm working on a program that allows system administrators to access some features of the OS which are otherwise not normally available. In cases where required I've followed the guidlines for using the security framework. So what concerns me is

Re: binding to number of selected rows in a table [solved]

2009-03-04 Thread James Walker
Jerry Krinock wrote: On 2009 Mar 04, at 11:39, James Walker wrote: * Add an NSMutableIndexSet* member to my controller, to store the selection. * Add KVO-friendly accessors for that index set. * Update the index set (using the setter) in the outlineViewSelectionDidChange: delegate method.

CrashReporter alternatives for third-party apps?

2009-03-04 Thread Rick Mann
Can you guys suggest something I can use to submit crash reports to my own servers (and perhaps to suppress Apple's CrashReporter)? TIA, -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

A question about Apple Policy

2009-03-04 Thread Development
Ok I'm working on a program that allows system administrators to access some features of the OS which are otherwise not normally available. In cases where required I've followed the guidlines for using the security framework. So what concerns me is because this app allows a user to make cha

Re: Checking for NULL (was "Re: Can't get setDelegate to work...")

2009-03-04 Thread Mark D. Gerl
On Mar 4, 2009, at 5:12 PM, Jeff Laing wrote: (For the record, when I add an IBOutlet to a class definition, I add the corresponding assertion that its non-nil to the awakeFromNib method because I *know* that I forget to connect those things up, and have wasted days chasing unexpected 'nil' o

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem (SOLVED)

2009-03-04 Thread Mark D. Gerl
On Mar 4, 2009, at 5:03 PM, Nick Zitzmann wrote: Yes; I pointed that out to you yesterday. You can, if you wish, turn on the warnings/errors option for your target in Xcode to treat all warnings as errors. You should also set a global breakpoint on objc_exception_throw so you can catch exce

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread Graham Cox
On 05/03/2009, at 8:01 AM, Jacob Rhoden wrote: When I was first learning, the thing that really helped getting me started is the Aaron Hillegass book I wholeheartedly second that. I think its explanation of memory management should be required reading for anyone starting out with Cocoa (

Re: binding to number of selected rows in a table [solved]

2009-03-04 Thread Jerry Krinock
On 2009 Mar 04, at 11:39, James Walker wrote: * Add an NSMutableIndexSet* member to my controller, to store the selection. * Add KVO-friendly accessors for that index set. * Update the index set (using the setter) in the outlineViewSelectionDidChange: delegate method. James, you've added

Re: Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell? [COROLLARY]

2009-03-04 Thread Luke Evans
We seem to be developing in sync at the moment ;-) I'll watch your thread to see what develops... On 4-Mar-09, at 3:04 PM, Eric Gorr wrote: On Mar 4, 2009, at 5:55 PM, Luke Evans wrote: I can get the ellipsis at the tail of the text easily enough (NSStringDrawingTruncatesLastVisibleLine),

Re: Checking for NULL (was "Re: Can't get setDelegate to work...")

2009-03-04 Thread Greg Parker
On Mar 4, 2009, at 2:40 PM, Stuart Malin wrote: On Mar 4, 2009, at 12:15 PM, cocoa-dev-requ...@lists.apple.com wrote: In any case, and perhaps based purely on habit, I find it difficult to even write: NSStatusItem statusItem = [[[NSStatusBar systemStatusBar] status

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread Biagio
Everyone, This is EXACTLY the guidance I was hoping and crossing my fingers for. I hesitated to write a "thank you" so as to keep the noise on the list to a minimum, but as a newbie who was (honestly) nervous about posting, you've been incredibly welcoming and encouraging. Just wanted to say tha

Re: Checking for NULL (was "Re: Can't get setDelegate to work...")

2009-03-04 Thread Clark Cox
On Wed, Mar 4, 2009 at 2:40 PM, Stuart Malin wrote: > > On Mar 4, 2009, at 12:15 PM, cocoa-dev-requ...@lists.apple.com wrote: > >> In any case, and perhaps based purely on habit, I find it difficult to >> even write: >> >>        NSStatusItem statusItem = [[[NSStatusBar systemStatusBar] >>        

Re: Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell? [COROLLARY]

2009-03-04 Thread Eric Gorr
On Mar 4, 2009, at 5:55 PM, Luke Evans wrote: Flushed with some semblance of success I'm now trying to get Finder's behaviour with inserting centre ellipses when the text is too large for its container. I can get the ellipsis at the tail of the text easily enough (NSStringDrawingTruncate

Re: Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell? [COROLLARY]

2009-03-04 Thread Luke Evans
Flushed with some semblance of success I'm now trying to get Finder's behaviour with inserting centre ellipses when the text is too large for its container. I can get the ellipsis at the tail of the text easily enough (NSStringDrawingTruncatesLastVisibleLine), and I thought I had a bead o

Re: Checking for NULL (was "Re: Can't get setDelegate to work...")

2009-03-04 Thread Stuart Malin
On Mar 4, 2009, at 12:15 PM, cocoa-dev-requ...@lists.apple.com wrote: In any case, and perhaps based purely on habit, I find it difficult to even write: NSStatusItem statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread Steve Steinitz
Hi Biagio On 4/3/09, cocoa-dev-requ...@lists.apple.com wrote: would just like some guidance as to where to focus my attention after I get through the above books. Any thoughts would be much appreciated. Core Data is a wonderful, powerful technology that, to a certain extent, makes persisten

Re: Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell? [SOLVED]

2009-03-04 Thread Luke Evans
OK. I managed to get things working. The main feature of the change was simply to create an NSScrollView when editing starts and drop the acquired and configured NSTextView inside it. This was actually very straight forward - and finding that bit of documentation provided the confidence t

RE: Checking for NULL (was "Re: Can't get setDelegate to work...")

2009-03-04 Thread Jeff Laing
Mark D. Gerl asked: > There's something that's just "uncomfortable" about dereferencing > pointers without first checking for validity. Is it just me? I don't think its just you, though most Cocoa types eventually give up and go with the simpler 'just trust it, it works' approach. Personally,

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem (SOLVED)

2009-03-04 Thread Nick Zitzmann
On Mar 4, 2009, at 2:53 PM, Mark D. Gerl wrote: DOH! Spelling error. I never noticed the wee warning triangle next to the call - I spelled "delegate" wrong. I do miss C++ compiler errors! Serves me right for not looking closer at the runlog: Yes; I pointed that out to you yesterday. Y

Doing NSStringDrawingTruncatesLastVisibleLine with NSLayoutManger

2009-03-04 Thread Eric Gorr
I am drawing a string with a NSLayoutManager by doing: [layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:NSMakePoint( [self bounds].origin.x,[self bounds].origin.y )]; What I would like is if the string I am drawing goes beyond the last visible line, is for the string to draw a tru

Re: CoreData and NSUndoManager/Undo Grouping...

2009-03-04 Thread Jean-Nicolas Jolivet
Well, I have absolutely no idea why I managed to get it to work but, all I did was this: Changed this code: - (IBAction)saveChanges:(id)sender { [[[myDoc managedObjectContext] undoManager] endUndoGrouping]; [[[myDoc managedObjectContext] undoManager] setActionName:@"Item Editing"];

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem (SOLVED)

2009-03-04 Thread Mark D. Gerl
On Mar 3, 2009, at 2:30 PM, Mark D. Gerl wrote: // *** DOING this causes the menu to NOT pop down *** [menu setDeligate:menuController]; DOH! Spelling error. I never noticed the wee warning triangle next to the call - I spelled "delegate" wrong. I do miss C++ compiler er

Re: Checking for NULL (was "Re: Can't get setDelegate to work...")

2009-03-04 Thread Shawn Erickson
On Wed, Mar 4, 2009 at 12:57 PM, Mark D. Gerl wrote: > In any case, and perhaps based purely on habit, I find it difficult to even > write: > >        NSStatusItem statusItem = [[[NSStatusBar systemStatusBar] >                statusItemWithLength:NSVariableStatusItemLength] retain]; > > ...in fav

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread Jacob Rhoden
Hi, When I was first learning, the thing that really helped getting me started is the Aaron Hillegass book. This book should be enough to get you to the point where you can write basic applications. Once you have conquered the book, then the apple documentation at http://developer.apple.com/

NSButton image drawn 1 pixel too high

2009-03-04 Thread James Walker
I guess I'm being picky, but it bugs me... I have a 23x23 square button, displaying a 17x17 image, with NSImageOnly positioning. It should center perfectly, with 2 pixels between the image and the border on each side, but in fact there's 1 pixel above and 3 below. I can work around it by subc

Checking for NULL (was "Re: Can't get setDelegate to work...")

2009-03-04 Thread Mark D. Gerl
On Mar 4, 2009, at 12:11 AM, Michael Ash wrote: On Tue, Mar 3, 2009 at 4:30 PM, Quincey Morris wrote: On Mar 3, 2009, at 12:50, Nick Zitzmann wrote: It doesn't seem to be documented, but I think it will return nil only if (1) there was not enough contiguous RAM in the program's VM space to

Re: Saving a plist file from a thumbdrive

2009-03-04 Thread Benjamin Dobson
On 4 Mar 2009, at 20:17:21, Francois Cournoyer wrote: Hi, We have an installer app that runs from the root folder of a thumbdrive like device, The installer is ran from a subfolder or from subfolder on a hard disk works correctly. The problem is when it runs from the root of the thumbdrive

Re: Date parsing problem (when running on iphone only)

2009-03-04 Thread Jacob Rhoden
On 5/3/09 2:42 AM, Christopher Kane wrote: It seems that if you have your Regional settings to Chinese the date is not parsed. What is the proper way to parse an "English" formatted date? Yes, the date formatter you're creating defaults to using the user's locale, which can have settings which

Re: NSTextField woes

2009-03-04 Thread David Blanton
the following works for me ... NSMutableParagraphStyle *ps; ps = [[NSMutableParagraphStyle alloc] init]; [ps setAlignment:NSLeftTextAlignment]; _leftAlign = [[NSDictionary alloc] initWithObjectsAndKeys: [NSFont systemFontOfSiz

Re: Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell?

2009-03-04 Thread Eric Gorr
On Mar 4, 2009, at 2:37 PM, Luke Evans wrote: Thanks Eric. It makes sense, I suppose, that NSTextView wouldn't have an built-in way to do this - it just acts as a 'sheet' of text over which you must create a viewport in the form of a scroll view. Actually, I've _literally_ just bumped in

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread Ryan Thompson
Hi Biagio As a just-barely-ex-newbie myself I felt compelled to reply to this one. Although learning C is nice, you don't necessarily need a good knowledge of C programming to learn Obj-C. I did some very lightweight C in university a long time ago, but it was more than enough to get started wit

Re: NSTextField woes

2009-03-04 Thread Nick Zitzmann
On Mar 4, 2009, at 12:13 PM, Robert Bielik wrote: but noo... I can't get anything but the default color, i.e. same as the normal text color. Ideas? Did you try -setTextColor:? Nick Zitzmann ___ Cocoa-dev mailing l

NSTextField woes

2009-03-04 Thread Robert Bielik
Hi all, I have a NSTextField in which I'd like to change the selected text color. From various sources I've got this: NSTextView* tv = (NSTextView*)[[m_nstextfield window] fieldEditor:YES forObject:m_nstextfield]; [tv setSelectedTextAttributes:[NSDictionary dictionaryWithObject:[NSColor black

Re: binding to number of selected rows in a table [solved]

2009-03-04 Thread James Walker
Thanks to Jerry Krinock, Sean McBride, and Corbin Dunn for the replies. NSTreeController didn't seem to be a good fit for my data, so here's how I did it: * Add an NSMutableIndexSet* member to my controller, to store the selection. * Add KVO-friendly accessors for that index set. * Update the

Re: Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell?

2009-03-04 Thread Luke Evans
Thanks Eric. It makes sense, I suppose, that NSTextView wouldn't have an built-in way to do this - it just acts as a 'sheet' of text over which you must create a viewport in the form of a scroll view. Actually, I've _literally_ just bumped into the reference below, while writing this: ht

Re: binding to number of selected rows in a table

2009-03-04 Thread Jerry Krinock
On 2009 Mar 04, at 08:21, Corbin Dunn wrote: Cocoa does not support binding to view properties like this. Most are not KVC compliant. But you can make them KVO-compliant as I described yesterday. It's a slight kludge, but I think of it as a necessary "bridge" from the old world of dataS

Re: Odd crash

2009-03-04 Thread has
Reza Farhad wrote: Paul I switched on Guard Malloc from the Run Menu in Xcode It appears that I am getting the crash for a call that is trying to load an AppleScript. NSDictionary*errors = [ NSDictionary dictionary ]; NSAppleScript *script = [[ NSAppleScript alloc ] init

Re: Changing NSTableView cell immediately before editing [solved?]

2009-03-04 Thread K. Darcy Otto
Thanks Corbin and Paul. I am using the windowWillReturnFieldEditor:toObject: delegate method, testing to see if anObject is a DeductionTable (a subclass of NSTextView), and testing to see if the first responder is an NSTextView, and then changing the textColor of the first responder to bla

Re: Sheet not ending

2009-03-04 Thread Mr. Gecko
I did some more searching and I finally found that I needed to order out the window. - (IBAction)postComment:(id)sender { [commentView setString:@""]; [countField setStringValue:@"500 Remaining"]; [[NSApplication sharedApplication] beginSheet:postCommentWindow modalForWindow:

Re: All my leaks are gone... but now a memory warning?!

2009-03-04 Thread Shawn Erickson
On Tue, Mar 3, 2009 at 7:49 PM, Roland King wrote: > You said "when I debug on the device one of my screens is getting memory > warning". What is a 'memory warning', what is the text of the warning you > are receiving, what does it say? He is talking about UIKit (iPhone) which has things like the

Re: Sheet not ending

2009-03-04 Thread Nick Zitzmann
On Mar 4, 2009, at 10:45 AM, Mr. Gecko wrote: - (IBAction)postComment:(id)sender { [commentView setString:@""]; [countField setStringValue:@"500 Remaining"]; [[NSApplication sharedApplication] beginSheet:postCommentWindow modalForWindow:commentWindow modalDelegate:nil didEndS

Re: Sheet not ending

2009-03-04 Thread Gerd Knops
On Mar 4, 2009, at 11:45 AM, Mr. Gecko wrote: Hello, I'm finding something weird. I am writing an application that posts comments. I am able to open the sheet and I have a post and cancel button, they work when you push them, but when I call endSheet with NSApplication, it doesn't end unti

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-04 Thread Andy Lee
On Mar 3, 2009, at 2:30 PM, Mark D. Gerl wrote: SampleController *menuController = [[[SampleController alloc] init] autorelease]; [menu setAutoenablesItems:NO]; NSMenuItem *it

Sheet not ending

2009-03-04 Thread Mr. Gecko
Hello, I'm finding something weird. I am writing an application that posts comments. I am able to open the sheet and I have a post and cancel button, they work when you push them, but when I call endSheet with NSApplication, it doesn't end until you quit the application. Here is my code belo

Re: SyncServices ...

2009-03-04 Thread Nick Zitzmann
On Mar 4, 2009, at 3:07 AM, Mic Pringle wrote: I've been searching around for sometime trying to find an example of using sync services with Safari's bookmarks. Does anyone know of one, or any information that may help with this particular task ? Just look at the sample code in /Developer/Exa

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-04 Thread Nick Zitzmann
On Mar 4, 2009, at 9:42 AM, Mark D. Gerl wrote: Any ideas??? I'm still stuck. I already pointed out several problems with your code. But let me show you what worked for me: NSMenu *statusMenu = [[[NSMenu allocWithZone:[NSMenu menuZone]] init] autorelease]; _statusItem = [[[

View Caching Issues and Questions

2009-03-04 Thread James Cicenia
Hello - I am a bit confused on when or why a view is cached and what is the best possible way to clear it. First: I have a UITabBarController. The views that this brings up are cached. This is actually great as I can test to see if something is changed and if so, do nothing and it brings

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-04 Thread Mark D. Gerl
On Mar 3, 2009, at 2:30 PM, Mark D. Gerl wrote: On Mar 3, 2009, at 11:52 AM, Nick Zitzmann wrote: Can you please show your code? I've done this before, and it worked when I tried it. SURE, see below. I should point out that I've also tried implementing other delegate methods, with no luc

Re: binding to number of selected rows in a table

2009-03-04 Thread Corbin Dunn
On Mar 3, 2009, at 6:38 PM, James Walker wrote: I want to use bindings to set certain control attributes (enabled state, tool tip) depending on the number of selected rows in an outline table. I have a controller object that owns an NSOutlineView, and I gave it an accessor - (NSOutlineV

Re: Odd crash

2009-03-04 Thread Sean McBride
On 3/4/09 3:36 PM, Reza Farhad said: >Also is it a bad idea to leave MallocStackLogging, >MallocStackLoggingNoCompact, MallocScribble in the release version. They are environment variables, so do not affect the compilation/linking of your app. You can and should test both your debug and release

Re: Date parsing problem (when running on iphone only)

2009-03-04 Thread Christopher Kane
On Mar 4, 2009, at 4:22 AM, Jacob Rhoden wrote: On 4/3/09 10:15 PM, Jacob Rhoden wrote: Anyone experience this weird behaviour with date parsing? Given the following code, it produces a different log output when running in the simulator or on the iPhone!!! NSString* test = @"Monday 26 J

Re: Odd crash

2009-03-04 Thread Reza Farhad
Paul I switched on Guard Malloc from the Run Menu in Xcode It appears that I am getting the crash for a call that is trying to load an AppleScript. NSDictionary*errors = [ NSDictionary dictionary ]; NSAppleScript *script = [[ NSAppleScript alloc ] initWithContentsOfURL:url er

[Q] Responder Chain & makeFirstResponder

2009-03-04 Thread Eric Gorr
The documentation for NSWindow's makeFirstResponder states: If responder does not accept first responder status, the NSWindow object becomes first responder; in this case, the method returns YES even if responder refuses first responder status. In my case, the behavior I would like t

Re: binding to number of selected rows in a table

2009-03-04 Thread Sean McBride
On 3/3/09 6:38 PM, James Walker said: >I want to use bindings to set certain control attributes (enabled state, >tool tip) depending on the number of selected rows in an outline table. > I have a controller object that owns an NSOutlineView, and I gave it >an accessor > >- (NSOutlineView*) outlin

Re: Moving oneself to /Applications (or ~/Applications)

2009-03-04 Thread Sean McBride
On 3/4/09 11:37 AM, Jeremy Pereira said: >If you really want to test whether an application is running from the >distribution dmg, I would have thought the easiest way is to put a >hidden file on the dmg in the same directory as the application bundle >and merely test for the existence of that hid

Re: Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell?

2009-03-04 Thread Eric Gorr
I have recently experienced some of these same issues. You can check out the message: http://lists.apple.com/archives/cocoa-dev/2009/Mar/msg00179.html for what I was concerned with. As best I can determine, a NSTextView relies upon a NSScrollView to handle it's scrolling behavior. Unfortunat

SOLVED Re: All my leaks are gone... but now a memory warning?!

2009-03-04 Thread James Cicenia
I used this after opening sqlite: // Modify cache size so we don't overload memory. 50 * 1.5kb if (sqlite3_exec(database, "PRAGMA CACHE_SIZE=50;", NULL, NULL, NULL) ! = SQLITE_OK) { NSAssert1(0, @"Error: failed to set cache size with message '%s'.", sqlite3_errmsg(database)); } Thanks James

Re: Date parsing problem (when running on iphone only)

2009-03-04 Thread Michael Vannorsdel
You're trying to print an NSDate object returned by dateFromString: with a %i format which is for integers. So the number you're seeing is the memory address of the returned date converted to an int. On Mar 4, 2009, at 4:15 AM, Jacob Rhoden wrote: Anyone experience this weird behaviour wit

Mouse Dragged Event not working using CGEvent

2009-03-04 Thread sheen mac
Hi All, I tried to post a mouse dragged event using CGEvent.But its not working. I added the code here. Thanks In Advance, Sheen CGEventRef eventRef = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseDragged , point,kCGMouseButtonLeft); CGEventSetType(eventRef, kCGEventLeftMouseDrag

Re: Date parsing problem (when running on iphone only)

2009-03-04 Thread Jacob Rhoden
On 4/3/09 10:15 PM, Jacob Rhoden wrote: Anyone experience this weird behaviour with date parsing? Given the following code, it produces a different log output when running in the simulator or on the iPhone!!! NSString* test = @"Monday 26 January 2009 3:47:33 pm +"; NSDateFormatter

Re: Moving oneself to /Applications (or ~/Applications)

2009-03-04 Thread Jeremy Pereira
If you really want to test whether an application is running from the distribution dmg, I would have thought the easiest way is to put a hidden file on the dmg in the same directory as the application bundle and merely test for the existence of that hidden file at start up. On 24 Feb 2009,

Date parsing problem (when running on iphone only)

2009-03-04 Thread Jacob Rhoden
Anyone experience this weird behaviour with date formatting? Given the following code, it produces a different log output when running in the simulator or on the iPhone!!! NSString* test = @"Monday 26 January 2009 3:47:33 pm +"; NSDateFormatter *df = [[NSDateFormatter alloc] init];

Re: Newbie: Learning path for my GTD app...

2009-03-04 Thread Mike Abdullah
On 4 Mar 2009, at 05:40, Biagio wrote: Hello. My first post. I'm learning to program using Xcode 3.1.2 in OS X Leopard. My current plan of attack is working through these books: Learn C on the Mac C All in One Desktop Reference for Dummies Learn Objective-C On the Mac Cocoa Programming for M

SyncServices ...

2009-03-04 Thread Mic Pringle
Hi, I've been searching around for sometime trying to find an example of using sync services with Safari's bookmarks. Does anyone know of one, or any information that may help with this particular task ? Also, is it possbile to have a client sync with more than one other client ? I have a user-ag

Re: "setAffineTransform:" behaves differently around "setLayer:"

2009-03-04 Thread rajesh
I tried changing some lines [self setWantsLayer:YES]; pages = [[NSMutableArray alloc] init]; drawLayer = self.layer; drawLayer.backgroundColor = CGColorCreateGenericRGB(1.0f,1.0f,1.0f, 1.0f); CGAffineTransform trans = CGAffineTransformMake(1.0,0.0,0.0,-1.0,0.0,0.0);

Re: where to store this kind of data

2009-03-04 Thread Andreas Mayer
Am 03.03.2009 um 23:17 Uhr schrieb Benjamin Dobson: Store it in ~/Library/Application Support/YourAppName/ And make sure not to hard code the path. See the NSSearchPathForDirectoriesInDomains() function and NSString's - stringByAppendingPathComponent:. Andreas ___

Re: Changing NSTableView cell immediately before editing

2009-03-04 Thread Paul Sanders
> Thanks for this. I think this would solve part of the problem (when > it was clicked on by the user), but not if the text edit field were > selected in some way other than a mouse click. I thought about this a little bit too. It seems to me that the change in firstResponser is the key to this