Re: ARC and Manual Memory Management

2015-08-10 Thread Robert Martin
I found fmdb’s solution instructive and very helpful. If you download the source and take a look it might give you some ideas. Rob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: NSPropertyListSerialization weirdness

2015-07-26 Thread Robert Martin
Thanks Jens, I’ll test for NSNulls instead. I know the dictionary is valid because after I read it with dictionaryWithContentsOfFile:, I log it, and it ‘looks' fine… > On Jul 26, 2015, at 5:44 PM, Jens Alfke wrote: > > >> On Jul 26, 2015, at 2:28 PM, Robert Martin w

NSPropertyListSerialization weirdness

2015-07-26 Thread Robert Martin
I’m having some issues. I’m tracking a folder that is I watch via kqueue, and if a .plist arrives, I process it immediately. The plist contains a dictionary, which is successfully read with dictionaryWithContentsOfFile:. If I log the dictionary description, it is accurate. The dictionary only co

Re: Rotate a standard Cocoa control?

2015-05-08 Thread Robert Martin
Graham, Thanks so much for posting this. I’ve always wondered how to go about doing this kind of thing, but never had the actual need in a project to prod me to figure it out. Your app and code are terrific at making things clear. Thanks, Rob > On May 7, 2015, at 11:54 PM, Graham Cox wrote:

Re: highlight a nsview on click-drag?

2015-03-15 Thread Robert Martin
Why bother with a timer loop to animate the wiper when that functionality is built-in through CoreAnimation? Especially since you are using an image as the wave background. CoreAnimation will move the wiper smoothly and accurately. All you have to do is provide the distance it must travel and th

Re: URLByResolvingBookmarkData not case sensitive

2015-01-07 Thread Robert Martin
Ignore my previous post - I hadn’t looked at the thread! > On Jan 7, 2015, at 8:40 AM, Robert Martin wrote: > > Since the file system is case insensitive, why not store the path in upper or > lower case, and convert the path you’re comparing accordingly? > >> When adding

Re: URLByResolvingBookmarkData not case sensitive

2015-01-07 Thread Robert Martin
Since the file system is case insensitive, why not store the path in upper or lower case, and convert the path you’re comparing accordingly? > When adding new files, I need to make sure the file is not already in the > database so I compare the paths. This works well except when the case > chang

Re: awakeFromNib multiple objects - all connected?

2014-07-04 Thread Robert Martin
The nib is only ‘awake’ after all connections in the graph have been made. On Jul 4, 2014, at 11:18 PM, Trygve Inda wrote: > So the bottom line is: > > When an object in a nib receives awakeFromNib are all the outlets throughout > the entire nib hooked up, or only those outlets in the object th

Re: Confirm 10.9 GM build number?

2013-10-22 Thread Robert Martin
13A603 is the last GM seed I downloaded… On Oct 22, 2013, at 3:21 PM, Jens Alfke wrote: > Can someone who’s installed the public release of Mavericks reply with the > build number (e.g. from the About This Mac panel)? I’m running the GM seed, > 13A598, and I’d like to make sure it’s the same

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Robert Martin
You presented a problem, and other members spent their precious time trying to help you solve it. Just take it or leave it, but thank them all the same. Your opinion of a framework is irrelevant, please stop wasting bandwidth. Rob On Oct 3, 2013, at 5:39 PM, Dave wrote: > > On 3 Oct 2013, a

Re: Static analyser grumbling

2013-08-23 Thread Robert Martin
If the context is created, and the init succeeds and returns a valid self, then you are leaking the context. Get rid of the 'else', since it causes the code to skip over the release. On Aug 23, 2013, at 7:27 AM, Kevin Meaney wrote: > Hi, > > I'm using ARC and using Mavdacted and DP5 but I do

Re: when __bridge isn't required

2013-07-27 Thread Robert Martin
My take: __bridge means 'do not transfer the retain count of to the LHS'. If the RHS involves some kind of create or new, then you'll get a leak since ARC won't release it. __bridge_transfer means 'transfer the retain count of to the LHS'. If the RHS involves some kind of create or new, then

Re: Non-sandboxed Cocoa app accessing current user preferences using NSTask fails when launched outside Xcode.

2013-07-24 Thread Robert Martin
… or give fmdb a try - https://github.com/ccgus/fmdb rob > On 2013 Jul 23, at 10:04, Public wrote: > >> If you need sqlite, your time would be better spent learning to link the >> sqlite library directly and use sqlite's C interface. ___ Cocoa-d

Re: How to avoid warning?

