Re: Read lines from very large text file

2009-02-06 Thread Chris Ridd
On 7 Feb 2009, at 05:39, Clark Cox wrote: On Fri, Feb 6, 2009 at 9:30 PM, Sean McBride wrote: Joar Wingfors (j...@joar.com) on 2009-02-06 12:06 AM said: How can you guarantee a file's existence? sudo rm -f? How about calling open() on it? :) But note the latter part of the sentence: "

Re: Animated toolbar

2009-02-06 Thread Graham Cox
On 7 Feb 2009, at 8:43 am, Christian Graus wrote: In my app, I want a toolbar like the one at the bottom of OSX, with icons that resize as I move the mouse over them. I want the whole toolbar to hide and to scroll up into view from the bottom of my window when I move my mouse over the li

Re: Syntax errors, undeclared variables

2009-02-06 Thread Peter Duniho
On Feb 6, 2009, at 6:51 PM, Kevin Walzer wrote: [...] I'm not sure what is causing these errors. Line 11 is set up like this: -(int)switchIcon (ClientData cd, Tcl_ip *ip, int objc, Tcl_Obj *objv[]); The error is because your method prototype syntax is completely wrong. You should probabl

Re: NSTableView Popup Column issue

2009-02-06 Thread jmunson
Namaste! Thank you for your reply. See my commentary below. However, my question still remains unanswered. Peace, Love, and Light, /s/ Jon C. Munson II Quoting Kyle Sluder : On Fri, Feb 6, 2009 at 3:36 PM, Jon C. Munson II wrote: Well, using "selection" didn't work (now that I've had an

Re: @synchronized in thread safe accessors

2009-02-06 Thread mmalc Crawford
On Feb 6, 2009, at 6:23 PM, Michael Ash wrote: It's one less ivar to worry about. I retro-fitted the lock to one other object I wanted to make thread-safe, only because I couldn't think of a way of doing this safely with @synchronized(), and thought I'd ask before committing. And now I'm wo

Re: Read lines from very large text file

2009-02-06 Thread Clark Cox
On Fri, Feb 6, 2009 at 9:30 PM, Sean McBride wrote: > Joar Wingfors (j...@joar.com) on 2009-02-06 12:06 AM said: > >>> How can you guarantee a file's existence? sudo rm -f? >> >>How about calling open() on it? > > :) But note the latter part of the sentence: "this method should only > be used if

Syntax errors, undeclared variables

2009-02-06 Thread Kevin Walzer
I'm trying to build a small extension to the Tcl scripting language that hooks into Cocoa/Objective-C. The idea is to change an application's dock icon with a call to [NS App setApplicationIconImage]. However, when I try to compile my code, I get various errors, such as: cocoadock.m:11: error:

Re: Read lines from very large text file

2009-02-06 Thread Sean McBride
Joar Wingfors (j...@joar.com) on 2009-02-06 12:06 AM said: >> How can you guarantee a file's existence? sudo rm -f? > >How about calling open() on it? :) But note the latter part of the sentence: "this method should only be used if the file is guaranteed to exist _for the duration of the data o

Re: Read lines from very large text file

2009-02-06 Thread Joar Wingfors
On Feb 6, 2009, at 8:52 PM, Sean McBride wrote: How can you guarantee a file's existence? sudo rm -f? How about calling open() on it? j o a r ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderato

Re: Read lines from very large text file

2009-02-06 Thread Sean McBride
Michael Ash (michael@gmail.com) on 2009-02-06 9:20 PM said: >> Would there be a way to do this with dataWithContentsOfMappedFile? I've long >> wondered about that... m. > >Yes and no. +dataWithContentsOfMappedFile: can be used to do this kind >of efficient parsing, as memory mapping of files m

how to get iphone calendar database file

2009-02-06 Thread Ankur Diyora
Hello all, I want iphone calendar database file(sqlite). How can i get this file from iPhone ? Thank you.. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderator

Re: Needed : set class for Cocoa

2009-02-06 Thread Tommy Nordgren
On Feb 6, 2009, at 2:50 AM, Sean McBride wrote: Tommy Nordgren (tommy.nordg...@comhem.se) on 2009-02-06 7:55 PM said: I have decided to do an implementation myself, as an objective c++ wrapper to std::set. I want to use the class to aid in destruction of directed cyclical object graphs, in d

