Re: Retrieving Multiple Anchor Tags.

2009-05-15 Thread Kyle Sluder
On Fri, May 15, 2009 at 3:20 AM, Philip Juel Borges wrote: > My problem is that I don't know how to write the code that retrieves any > anchor tag. Any ideas? That's not really helpful.  You've basically just restated the problem here. Ladies and gentlemen it's time to play BREAK!  IT!  DOWN!  F

Slow scrolling after NSPopup implementation

2009-05-15 Thread Steven Hamilton
Hi folks, I hope I can explain this clearly enough. Here goes... ;) I have an NSTableview in my Core Data app. I have a custom controller providing the tableViews datasource and delegate methods as I need to mung the data a bit between the MOC and the View. This all works fine. In one colum

Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))

2009-05-15 Thread Cem Karan
Please ignore the original question. No ;-) It is perfectly reasonable for a handful of objects to get allocated and never freed throughout the lifetime of a run. It is perfectly reasonable for some such objects to be instantiated lazily rather than at startup. So it is normal to have so

Re: Slow scrolling after NSPopup implementation

2009-05-15 Thread Kyle Sluder
On Fri, May 15, 2009 at 5:56 AM, Steven Hamilton wrote: > - (id)tableView:(NSTableView *)tableView > objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row > { >        if ([[tableColumn identifier] isEqualToString:@"transfer"]) >        { >                self.selectedTransferIndex =

Re: Slow scrolling after NSPopup implementation

2009-05-15 Thread Steven Hamilton
On 15/05/2009, at 8:12 PM, Kyle Sluder wrote: On Fri, May 15, 2009 at 5:56 AM, Steven Hamilton wrote: - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row { if ([[tableColumn identifier] isEqualToString:@"transfer"]) {

Re: Slow scrolling after NSPopup implementation

2009-05-15 Thread Kyle Sluder
On Fri, May 15, 2009 at 6:41 AM, Steven Hamilton wrote: > Hmm, clearly I'm doing it all wrong. I assumed (from past problems) that the > delegate method can't return a value to an popup in a tableView and that you > use the opportunity of the method call to set the selectedIndex. I've now > change

Re: Slow scrolling after NSPopup implementation

2009-05-15 Thread Steven Hamilton
On 15/05/2009, at 8:53 PM, Kyle Sluder wrote: On Fri, May 15, 2009 at 6:41 AM, Steven Hamilton wrote: Hmm, clearly I'm doing it all wrong. I assumed (from past problems) that the delegate method can't return a value to an popup in a tableView and that you use the opportunity of the method

Re: Slow scrolling after NSPopup implementation

2009-05-15 Thread Kyle Sluder
On Fri, May 15, 2009 at 7:10 AM, Steven Hamilton wrote: > Hmm, so we're saying that -tableView:willDisplayCell:forTableColumn:row: > cannot be used to set the value I want displayed in an NSPopupCell in a > column? I must use -tableView:willDisplayCell:forTableColumn:row: instead > which, as far a

Re: Slow scrolling after NSPopup implementation

2009-05-15 Thread Steven Hamilton
On 15/05/2009, at 9:24 PM, Kyle Sluder wrote: On Fri, May 15, 2009 at 7:10 AM, Steven Hamilton wrote: Hmm, so we're saying that - tableView:willDisplayCell:forTableColumn:row: cannot be used to set the value I want displayed in an NSPopupCell in a column? I must use -tableView:willDisplayC

Re: NSOpenPanel listing .app's and Mac OS X executables

2009-05-15 Thread Arun
Hi.. If i use type: [NSArray arrayWithObjects:@"public.executable",@"app",nil], i am able to select unix-executables and .app's in Leopard. But if i try the same thing in tiger, it is not allowing me to select unix-executable files. Is there any special option that i need to pass ? Thanks Arun KA

Unknown Host: Operation timed out Error

2009-05-15 Thread Shraddha Karwan
Hi, I am writing an iPhone application. When I traverse from the main screen to a second screen, an AlertView is displayed. If the user clicks on the Cancel button of this alert view I am traversing back to the main screen. I used this [self.navigationController popToViewController: [self.navigat

Re: Unknown Host: Operation timed out Error

2009-05-15 Thread Andrew Farmer
On 15 May 09, at 04:54, Shraddha Karwan wrote: I am writing an iPhone application. When I traverse from the main screen to a second screen, an AlertView is displayed. If the user clicks on the Cancel button of this alert view I am traversing back to the main screen. I used this [self.naviga

Re: Unknown Host: Operation timed out Error

2009-05-15 Thread Shraddha Karwan
Ok, but then what else could be the reason for the crash. The error message is absolutely unexplainable. Also seems like not many developers have come across this error. Am I missing out on some thing? On Fri, May 15, 2009 at 5:34 PM, Andrew Farmer wrote: > On 15 May 09, at 04:54, Shraddha Karwa

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Scott Ribe
Welcome, I was a 4D developer for 20 years before bailing. (Reliability was my motivation, not so much cost). Anyway, of course you can write an invoicing program in Cocoa. You have a lot more choices to make up front because there is no tightly integrated database backend. If you're always going t

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Robert Claeson
On 15 May 2009, at 14:51, Scott Ribe wrote: In the end though, once you learn Cocoa and master your chosen database & access technology, you may find that although initial coding takes a little more time than 4D, that is far more than made up for in decreased debugging time from not worki

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Scott Ribe
> The main > disadvantage that plain Cocoa has over a 4G package such as 4D is the > lack of a decent, priceworthy reporting front-end that can be used to > easily and quickly design all sorts of printouts that has to be made. Good point. -- Scott Ribe scott_r...@killerbytes.com http://www.kil

UITableViewCell instances

2009-05-15 Thread Mike Manzano
In the template UITableViewController that instantiates cells by first attempting to dequeue them, is that same dequeued cell used to draw all visible rows, or is there a separate cell used for each row? The docs I've read mention queueing different cells of different types, so it's obviou

Re: UITableViewCell instances

2009-05-15 Thread Dave DeLong
A different cell instance is used for each visible row. The point of the queue is so that you don't have to instantiate a new cell for every row in your table. The UITableView will "recycle" old cells (ie, cells that are no longer visibly on the screen) when it is about to display a new c

Disabling menu items

2009-05-15 Thread McLaughlin, Michael P.
In a Cocoa Document project (latest Xcode), I want to have only one document open at a time. I thought that I could do this by subclassing NSDocumentController but I have been only partially successful. For instance, just as a test, the subclass code contains -(BOOL)validateUserInterfaceItem:(id

Question about NSURLConnection and cache(ing)

2009-05-15 Thread Eric E. Dolecki
I just started playing with NSURLConnection - and in my example everything seems to work on initial load of an image asset. Once it's cached, I'd think I'd get the cached version of the URL back instead, and I don't see anything in my UIImageView... and the size is reported incorrectly. When it run

Re: singletons and autoreleased objects

2009-05-15 Thread Marcel Weiher
On May 13, 2009, at 8:30 , Karan, Cem (Civ, ARL/CISD) wrote: I have an object that I've turned into a singleton via the techniques described at: http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#/ /apple_ref/doc/uid/TP40002974-CH4-SW3

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Ilan Volow
I'm working on a Cocoa-based ERP that uses PostgeSQL on the backend. Invoicing is among the things it does. Yes, it is possible to do write such a thing, though you will have to work out a preferred way to (un)persist your data objects to/from the database (or use someone else's framework t

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Ilan Volow
WebKit+CSS is almost there for business reports, IMHO and I've had some success in going this route. The main stumbling block I've encountered is that WebKit (as far as I can tell) still lacks support for a lot of the CSS3 paged media functionality, so I end up doing PITA workarounds for st

Re: NSOpenPanel listing .app's and Mac OS X executables

2009-05-15 Thread Corbin Dunn
On May 15, 2009, at 4:52 AM, Arun wrote: Hi.. If i use type: [NSArray arrayWithObjects:@"public.executable",@"app",nil], i am able to select unix-executables and .app's in Leopard. But if i try the same thing in tiger, it is not allowing me to select unix-executable files. Is there any

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Robert Claeson
On 15 May 2009, at 16:16, Ilan Volow wrote: I'm working on a Cocoa-based ERP that uses PostgeSQL on the backend. Invoicing is among the things it does. Yes, it is possible to do write such a thing, though you will have to work out a preferred way to (un)persist your data objects to/from th

Re: Disabling menu items

2009-05-15 Thread Mike Abdullah
If you have no idea what the First Responder is, you are clearly out of your depth. Step back and read up on the Responder Chain. It is a very important concept and central to Cocoa. Mike Abdullah. On 15 May 2009, at 16:01, McLaughlin, Michael P. wrote: In a Cocoa Document project (latest X

Re: NSOpenPanel listing .app's and Mac OS X executables

2009-05-15 Thread Arun
ok.. what is the option in Tiger? any suggestions? -Arun On Fri, May 15, 2009 at 9:04 PM, Corbin Dunn wrote: > > On May 15, 2009, at 4:52 AM, Arun wrote: > > Hi.. >> >> If i use type: [NSArray arrayWithObjects:@"public.executable",@"app",nil], >> i am able to select unix-executables and .app's

Re: NSOpenPanel listing .app's and Mac OS X executables

2009-05-15 Thread Corbin Dunn
Since the open panel is based on extensions, and most unix executables don't have extensions, you will have to use the save panel delegate method to determine if a file should be displayed or not (see the header). Or, alternatively, require Leopard for your app. corbin On May 15, 2009, at

-[NSScriptCommand suspendExecution]

2009-05-15 Thread kvic...@pobox.com
(note: i posted this to the applescript implementors list earlier this week, but i haven't received any replies. i'm reposting here in the hope that someone here may be able to help. my apologies if this is a violation of the rules.) if i call -[NSScriptCommand suspendExecution] whilst executi

Re: Disabling menu items

2009-05-15 Thread McLaughlin, Michael P.
On 5/15/09 11:52 AM, "Mike Abdullah" wrote: > If you have no idea what the First Responder is, you are clearly out > of your depth. Step back and read up on the Responder Chain. It is a > very important concept and central to Cocoa. > > Mike Abdullah. > I know what a First Responder is, I just

Re: Unknown Host: Operation timed out Error

2009-05-15 Thread Shawn Erickson
On Fri, May 15, 2009 at 6:40 AM, Shraddha Karwan wrote: > Ok, but then what else could be the reason for the crash. The error message > is absolutely unexplainable. Also seems like not many developers have come > across this error. Am I missing out on some thing? Please provide us with more infor

Re: NSURLConnection vs. NSThread

2009-05-15 Thread Luke the Hiesterman
On May 14, 2009, at 5:35 PM, Michael Ash wrote: I agree completely that the simplest code should win, but I also think that the thread adds complexity, not just overhead. My point is that some programmers might find using NSThread fits their way of thinking best. Others might find NSURLConn

Re: UITableViewCell instances

2009-05-15 Thread Luke the Hiesterman
Also, the cell "types" are determined by the string you provide in initWithFrame:reuseIdentifier: Each unique identifier will have its own reuse pool which can later be recalled by using the same string with dequeueReusableCellWithIdentifier: The idea is that cells that have the same basi

Re: Disabling menu items

2009-05-15 Thread Quincey Morris
On May 15, 2009, at 08:01, McLaughlin, Michael P. wrote: In a Cocoa Document project (latest Xcode), I want to have only one document open at a time. I thought that I could do this by subclassing NSDocumentController but I have been only partially successful. ... There must be an easy way t

[iPhone] NSURLConnection cache problem?

2009-05-15 Thread Eric E. Dolecki
I am running a test with NSURLConnection fetching an image from a url - it seems to work fine in the simulator a few times, on an actual device it always seems to fail. I am simply loading an image into a UIView. cachePolicy is set to NSURLRequestReturnCacheDataElseLoad. I have defined a NSMutableD

RE: singletons and autoreleased objects

2009-05-15 Thread Karan, Cem (Civ, ARL/CISD)
> On May 13, 2009, at 8:30 , Karan, Cem (Civ, ARL/CISD) wrote: > > > I have an object that I've turned into a singleton via the > techniques > > described at: > > > > > http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaFundame > > ntals/CocoaObjects/CocoaObjects.html#/ > > /apple_r

User Access Rights

2009-05-15 Thread iseecolors
I am looking for how to determine if a given user is allowed to Administer the host computer or not. I am guessing that there is something similar to CFPreferencesCopyValue or NSUserName that I can use to determine this information. Any hints ? Rich Collyer __

Re: User Access Rights

2009-05-15 Thread Kyle Sluder
On Fri, May 15, 2009 at 2:33 PM, iseecolors wrote: > I am looking for how to determine if a given user is allowed to Administer > the host computer or not.  I am guessing that there is something similar to > CFPreferencesCopyValue or NSUserName that I can use to determine this > information. Don'

Re: User Access Rights

2009-05-15 Thread iseecolors
Actually the only reason I want to know is that tech support wants to know when a user calls in. I just want to place some text in the UI, so that indicates whether the user has admin rights or not. Rich On May 15, 2009, at 12:02 PM, Kyle Sluder wrote: On Fri, May 15, 2009 at 2:33 PM, ise

Re: User Access Rights

2009-05-15 Thread I. Savant
On Fri, May 15, 2009 at 3:15 PM, iseecolors wrote: > Actually the only reason I want to know is that tech support wants to know > when a user calls in. > > I just want to place some text in the UI, so that indicates whether the user > has admin rights or not. In this case, I *think* Directory S

Re: User Access Rights

2009-05-15 Thread Ken Thomases
On May 15, 2009, at 2:21 PM, I. Savant wrote: On Fri, May 15, 2009 at 3:15 PM, iseecolors wrote: Actually the only reason I want to know is that tech support wants to know when a user calls in. I just want to place some text in the UI, so that indicates whether the user has admin rights

Re: User Access Rights

2009-05-15 Thread I. Savant
On Fri, May 15, 2009 at 3:36 PM, Ken Thomases wrote: >> In this case, I *think* Directory Services can help. I may be wrong. >> Worth a search, though. > > Or possibly the new Identity Services API. http://developer.apple.com/documentation/Networking/Conceptual/IdentityServices_ProgGuide/Introdu

Categories and splitting an app into logical blocks.

2009-05-15 Thread Тимофей Даньшин
Hello. Suppose, I have an app that, for example, works with a database. It can write to the db, it can select things. There is a class that works with the database, a class that controls that class and a class that interacts with the gui. And, of course, there is some testing code in all

Binding to an NSArrayController subclass

2009-05-15 Thread BJ Homer
I have an NSTableView displaying a collection of rules. (Let's imagine they're smart playlists, a la iTunes.) I set up an NSArrayController to provide access to these playlists, and at that level, everything works. The ArrayController has its contentSet as the set of playlists, and I can display

Re: UITableViewCell instances

2009-05-15 Thread Mike Manzano
Okay, so each row is its own cell instance, and when a cell goes off- screen UITableView re-queues it. What happens, however, if I want to, e.g., start a jack-in-the-box animation in a cell subview that pops after 10 seconds. If the 10 seconds hasn't elapsed yet, but the cell is scrolled off

Re: Binding to an NSArrayController subclass

2009-05-15 Thread mmalc Crawford
Don't bind the column to a different object; instead, implement the table view data source methods (either in your array controller subclass or in the controller class that manages the array) and implement them just for that column to return the derived value. (And set the datasource for

Re: UITableViewCell instances

2009-05-15 Thread Eric E. Dolecki
Why would you want to stop the reallocation of the cell that you can't see anymore? On Fri, May 15, 2009 at 4:33 PM, Mike Manzano wrote: > Okay, so each row is its own cell instance, and when a cell goes off-screen > UITableView re-queues it. What happens, however, if I want to, e.g., start a > j

Re: UITableViewCell instances

2009-05-15 Thread Luke the Hiesterman
I think a better solution is to not do whatever you're going to do if the cell has gone off screen. You could easily check when your timer fires if the relevant cell is in view. This is where, as I mentioned in another thread, I prefer holding onto a reference to the NSIndexPath of the row

Re: User Access Rights

2009-05-15 Thread iseecolors
This looks perfect, except (and I hate to say this), I need a solution that works on 10.4 too. Thank you for all the help. Rich Collyer On May 15, 2009, at 12:38 PM, jonat...@mugginsoft.com wrote: On 15 May 2009, at 20:15, iseecolors wrote: Actually the only reason I want to know is that

Re: Categories and splitting an app into logical blocks.

2009-05-15 Thread Erik Buck
Is it a good idea to split all those classes into categories for  writing, reading and testing? For example, Database (Writing),  Database(Reading), Database(Testing) and so on? Or is it a silly thing  to do for some reason?   Maybe ?  What trade-offs have you considered ?  On reason to use cat

Re: NSCFArray autoreleased with no pool in place

2009-05-15 Thread Greg Parker
On May 14, 2009, at 9:58 PM, Tron Thomas wrote: That did the trick. The stack trace allowed me to track down the cause of the error. Because Objective-C++ does not have a concept of class static variables I had an NSArray defined in an anonymous namespace in the implementation module that

IP detection code by country

2009-05-15 Thread Erg Consultant
Does anyone know of some Cocoa libraries for detecting which country the machine's IP address is currently running in? Thanks. Erg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comment

Re: Disabling menu items

2009-05-15 Thread Jerry Krinock
On May 15, 2009, at 08:01, McLaughlin, Michael P. wrote: There must be an easy way to do all of this. Mike's advice is correct. Understanding how to get menu items enabled/ disabled often requires more than the back of an envelope. Could someone point me to a code example somewhere? Or

Re: IP detection code by country

2009-05-15 Thread Dave Carrigan
On May 15, 2009, at 4:04 PM, Erg Consultant wrote: Does anyone know of some Cocoa libraries for detecting which country the machine's IP address is currently running in? http://www.maxmind.com/app/c -- Dave Carrigan d...@rudedog.org Seattle, WA, USA PGP.sig Description: This is a digital

Re: IP detection code by country

2009-05-15 Thread Тимофей Даньшин
I once used the "IP-to-country" database for my site. It was a free-to-download-and-use csv consisting of ip ranges and countries, to which they correspond. It can easily be used to create an sqlite database. Check out http://ip-to-country.webhosting.info. But there are no Cocoa libs for th

Re: NSCFArray autoreleased with no pool in place

2009-05-15 Thread Tron Thomas
Greg Parker wrote: On May 14, 2009, at 9:58 PM, Tron Thomas wrote: That did the trick. The stack trace allowed me to track down the cause of the error. Because Objective-C++ does not have a concept of class static variables I had an NSArray defined in an anonymous namespace in the implementa

Re: NSURLConnection vs. NSThread

2009-05-15 Thread Michael Ash
On Fri, May 15, 2009 at 12:56 PM, Luke the Hiesterman wrote: > > On May 14, 2009, at 5:35 PM, Michael Ash wrote: > >> I agree completely that the simplest code should win, but I also think >> that the thread adds complexity, not just overhead. > > My point is that some programmers might find using

Re: NSCFArray autoreleased with no pool in place

2009-05-15 Thread Tron Thomas
Greg Parker wrote: On May 14, 2009, at 9:58 PM, Tron Thomas wrote: That did the trick. The stack trace allowed me to track down the cause of the error. Because Objective-C++ does not have a concept of class static variables I had an NSArray defined in an anonymous namespace in the implementa

Does -copyPath:toPath:handler run synchronously?

2009-05-15 Thread Erg Consultant
The documentation does't say whether it runs synchronously or returns immediately before the copy completes. Does anyone know? Thanks, Erg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderato

Re: User Access Rights

2009-05-15 Thread jonat...@mugginsoft.com
On 15 May 2009, at 20:15, iseecolors wrote: Actually the only reason I want to know is that tech support wants to know when a user calls in. I just want to place some text in the UI, so that indicates whether the user has admin rights or not. Rich Try the Identity Services Programming

NSPathControl popup menu

2009-05-15 Thread Ryan Joseph
How can I be notified when a user selects an item from the menu in popup menu mode? All I can get is the double click action. The example I'm looking "ObjectPath" seems to not have this functionality either. Thanks. Regards, Josef ___ Co

Re: User Access Rights

2009-05-15 Thread jonat...@mugginsoft.com
On 15 May 2009, at 22:05, iseecolors wrote: This looks perfect, except (and I hate to say this), I need a solution that works on 10.4 too. Thank you for all the help. Rich Collyer It's a bit primitive but you could issue the 'id' shell command via NSTask and scan the reply for '80(admin

Re: IP detection code by country

2009-05-15 Thread Darren Lee Keverne
Check out maxmind.com It's not cocoa as such, but it is the best I have found around and use it for some commercial apps. C interface... Darren On 16 May 2009, at 00:04, Erg Consultant wrote: Does anyone know of some Cocoa libraries for detecting which country the machine's IP address i

Re: Does -copyPath:toPath:handler run synchronously?

2009-05-15 Thread Michael Ash
On Fri, May 15, 2009 at 10:41 PM, Erg Consultant wrote: > The documentation does't say whether it runs synchronously or returns > immediately before the copy completes. Sure it does: Return Value YES if the copy operation is successful. If the operation is not successful, but the callback handl

Re: NSCFArray autoreleased with no pool in place

2009-05-15 Thread Michael Ash
On Fri, May 15, 2009 at 11:00 PM, Tron Thomas wrote: > Greg Parker wrote: >> >> On May 14, 2009, at 9:58 PM, Tron Thomas wrote: >>> >>> That did the trick.  The stack trace allowed me to track down the cause >>> of the error.  Because Objective-C++ does not have a concept of class static >>> varia

Re: Using an arraycontroller for different object classes

2009-05-15 Thread Gideon King
Thanks for the suggestion Ken, but I don't think that would help. In the mini example, yes I would want the object array for weight to have the full array, and the object array for the tyre size to have the filtered array, and as you say, this could be accomplished with separate controllers

Re: Cocoa-dev Digest, Vol 6, Issue 742

2009-05-15 Thread Tron Thomas
On Fri, May 15, 2009 at 11:00 PM, Tron Thomas wrote: > Greg Parker wrote: >> >> On May 14, 2009, at 9:58 PM, Tron Thomas wrote: >>> >>> That did the trick. Â The stack trace allowed me to track down the cause >>> of the error. Â Because Objective-C++ does not have a concept of

Re: -[NSScriptCommand suspendExecution]

2009-05-15 Thread Jim Correia
On Fri, May 15, 2009 at 12:26 PM, kvic...@pobox.com wrote: > if i call -[NSScriptCommand suspendExecution] whilst execution a script > command, i find that the executing script will still time out after 2 > minutes. > > is this a bug in cocoa? or a misunderstanding on my part about > suspendExecu