2013-01-21 Thread Robert Martin
> myObj = [[myClass alloc] initWithManager:sel]]; Is sel meant to be self? On Jan 21, 2013, at 1:14 PM, Dave wrote: > Hi All, > > I have the following code: > > if (class_RespondsToSelector(myClass,@selector(initWithManager:) == NO) > myObj = [[myClass alloc] init]; > else > myObj

Re: custom slider for video trimming application

2012-10-12 Thread Robert Martin
Try googling: cocoa double slider - and look at the first hit! On Sep 26, 2012, at 12:15 AM, Muthulingam Ammaiappan wrote: > Hi Friends, > > i am developing the video trimming application in cocoa /mac os x 10.7.4 > and xcode 4.3.3...(i am newbie to the cocoa and mac) > > my current requ

Re: FSEvents eventid (or perhaps event)'s life

2012-07-30 Thread Robert Martin
how do you think ? > On 12/07/27 19:54, Robert Martin wrote: >> The IDs relate to the drive, not the system. If you switch to a back up >> drive of your data, or re-partition your drive, the last event ID will not >> match the one you stored in user defaults from another dri

Re: FSEvents eventid (or perhaps event)'s life

2012-07-27 Thread Robert Martin
The IDs relate to the drive, not the system. If you switch to a back up drive of your data, or re-partition your drive, the last event ID will not match the one you stored in user defaults from another drive. It's also possible to corrupt the FSEvent database that's stored on each drive in the

Re: Quit helper app when main app terminates

2012-07-12 Thread Robert Martin
The best way? I have no idea… This is what I do, and it works. I store the path to my helper app in 'path', and do the following when my app is about to quit: //- - (void)applicationWillTerminate:(NSNotification *)aNotification

Re: 10.6 SDk and 10.5 Deployment

2012-06-27 Thread Robert Martin
Did this for years for a client -a few years ago- with no problems, though you don't mention what issues you have - which makes it impossible to help. So *obviously* it can be done - any problems kind of depends on what you're doing - which you don't mention. Rob On Jun 27, 2012, at 3:53 PM,

Re: Adding sound to movie with QTKit

2011-11-16 Thread Robert Martin
One way: Save your PCM audio to an AIF file, then open it as a QTMovie. Set the attribute 'QTMovieEditableAttribute' to TRUE. It will just have one audio track. Then: QTTimeRange videoRange = QTMakeTimeRange(QTZeroTime, [videoTrkOnlyMovie duration]); [

Re: [Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task

2011-09-01 Thread Robert Martin
No - creating the QT Movie must happen on the main thread - but after it's created, you can pass it off to secondary threads for processing… Rob On Sep 1, 2011, at 1:13 PM, JongAm Park wrote: > Hmmm.. probably.. enterQTKitOnThread allows to create and initialize QTMovie > objects on threads

Re: Referencing struct fields in C

2011-05-30 Thread Robert Martin
What cured me of optimization-itis was this entry in ridiculousfish's ridiculously cool blog: http://ridiculousfish.com/blog/archives/2010/07/23/will-it-optimize/#fish_made_a_mess --Rob >> One thing that bothers me though. How the compiler will understand >> that the state is loop-invariant? S

Re: rerunning an NSOperation object

2011-03-05 Thread Robert Martin
From the docs for NSOperation: ... "An operation object is a single-shot object—that is, it executes its task once and cannot be used to execute it again." On Mar 5, 2011, at 10:33 PM, Shane wrote: > I have an NSOperation object that has been placed in an > NSOperationQueue. I then execute th

Re: NSFileManager Wildcard Characters

2010-12-28 Thread Robert Martin
UNIX is your friend, since OSX is built on top of it. All its tools work just fine if you find yourself missing something in the frameworks. On Dec 28, 2010, at 2:16 PM, Scott Ribe wrote: > On Dec 28, 2010, at 12:02 PM, k...@highrolls.net wrote: > >> I don't have any files with "._Name" so I c

Re: NSView/NSTableView question

2010-12-05 Thread Robert Martin
Another approach that might be simpler: Set up a tabbed view with 2 views - one to receive drops with all your instructions, and the other to display the table. Switch to the drop view when the table row count is 0, and switch back to the table tab when valid drops are registered. On Dec 5, 20

Re: Image,text and button cell in outline view

2010-11-24 Thread Robert Martin
Try googling NSButtonCells, or look them up in the documentation. On Nov 24, 2010, at 7:08 PM, Rajendran P wrote: > HI >my requirement is simple I need a nscell to have image, text and button to > be used in an outline view .I had a look at the imageandtext cell example , > how to add an

Re: NSOutlineView

2010-09-09 Thread Robert Martin
Nothing stops you from directly manipulating the Data Source and reloading to do just that - MVC is the paradigm. On Sep 9, 2010, at 10:59 AM, k...@highrolls.net wrote: > It is my understanding that an NSOutlineView is only 'populated' by using its > Delegate Methods. > > My manager (a Windows

Re: six things I wasn't able to do with Cocoa

2010-05-28 Thread Robert Martin
Try using the QTMovie method frameImageAtTime: withAttributes: error: You can specify the image size you want returned in the attributes dictionary (along with the image format). On May 28, 2010, at 2:55 PM, Bill Appleton wrote: > the remaining problem is that the movie posetr returns a size

Re: NSDirectoryEnumerator and URLs

2010-01-13 Thread Robert Martin
Isn't the path returned by NSDirectoryEnumerator a relative path to the path you initialize it with? The docs say: "An NSDirectoryEnumerator object enumerates the contents of a directory, returning the pathnames of all files and directories contained within that directory. These pathnames are r

Re: NSLog / Console / Console Messages

2009-07-01 Thread Robert Martin
May not be relevant, but if you have an NSTask that fires a shell script using /bin/sh, NSLog will no longer work. (This is solved by using /bin/tcsh). Rob On Jul 1, 2009, at 4:38 PM, Dimitri Bouniol wrote: Another way to get the logs messages would be to open your app using Terminal. To

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Robert Martin
Perhaps the simplest way is to use a NSTabView - (you can set it to tabless). Then create all of your 'unrelated views' in separate tabs, and switch the tabs in your code. On Jul 1, 2009, at 3:21 AM, Debajit Adhikary wrote: I have an area of a Window (in my MainMenu.xib) which I'd like to

Re: Databases on Cocoa (was Re: Invoice program made in Objective c/Cocoa)

2009-05-18 Thread Robert Martin
If you're trying to say what you think CoreData 'should' be - then take it up with Apple. (which is not this list, by the way) This whole thread is depressing. Is anyone out there who is trying to say that CoreData should be an object database capable of reading the docs? If so, what part o

Problem with the list?

2009-05-04 Thread Robert Martin
Hi, I haven't received any posts for several days now, on any of the Apple lists I'm subscribed to...Is this a known problem, or should I check with my ISP? Thanks, Rob ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: sending email form Cocoa app using Mail

2009-04-15 Thread Robert Martin
Perhaps add a preference item for the user to select a mail app from a list - I guess you'd have to know up front which scriptable apps you support in order to send the correct messages. On Apr 15, 2009, at 7:06 AM, Reza Farhad wrote: I want to update my app from using NSMailDelivery to us

Re: Read lines from very large text file

2009-02-02 Thread Robert Martin
Sorry - the link should have been: http://ridiculousfish.com/hexfiend/ On Feb 2, 2009, at 9:51 PM, Jacob Rhoden wrote: Yea, I saw this and some posts on the apple forum saying NSInputStream is not the right way, hence the question, what is the right way to analyze a very large file line by

Re: Read lines from very large text file

2009-02-02 Thread Robert Martin
Have you checked out: http://ridiculousfish.com/blog/archives/2006/11/24/0xf4ee/ ? Look at the source to see how to muck around with really large files. On Feb 2, 2009, at 9:51 PM, Jacob Rhoden wrote: Yea, I saw this and some posts on the apple forum saying NSInputStream is not the right w

Re: NSProgressIndicator not accepting updates

2009-01-22 Thread Robert Martin
If I remember correctly, %d requires an integer On Jan 22, 2009, at 11:31 AM, Aaron Wallis wrote: double tD = 0.5; [progressBar setDoubleValue:tD]; NSLog(@"%d", [progressBar doubleValue]); ___ Cocoa-de

Re: MD5 Checksum of a file with CommonDigest.h

2008-11-20 Thread Robert Martin
I use CocoaCryptoHashing - which you can find at: http://github.com/ddfreyne Works like a charm. On Nov 20, 2008, at 5:22 PM, Andrew Farmer wrote: On 20 Nov 08, at 14:12, Sebastian Pape wrote: Hi, I'm trying to get a MD5 Checksum of a file. This is my code: [...] CC_MD5(cStr, strlen(cStr

Re: File event notification

2008-10-24 Thread Robert Martin
You can do all this, but you'll have to set up a database/store to figure out the differences. I store the nodeID/parentID modDate and attributeChangDate as well as the path in order to get 'Delete' 'Change' 'Move' and 'Rename' - 'Add is simple! On Oct 24, 2008, at 4:31 AM, Ardian Lazuardi

Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell

2008-09-15 Thread Robert Martin
I wonder whether Button Cells are built to provide double-click actions (seems kind of weird if they do). Do you get 2 single-click actions? From the NSMatrix double action docs: "The double-click action of an NSMatrix is sent after the appropriate single-click action (for the NSCell clic

Re: monitoring file system

2008-08-25 Thread Robert Martin
Check out: http://developer.apple.com/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/chapter_2_section_1.html Once you get that working, you just have to cache the 'old' snapshot for your directory tree, and implement a 'diff' to figure out what's been added, deleted, change

Re: Audio Queue Services example?

2008-08-18 Thread Robert Martin
You may get better responses from the coreaudio-api list On Aug 18, 2008, at 1:06 PM, John Zorko wrote: I need to play an MP3 stream from a server in ObjC, so i'm looking at the Audio Queue services API. I see examples of streaming from a file, but I don't know how to feed the queue when

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Robert Martin
In the code you provide, the first line allocates a brand new dictionary and assigns it to vAttributes. In the next line, you reassign vAttributes to the contents of your iVar dictionary. Nothing points to that alloc'd dictionary in the first line anymore. Since vAttributes now points to

Re: How does an instance variable in the ObjC code get connected to an interface element in the NIB file?

2008-06-13 Thread Robert Martin
Hint: If you want to ask a question about your code, we're not psychics On Jun 13, 2008, at 5:21 PM, Paul Archibald wrote: Comrades: This puzzles me. I am tracing through some code in which I am looking at the value of some selected popup menu items. I am seeing the correct values for the