Re: Animated toolbar

2009-02-06 Thread Christian Graus
On Sat, Feb 7, 2009 at 1:56 PM, Kyle Sluder wrote: > On Fri, Feb 6, 2009 at 9:32 PM, Christian Graus > wrote: > > We prefer users to use our app full screen. we're copying our Windows > > program, so we really don't have a lot of room to rethink this stuff, and > > what we've done so far, was a

Re: Animated toolbar

2009-02-06 Thread Kyle Sluder
On Fri, Feb 6, 2009 at 9:32 PM, Christian Graus wrote: > We prefer users to use our app full screen. we're copying our Windows > program, so we really don't have a lot of room to rethink this stuff, and > what we've done so far, was a success in the windows world. I am trying to > make sure we m

Re: Simple memory problem

2009-02-06 Thread Michael Ash
On Fri, Feb 6, 2009 at 8:22 PM, Martin Wierschin wrote: > The only requirement the method has is to return an object that is valid for > the caller. Because self is obviously valid, it's a perfectly legitimate > return value. The fact that the caller releases that string after making the > call is

Re: Animated toolbar

2009-02-06 Thread Christian Graus
On Sat, Feb 7, 2009 at 1:11 PM, Kyle Sluder wrote: > On Fri, Feb 6, 2009 at 4:43 PM, Christian Graus > wrote: > > In my app, I want a toolbar like the one at the bottom of OSX, with icons > > that resize as I move the mouse over them. > > The user interface element you're referring to is called

Re: NSTableView Popup Column issue

2009-02-06 Thread Kyle Sluder
On Fri, Feb 6, 2009 at 3:36 PM, Jon C. Munson II wrote: > Well, using "selection" didn't work (now that I've had an opportunity to > test it). It definitely needs to be arrangedObjects (or something similar). > So, it isn't that. "Arranged Objects" is plural. "Selected Object" is singular. It

Re: @synchronized in thread safe accessors

2009-02-06 Thread Michael Ash
On Fri, Feb 6, 2009 at 7:19 PM, Nick Zitzmann wrote: > > On Feb 6, 2009, at 5:09 PM, Kyle Sluder wrote: > >> Then why bother with @synchronized? Don't fix what isn't broke. > > It's one less ivar to worry about. I retro-fitted the lock to one other > object I wanted to make thread-safe, only beca

Re: Read lines from very large text file

2009-02-06 Thread Michael Ash
On Fri, Feb 6, 2009 at 6:44 PM, Matt Neuburg wrote: > On Tue, 03 Feb 2009 00:42:07 +1100, Jacob Rhoden > said: >>I am wondering what the best way to read a text file, line by line, when >>the file size is much larger than available memory. > > Would there be a way to do this with dataWithContents

Re: -threadDictionary thread safety?

2009-02-06 Thread Michael Ash
On Fri, Feb 6, 2009 at 6:05 PM, A.M. wrote: > Hello, > > Now that 10.5 allows one to maintain pointers to threads other than the > current thread, is it legal to call -threadDictionary for the non-current > thread? I ask because it is odd that Cocoa would allow access to address > space that the s

Re: Animated toolbar

2009-02-06 Thread Kyle Sluder
On Fri, Feb 6, 2009 at 4:43 PM, Christian Graus wrote: > In my app, I want a toolbar like the one at the bottom of OSX, with icons > that resize as I move the mouse over them. The user interface element you're referring to is called the Dock. > I want the whole toolbar to hide > and to scroll up

Re: NSTask + incomplete stdout at end of process

2009-02-06 Thread xEsk PiV
> > You are successfully capturing the output. The problem is that the tool is > changing its behavior -- changing what it outputs -- depending on where its > output is going. You're right. I'm investigating other ways to capture the output, but it's really hard find information or code example

Re: Stack Trace Using Google Toolbox for Mac

2009-02-06 Thread Rob Keniger
On 06/02/2009, at 10:04 PM, Andreas Grosam wrote: Or does it use some other kind of "reflection", specific to Cocoa, that does not need the symbols? This could be the case, since there is introspection. Looking at the code, it uses the +callStackReturnAddresses method of NSThread to retri

Re: Simple memory problem

2009-02-06 Thread Martin Wierschin
On 2009.02.06, at 8:47 AM, Frédéric Testuz wrote: Le 6 févr. 09 à 07:32, Martin Wierschin a écrit : On Feb 5, 2009, at 4:42 PM, Steve Sisak wrote: NSString * newString = [inputString stringByReplacingCharactersInRange:range withString:@""]; [inputString release]; // release old input

where's my exception?

2009-02-06 Thread Matt Neuburg
The docs say: setContentFilters: ... Sending this message to a view that is not managing a Core Animation layer causes an exception. So, I sent it to a view that was not managing a Core Animation layer and it *didn't* cause an exception. Are docs just wrong? Or is this some kind of secret excepti

Re: Determining if a user is logged in from a Launchd Daemon

2009-02-06 Thread Jerry Krinock
On 2009 Feb 06, at 13:14, Tom Fortmann wrote: Is there a way of determining if a GUI user (ignoring remote shells and such) is logged in from a system daemon? It looks like the WindowServer process is started for a user session, but I'm not sure scanning the process list is the best way o

Re: @synchronized in thread safe accessors

2009-02-06 Thread Nick Zitzmann
On Feb 6, 2009, at 5:09 PM, Kyle Sluder wrote: Then why bother with @synchronized? Don't fix what isn't broke. It's one less ivar to worry about. I retro-fitted the lock to one other object I wanted to make thread-safe, only because I couldn't think of a way of doing this safely with @sy

Re: @synchronized in thread safe accessors

2009-02-06 Thread Kyle Sluder
On Fri, Feb 6, 2009 at 6:47 PM, Nick Zitzmann wrote: > With NS(Recursive)Lock, this isn't difficult: Then why bother with @synchronized? Don't fix what isn't broke. > OK, now what is the best way to do this using @synchronized instead of an > NSLock? The getter method is obvious, but the setter

-[NSPersistentDocument isDocumentEdited] lazy until next click

2009-02-06 Thread Jerry Krinock
When the user updates a particular attribute of a particular object in my Core Data document-based application, the "dirty" dot in the document's window does not appear until after the user clicks again, anywhere in the window. I also find that, about 15% of the time, after subsequently cl

Re: Full Screen Mode With MenuBar

2009-02-06 Thread Graham Cox
On 7 Feb 2009, at 10:32 am, Adam Gerson wrote: I have a few custom views on my window that have custom drawing in them that contain some game pieces that move within the views. The drawing needs to happen at specific x,y,width,height relative to the window and each other. None of this can be st

@synchronized in thread safe accessors

2009-02-06 Thread Nick Zitzmann
I've RTFM'd (specifically performed a full-text search in the core library for @synchronized) and STFA'd, and I'm still confused about using @synchronized in a thread-safe accessor. I can't use @synthesize because the set method must do more than just set a variable. With NS(Recursive)Lock,

Re: Read lines from very large text file

2009-02-06 Thread Matt Neuburg
On Tue, 03 Feb 2009 00:42:07 +1100, Jacob Rhoden said: >I am wondering what the best way to read a text file, line by line, when >the file size is much larger than available memory. Would there be a way to do this with dataWithContentsOfMappedFile? I've long wondered about that... m. -- matt ne

Re: Full Screen Mode With MenuBar

2009-02-06 Thread Sean McBride
On 2/6/09 6:32 PM, Adam Gerson said: >Is there a way to force the screen resolution to change? See the various APIs that start with CGDisplay... -- Sean McBride, B. Eng s...@rogue-research.com Rogue Research

Re: Memory Question on returning a View

2009-02-06 Thread Graham Cox
On 7 Feb 2009, at 8:13 am, James Cicenia wrote: NSEnumerator *itemEnum = [availabilityArray objectEnumerator]; AvailableItem *item = nil; Incidentally, you're aware this code does nothing, right? You never use item or itemEnum. --Graham _

Re: Memory Question on returning a View

2009-02-06 Thread Graham Cox
On 7 Feb 2009, at 8:13 am, James Cicenia wrote: Hello - I have the example code: Can I do this.. return a view and it will stick around? Thanks James Cicenia -(UIView *)mapViewForMonthAndType:(NSString *) pMonth type: (NSString) pType{ AppDelegate *appDelegate = (AppDelegate *)[[UIApplic

Re: Full Screen Mode With MenuBar

2009-02-06 Thread Adam Gerson
I got a full screen window working, with a hidden dock and a showing menubar. Perfect! Thank you to everyone. I have a few custom views on my window that have custom drawing in them that contain some game pieces that move within the views. The drawing needs to happen at specific x,y,width,height r

Internships available at The Omni Group

2009-02-06 Thread Timothy Wood
We’re looking for one or two software development interns for this summer! Check out our open positions at for more info on internships or full-time employment. -tim ___ Cocoa-dev mailing list (Cocoa-d

-threadDictionary thread safety?

2009-02-06 Thread A.M.
Hello, Now that 10.5 allows one to maintain pointers to threads other than the current thread, is it legal to call -threadDictionary for the non- current thread? I ask because it is odd that Cocoa would allow access to address space that the standard pthread_key/specific API would not allo

Re: NSSocketPort with NSConnection causing firewall pop-up

2009-02-06 Thread Kyle Sluder
On Fri, Feb 6, 2009 at 9:58 AM, Tim Murison wrote: > My client application communicates with the server using Unix Domain > Sockets. After creating a properly configured NSSocketPort (sendPort) for > the client, I create the NSConnection as follows: You're going to need to post the code you use t

Re: Quicktime Movie View error

2009-02-06 Thread Kyle Sluder
On Fri, Feb 6, 2009 at 11:21 AM, elliott cable wrote: > It's actually a complex process. It requires that you manually manage > your XIB changes to some extent, in a painful way (I'm in the middle > of writing a tool to do all of that for me), and even then, there are > circumstances where such a

ANN: Accessorizer 1.2 with support for Objective-C 2.0 properties and much more ...

2009-02-06 Thread Kevin Callahan
Accessorizer 1.2 (a FREE UPDATE for existing owners) with support for Objective 2.0 properties and much more! This new version is even faster as it removes the tedium of writing @property and @synthesize statements, providing a wide range of coding styles while helping you avoid com

Relation between Document based apps and Array Controllers in IB

2009-02-06 Thread donbarvazo
Hi, I have been spending the last couple of days trying to figure out if there is a relation between the Document based application in Cocoa and the ability to bind Array Controllers to the AppController. Here goes: Document Based app = works fine 1. I have created a Cocoa Document Based Applicat

Job posting for Cocoa developer

2009-02-06 Thread Ian Marsh
Hi all, Xsilva Systems is looking for a full-time Cocoa developer to help us develop next-generation versions of the LightSpeed Point-of-Sale software, Xsilva's flagship product for Mac OS X! The ideal candidate has proficiency and experience with Cocoa and Objective-C and business logic,

Re: Stack Trace Using Google Toolbox for Mac

2009-02-06 Thread Andreas Grosam
On Feb 6, 2009, at 11:44 AM, Oleg Krupnov wrote: I've just tried to use some code from the Google Toolbox for Mac (http://code.google.com/p/google-toolbox-for-mac/) for capturing stack trace, and it works great! I get the human-readable names of the Cocoa classes and methods. It gives human-re

NSSocketPort with NSConnection causing firewall pop-up

2009-02-06 Thread Tim Murison
Hi, I've been working with distributed objects for the last few days and came across a behaviour in NSConnection that seems to be a bug, or at least sub-optimal. My client application communicates with the server using Unix Domain Sockets. After creating a properly configured NSSocketPort (sendPo

Adding a custom framework to a Cocoa-Python App

2009-02-06 Thread Earl T.
I'm having trouble with linking a framework in my Cocoa-Python App. In a normal Cocoa/Objective-C app, after adding the framework in the Frameworks folder of my Xcode project, I would create a Custom copy files build phase, and everything would work fine. But when I do that , still the same framew

Re: CALayer

2009-02-06 Thread David Blanton
No. I confused it with CoreGraphics. All is well except my lost time and yours. Thx .. On Feb 6, 2009, at 3:11 PM, Nick Zitzmann wrote: On Feb 6, 2009, at 2:50 PM, David Blanton wrote: When compiling I get a warning at this line CALayer *layer = [CALayer layer]; Warning no '+

Re: CALayer

2009-02-06 Thread Nick Zitzmann
On Feb 6, 2009, at 2:50 PM, David Blanton wrote: When compiling I get a warning at this line CALayer *layer = [CALayer layer]; Warning no '+layer' method found. Am I brain dead and missing something? Did you remember to import QuartzCore/QuartzCore.h in your source and link to

CALayer

2009-02-06 Thread David Blanton
The docs say there is a factory method ... layer ... for CALayer. layer Creates and returns an instance of CALayer. + (id)layer When compiling I get a warning at this line CALayer *layer = [CALayer layer]; Warning no '+layer' method found. Am I brain dead and missing something?

Animated toolbar

2009-02-06 Thread Christian Graus
Hi again In my app, I want a toolbar like the one at the bottom of OSX, with icons that resize as I move the mouse over them. I want the whole toolbar to hide and to scroll up into view from the bottom of my window when I move my mouse over the little edge that would be always visible. I've been

Re: NSTask + incomplete stdout at end of process

2009-02-06 Thread Ken Thomases
On Feb 6, 2009, at 7:49 AM, xEsk PiV wrote: When I started I hoped that capturing the output was easy as other frameworks xD You are successfully capturing the output. The problem is that the tool is changing its behavior -- changing what it outputs -- depending on where its output is g

Determining if a user is logged in from a Launchd Daemon

2009-02-06 Thread Tom Fortmann
Is there a way of determining if a GUI user (ignoring remote shells and such) is logged in from a system daemon? It looks like the WindowServer process is started for a user session, but I'm not sure scanning the process list is the best way of tackling this problem. Is there some Apple Event tha

Memory Question on returning a View

2009-02-06 Thread James Cicenia
Hello - I have the example code: Can I do this.. return a view and it will stick around? Thanks James Cicenia -(UIView *)mapViewForMonthAndType:(NSString *) pMonth type:(NSString) pType{ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

Re: Quicktime Movie View error

2009-02-06 Thread Jonathan Hess
On Feb 6, 2009, at 8:21 AM, elliott cable wrote: On Thu, Feb 5, 2009 at 11:02 PM, Kyle Sluder wrote: On Fri, Feb 6, 2009 at 1:05 AM, elliott cable wrote: today, and I'm running into the same problem. Does anybody know how I can fix it *without* switching away from XIBs? (I'm versioning

NSArrayController won't "add", and "delete" removes both the record & selectable item

2009-02-06 Thread Jon C. Munson II
Namaste! In my app, I have an NSArrayController bound to a Core Data entity which is an intermediary table, tblPattern_Yarn, which is a join table between tblPattern and tblYarn. tblPattern_Yarn has couple of qualifying fields as well. There exists to-many relationships from tblPattern to tblPat

RE: NSTableView Popup Column issue

2009-02-06 Thread Jon C. Munson II
Namaste! Well, using "selection" didn't work (now that I've had an opportunity to test it). It definitely needs to be arrangedObjects (or something similar). So, it isn't that. Anyone have any further clues as to why this may be going on? Peace, Love, and Light, /s/ Jon C. Munson II -Orig

Re: underlining

2009-02-06 Thread Eric Slosser
The problem I'm really trying to solve occurs in a 'real' app. I'm drawing to a printer port with 300 dpi, and I found that with Arial 10 bold, point size > 39, the underline gets fat enough so its top edge intersects many of the letters, so all those intersections are skipped (not underli

Re: underlining

2009-02-06 Thread Eric Slosser
On Feb 5, 2009, at 6:31 PM, Graham Cox wrote: On 6 Feb 2009, at 10:00 am, Eric Slosser wrote: I'm trying to draw underlined strings, but they come out wrong In what way? I couldn't really describe it, so I attached a picture to my original post. The picture got stripped off for some peop

NSProgressIndicator (spinning) on a dark background?

2009-02-06 Thread Guy Umbright
I have been doing some searching as I figure somebody has to have already done this, but I haven't been able to come up with anything yet. I have a black background and would like to display a spinning progress indicator but it draws with a light background. Is there a way to do this with

Re: Needed : set class for Cocoa

2009-02-06 Thread Adam R. Maxwell
On Feb 6, 2009, at 8:47 AM, Sean McBride wrote: On 2/5/09 7:57 PM, Adam R. Maxwell said: The nice part is that it can then be cast to an NSMutableSet. Are you sure? I thought toll-free bridging only worked if you don't use custom CF callbacks. IAC, I don't think the OP said he needed to

Re: Needed : set class for Cocoa

2009-02-06 Thread Sean McBride
On 2/5/09 7:57 PM, Adam R. Maxwell said: >>> I have decided to do an implementation myself, as an objective c++ >>> wrapper to >>> std::set. I want to use the class to aid in destruction of >>> directed cyclical object graphs, >>> in dual mode frameworks. >> >> "Dual mode" as in both Retain-Relea

Re: Simple memory problem

2009-02-06 Thread Frédéric Testuz
Le 6 févr. 09 à 07:32, Martin Wierschin a écrit : On Feb 5, 2009, at 4:42 PM, Steve Sisak wrote: NSString * newString = [inputString stringByReplacingCharactersInRange:range withString:@""]; [inputString release]; // release old inputString inputString = [newString retain];

RE: NSTableView Popup Column issue

2009-02-06 Thread Jon C. Munson II
Namaste! Ah. I see. Thank you. I took the original setup from a sample program (Events & Participants I believe) and so thought that was "gospel" if you will. I knew it was something boneheaded...:) Many thanks! Peace, Love, and Light, /s/ Jon C. Munson II -Original Message- From:

Re: Quicktime Movie View error

2009-02-06 Thread elliott cable
On Thu, Feb 5, 2009 at 11:02 PM, Kyle Sluder wrote: > On Fri, Feb 6, 2009 at 1:05 AM, elliott cable wrote: >> today, and I'm running into the same problem. Does anybody know how I >> can fix it *without* switching away from XIBs? (I'm versioning my >> stuff in git, I have to use XIBs to get mergi

Re: Simple memory problem

2009-02-06 Thread Bill Bumgarner
On Feb 6, 2009, at 5:32 AM, harry greenmonster wrote: However, from a usability point of view, my points are still valid. Code such as inputString = [inputString myMethod]; looks to me like inputString data is no longer wanted, which in my case it wasn't. It is impossible for the compiler to

Re: NSTableView Popup Column issue

2009-02-06 Thread Keary Suska
On Feb 6, 2009, at 8:47 AM, Jon C. Munson II wrote: The issue is that the popup displays a left paren, and when the list is displayed, shows the item as an array dump (instead of the proper attribute's value). I also cannot select that value and have it "stick" to the underlying datasource

Re: garbage collection is ON NSCFDictionary crash

2009-02-06 Thread Bill Bumgarner
On Feb 6, 2009, at 5:01 AM, Jesse Grosjean wrote: With Bill's help I've found at least one cause of the garbage collection is ON NSCFDictionary crash. If anyone else has a garbage collected app that crashes frequently on startup with the crash described above check for the presence of: /Library

NSTableView Popup Column issue

2009-02-06 Thread Jon C. Munson II
Namaste! I'm having an issue with a popup in a tableview. The issue is that the popup displays a left paren, and when the list is displayed, shows the item as an array dump (instead of the proper attribute's value). I also cannot select that value and have it "stick" to the underlying datasource

RE: NSTableView and DataSource problem

2009-02-06 Thread Valentin Dan
Thanks for the advice! My data source is indeed kind of a M&C and I was actually very close to an attempt at subclassing the tableView and making it a MVC all in one :-) (I don't remember what divine intervention stopped me :-) ) __

Re: NSTableView and DataSource problem

2009-02-06 Thread Graham Cox
Here's a minimalistic datasource that works in many common situations: - (int) numberOfRowsInTableView:(NSTableView*) aTableView { return [myDataArray count]; } - (id) tableView:(NSTableView*) aTableView objectValueForTableColumn: (NSTableColumn*) aTableColumn row:(

RE: NSTableView and DataSource problem

2009-02-06 Thread Valentin Dan
The data source doesn't reload the data in any way ... but it is rather "smarter" than it should as it loads up some images on init (downloading them if necessary) so the creation takes quite some time. But I think I got why the data source getData methods were called so much, it wasn't the table

Re: Simple memory problem

2009-02-06 Thread Scott Ribe
> Its fairly clear in this situation that the original 'inputString' is > not wanted and needs to die... No, it is not. There could be any number of other variables in your program holding pointers to the same object. You know there are not, but the compiler does not know that. -- Scott Ribe sco

Re: Relaunching App Programmatically - Terminal Window Shows up

2009-02-06 Thread Michael Ash
On Fri, Feb 6, 2009 at 8:06 AM, slasktrattena...@gmail.com wrote: > You don't need a helper app for this. > > - (void) relaunch > { >int processIdentifier = [[NSProcessInfo processInfo] > processIdentifier]; >NSString *myPath = [NSString stringWithFormat:@"%s", >[[[NSBundl

Re: NSTableView and DataSource problem

2009-02-06 Thread Andy Lee
Can you show some code, in particular for your data source methods? Are you calling reloadData in any of your data source methods by any chance? --Andy On Feb 6, 2009, at 10:10 AM, Valentin Dan wrote: Hi, I'm having difficulties changing the data in the data source for the table view.

Re: NSTableView and DataSource problem

2009-02-06 Thread Graham Cox
On 7 Feb 2009, at 2:10 am, Valentin Dan wrote: Anyway, what's the proper method for updating the data for the list ? I need to change all the data. Currently I'm setting the tableView's data source to "nil", I'm releasing the old dataSource, creating a new one (with the new items) then set

Warning 'could not find object file' on NSAppleScript -executeAndReturnError

2009-02-06 Thread Steve Cronin
Folks; I use AppleScript to accomplish some inter-application tasks. Over time I have a developed several utility routines in Cocoa, one of which is to return the results of an arbitrary script execution. as an NSString: - (NSString *) getStringResutlFromAppleScript:(NSString *)theScript {

NSTableView and DataSource problem

2009-02-06 Thread Valentin Dan
Hi, I'm having difficulties changing the data in the data source for the table view. The table view keeps updating like crazy and sometimes it crashes my app; or at least I think that's what crashes it. Anyway, what's the proper method for updating the data for the list ? I need to cha

Re: Simple memory problem

2009-02-06 Thread harry greenmonster
On 6 Feb 2009, at 14:18, Steve Sisak wrote: If you use an Objective-C 2.0 property (rather than a variable) and specifying retain semantics, you'll get that behavior -- with a bit of overhead. Ah interesting, just the kind of result I was hoping to obtain from asking dumb questions. In my

Re: Simple memory problem

2009-02-06 Thread Steve Sisak
At 1:32 PM + 2/6/09, harry greenmonster wrote: But why can the compiler not replace the data at the memory location pointed to by the old 'inputString' without making a second pointer (with the same name). This would then pose no problems in the scenarios you put forward.? If you use an O

Re: Simple memory problem

2009-02-06 Thread Sherm Pendley
On Feb 6, 2009, at 8:32 AM, harry greenmonster wrote: Yes, memory management is a weak point of mine, which I'm currently trying to resolve. Last time I had any use for in-depth memory management was 15 years ago. Then you're in luck! Non-GC memory management in Cocoa is a *far* simpler t

Re: NSTask + incomplete stdout at end of process

2009-02-06 Thread xEsk PiV
Thanks Ken, I suspect the tool, or the library it is using for output (ncurses?), is > detecting whether or not its output is a terminal device (tty). How can I know it? What happens if you run the tool at the shell but redirect its output to: 1) > a file, or 2) a pipe to 'less', 'more', or 'op

Re: Simple memory problem

2009-02-06 Thread harry greenmonster
Forgot to add: As long as the returned type was the same. So instead.. inputString = [inputString StringFromMyMethod]; On 6 Feb 2009, at 13:32, harry greenmonster wrote: Yes, memory management is a weak point of mine, which I'm currently trying to resolve. Last time I had any use for in-de

Re: Simple memory problem

2009-02-06 Thread harry greenmonster
Yes, memory management is a weak point of mine, which I'm currently trying to resolve. Last time I had any use for in-depth memory management was 15 years ago. By posing these questions I'm hoping to clear up grey areas, and they should not be taken as serious proposals for addition to the

Re: Relaunching App Programmatically - Terminal Window Shows up

2009-02-06 Thread Oleg Krupnov
Thanks! It works indeed, except that the relaunched application does not display at front of other windows. It is buried under many other windows. How do I bring it to front? BTW what is this processIdentifier thing intended for? Am I meant to check this id in the main app, when it starts, and wai

Re: Relaunching App Programmatically - Terminal Window Shows up

2009-02-06 Thread slasktrattena...@gmail.com
You don't need a helper app for this. - (void) relaunch { int processIdentifier = [[NSProcessInfo processInfo] processIdentifier]; NSString *myPath = [NSString stringWithFormat:@"%s", [[[NSBundle mainBundle] executablePath] fileSystemRepresentation]]; [NSTask launch

Re: garbage collection is ON NSCFDictionary crash

2009-02-06 Thread Jesse Grosjean
With Bill's help I've found at least one cause of the garbage collection is ON NSCFDictionary crash. If anyone else has a garbage collected app that crashes frequently on startup with the crash described above check for the presence of: /Library/QuickTime/Sonix SN9C102p WebCam.component/Contents/

Re: Simple memory problem

2009-02-06 Thread Jeremy Pereira
On 6 Feb 2009, at 06:32, Martin Wierschin wrote: On Feb 5, 2009, at 4:42 PM, Steve Sisak wrote: NSString * newString = [inputString stringByReplacingCharactersInRange:range withString:@""]; [inputString release]; // release old inputString inputString = [newString retain];

Re: Simple memory problem

2009-02-06 Thread Bryan Henry
It sounds to me like you want to use garbage collection, not manual memory management. Does C automatically free() memory when pointers get replaced? No, obviously not. Doing so would be silly, and its even more silly to want such behavior with Objective-C. This: inputString = [NSString

Re: control app with help iphone?

2009-02-06 Thread Carlo Gulliani
ow, thanks, i've found some examples, i'll try to understand them From: Mike Abdullah To: Carlo Gulliani Cc: cocoa-dev Sent: Friday, February 6, 2009 1:09:30 PM Subject: Re: control app with help iphone? You want to read up on Bonjour. This is how Apple's Rem

Stack Trace Using Google Toolbox for Mac

2009-02-06 Thread Oleg Krupnov
I've just tried to use some code from the Google Toolbox for Mac (http://code.google.com/p/google-toolbox-for-mac/) for capturing stack trace, and it works great! I get the human-readable names of the Cocoa classes and methods. It gives human-readable output both in Debug and Release configuration

Re: Simple memory problem

2009-02-06 Thread harry greenmonster
I cant help but think the preferable way Objective C should would is to send a release automatically to the receiver of a product of itself. inputString = [inputString myMethod]; Its fairly clear in this situation that the original 'inputString' is not wanted and needs to die, and would see

Re: control app with help iphone?

2009-02-06 Thread Mike Abdullah
You want to read up on Bonjour. This is how Apple's Remote app detects copies of iTunes on the local network. On 6 Feb 2009, at 08:43, Carlo Gulliani wrote: good morning, everybody. Does anybody know how my app can receive command from iphone? for example, how appleremote app works from ap

control app with help iphone?

2009-02-06 Thread Carlo Gulliani
good morning, everybody. Does anybody know how my app can receive command from iphone? for example, how appleremote app works from appstore? example, my iphone's app has 2 buttons: the first btn, the second btn. Also i have my app on mac in objective-c, with help iphone i wanna control my app,

Re: NSTask + incomplete stdout at end of process

2009-02-06 Thread Andrew Farmer
On 05 Feb 09, at 22:10, Ken Thomases wrote: On Feb 5, 2009, at 10:48 PM, xEsk PiV wrote: I'm using NSTask for executing a command line tool, but I'm having some troubles getting the entire output. I explain the situation: 1) When I execute the command line tool using the Terminal, the tool whi

Re: Quicktime Movie View error

2009-02-06 Thread Kyle Sluder
On Fri, Feb 6, 2009 at 1:05 AM, elliott cable wrote: > today, and I'm running into the same problem. Does anybody know how I > can fix it *without* switching away from XIBs? (I'm versioning my > stuff in git, I have to use XIBs to get merging functionality). How is Git able to merge changes to XI

Re: Quicktime Movie View error

2009-02-06 Thread Joey Hagedorn
On Feb 5, 2009, at 10:05 PM, elliott cable wrote: On Tue Nov 11 05:09:44 2008, Joey Hagedorn wrote: On Nov 10, 2008, at 3:01 PM, Christopher Kempke wrote: I'm trying to create a very, very simple QuickTime viewer in Cocoa. I create a new Application, add QTKit and Quicktime frameworks, and d