Re: Automatically replacing part of text in a text label

2009-03-16 Thread Peter Zegelin
On 16/03/2009, at 6:52 PM, Mark Ritchie wrote: On 16-Mar-09, at 2:20 AM, Peter Zegelin wrote: I would like this registration dialog to be general enough that I can use it in multiple applications. Is there a simple way to replace the xxx with the actual application name at runtime? At the

Re: Debugging CoreData relationship changes?

2009-03-16 Thread Jerry Krinock
On 2009 Mar 16, at 14:24, Nick Zitzmann wrote: I could have sworn there was a debugging facility for showing the changes made to attributes and relationships upon saving in CoreData, but I've searched TFW and I can't find it. How do I find out when and where changes are made to a managed o

symlink net

2009-03-16 Thread David Blanton
On volumes that have 10.5.6 installed (maybe earlier 10.5's as well) there is a symlink to a volume named net as in /Volumes/Leopard Drive/net When viewing /net it shows two folders: broadcasthost and localhost. When calling [defaultManager fileExistsAtPath:fullPath i

Re: NSTimer: Debug vs. Release build

2009-03-16 Thread Michael Ash
On Mon, Mar 16, 2009 at 8:34 PM, Martin Wierschin wrote: >>> btw, this method doesn't have any parameter, it's definition is: >> >> Whether you need it or not, you must take it, because that's the method >> signature that NSTimer expects to call back. > > I don't want to confuse the issue for Stef

RE: Enforcing trial software on Mac

2009-03-16 Thread Jeff Laing
> I have seen a couple of fairly nice solutions, and lots of really > awful ones. Generally speaking, the awful ones try to go to great > lengths to be sneaky and hide files or other data in places in your > computer they shouldn't be messing with. Its worth pointing out that most hacker-ty

Re: Double Initialize - is that how it should be?

2009-03-16 Thread WT
I'm pretty much a Cocoa noob, so I may be wrong, but my understanding is that objects instantiated in nib files should be initialized in the -awakeFromNib method of their classes. In your specific example, the nib instantiates an object of the AppDelegate class by sending that class the nes

Re: Double Initialize - is that how it should be?

2009-03-16 Thread Sherm Pendley
On Mon, Mar 16, 2009 at 10:21 PM, Steve Cronin wrote: > > I use an object in my application called 'appDelegate'; it's a subclass of NSObject. > > I instantiate this object in the main Nib file > This object has IBActions for the main menu and since it is -app delegate it is a kind on central dis

Re: Double Initialize - is that how it should be?

2009-03-16 Thread Chris Suter
Hi Steve, On Tue, Mar 17, 2009 at 1:21 PM, Steve Cronin wrote: > Folks; > > I use an object in my application called 'appDelegate'; it's a subclass of > NSObject. > > I instantiate this object in the main Nib file > This object has  IBActions for the main menu and since it is -app delegate > it i

Re: Enforcing trial software on Mac

2009-03-16 Thread Scott Anguish
On 2009-03-16, at 10:09 PM, Peter Duniho wrote: On Mar 16, 2009, at 6:18 PM, Chris Idou wrote: Is there any accepted, or preferred or standard way of enforcing a trial software period for a program on Mac, so that people can't just delete their preferences or something and start the trial

Double Initialize - is that how it should be?

2009-03-16 Thread Steve Cronin
Folks; I use an object in my application called 'appDelegate'; it's a subclass of NSObject. I instantiate this object in the main Nib file This object has IBActions for the main menu and since it is -app delegate it is a kind on central dispatcher. My question is this: The +initialize is

Re: [Q] inconsistent naming for Core Graphics and Foundation?

2009-03-16 Thread Martin Wierschin
On 2009.03.15, at 1:21 AM, Ken Thomases wrote: I think the division isn't Core Graphics vs. Foundation (or, more generally, one framework vs. another). I think it's between legacy and new APIs. It seems fairly clear to me that Apple has adopted a convention that new APIs should be centere

Re: Enforcing trial software on Mac

2009-03-16 Thread Peter Duniho
On Mar 16, 2009, at 6:18 PM, Chris Idou wrote: Is there any accepted, or preferred or standard way of enforcing a trial software period for a program on Mac, so that people can't just delete their preferences or something and start the trial again? Or does every developer hack their own lit

Re: any recommended zip framework ?

2009-03-16 Thread Sandeep Chayapathi
spot on - thanks for the suggestion. I guess I have a bit of Rube Goldberg ( http://en.wikipedia.org/wiki/Rube_Goldberg) in me. -- Sandeep On Mon, Mar 16, 2009 at 6:18 PM, Mike Abdullah wrote: > If you are in control of these zip files, why not make use of HTTP's built > in support for deliverin

Enforcing trial software on Mac

2009-03-16 Thread Chris Idou
Is there any accepted, or preferred or standard way of enforcing a trial software period for a program on Mac, so that people can't just delete their preferences or something and start the trial again? Or does every developer hack their own little solution? (i.e. write a file to an obscure pla

Re: case-insensitive NSDictionary

2009-03-16 Thread Roland King
That I didn't know - thanks, I'll make sure and combine the values from repeated keys with commas. Thanks also for all the other suggestions. Given this latest point, subclassing NSMutableDictionary seems to be a good way to go as I can adjust addObjectForKey to deal with the repeated key case

Re: NSTimer: Debug vs. Release build

2009-03-16 Thread Martin Wierschin
btw, this method doesn't have any parameter, it's definition is: Whether you need it or not, you must take it, because that's the method signature that NSTimer expects to call back. I don't want to confuse the issue for Stefan, as matching up selector/ method names exactly is obviously ver

Re: [iPhone] NumberPad with the dot

2009-03-16 Thread Layton Duncan
We ran into this same problem when creating 'Convert' I didn't want to hack around with the existing keyboard, so we ended up implementing our own: http://www.polarbearfarm.com/convert/index.html Layton Duncan Polar Bear Farm http://www.polarbearfarm.com On 17/03/2009, at 11:57 AM, Jelle De

Re: [NSTableView] How should a grid be drawn?

2009-03-16 Thread Corbin Dunn
On Mar 16, 2009, at 4:06 PM, Iceberg-Dev wrote: I'm trying to draw a custom grid for a table view. I' using the code at the end of this post. The problem is that when I scroll the tableview, some of the horizontal lines are not drawn. I looked at different sample code on the net including

[NSTableView] How should a grid be drawn?

2009-03-16 Thread Iceberg-Dev
I'm trying to draw a custom grid for a table view. I' using the code at the end of this post. The problem is that when I scroll the tableview, some of the horizontal lines are not drawn. I looked at different sample code on the net including the GNUStep source code and found none that was

[iPhone] NumberPad with the dot

2009-03-16 Thread Jelle De Laender
Hi, I was a little bit surprised because the default number pad doesn't contains a dot. I've created an application and the user need to enter decimal numbers. The default number pad is: http://h4xr.org/ifm4 (see UITextInputTraits Protocol Reference) There is an empty space at the left-bo

Re: any recommended zip framework ?

2009-03-16 Thread Mike Abdullah
If you are in control of these zip files, why not make use of HTTP's built in support for delivering compressed content? I believe NSURLConnection will handle this transparently. On 16 Mar 2009, at 20:42, Sandeep Chayapathi wrote: Hi all, Im looking for a framework to unzip a given file (ei

Re: Changing a custom field editor's position

2009-03-16 Thread Corbin Dunn
On Mar 15, 2009, at 9:45 AM, Ulai Beekam wrote: Hi, Let's say I want to have the field editor for a table view appear 2 pixel below where it usually is, i.e. shifted 2 pixels down. How can I do this? Consider the following hypothetical situation: If I subclass NSTextView and override th

Re: case-insensitive NSDictionary

2009-03-16 Thread Michael Vannorsdel
You could also just make your own wrapper class for NSDictionary with the usual set/remove methods and sub the key in the wrapper. On Mar 16, 2009, at 9:37 AM, Bill Bumgarner wrote: Wile certainly a creative solution, this suggestion is an 11 on the scale of 1 to 10 of bad ideas. Even if

Debugging CoreData relationship changes?

2009-03-16 Thread Nick Zitzmann
I could have sworn there was a debugging facility for showing the changes made to attributes and relationships upon saving in CoreData, but I've searched TFW and I can't find it. How do I find out when and where changes are made to a managed object's attributes or relationships? I've got a

Re: case-insensitive NSDictionary

2009-03-16 Thread Jeremy Pereira
When I had to solve the exact same problem, I created a new class that wrapped the NSString as an ivar and defined my own hash and isEqual methods (which both used the corresponding methods on a lower case version of the string) and implemented NSCopying (easy because my class was immutable

Re: any recommended zip framework ?

2009-03-16 Thread I. Savant
On Mon, Mar 16, 2009 at 4:42 PM, Sandeep Chayapathi wrote: > Im looking for a framework to unzip a given file (either as a NSData or as > a file path). I have search cocoa-dev mailing, so far I have come across > this framework: http://code.google.com/p/zip-framework/ and one example that > call

any recommended zip framework ?

2009-03-16 Thread Sandeep Chayapathi
Hi all, Im looking for a framework to unzip a given file (either as a NSData or as a file path). I have search cocoa-dev mailing, so far I have come across this framework: http://code.google.com/p/zip-framework/ and one example that calls 'unzip' in the background. Can you recommend a good framewo

Re: Garbage Collection, Core Foundation, and the -finalize problem

2009-03-16 Thread Michael Tsai
On Mar 16, 2009, at 4:07 PM, Bill Cheeseman wrote: My question is how to know when to call my -invalidate method to clean up everything related to the ivar once I am through with the ivar. Either the code creating your object knows when to call -invalidate (through more global knowledge o

Re: Garbage Collection, Core Foundation, and the -finalize problem

2009-03-16 Thread Bill Cheeseman
On Mar 16, 2009, at 3:48 PM, Quincey Morris wrote: Assuming you do *not* call CFMakeCollectable or NSMakeCollectable, it's perfectly OK to have a finalize method that calls CFRelease. Because the CF instance variable lifetime is *not* GC-managed in that case, there's no chance that GC will

ipod touch and 2 UIViews

2009-03-16 Thread Carlo Gulliani
i have 3 classes: SwitchController and 2 classes for each XIB. i wanna change view with help 'mapCurl' effect, my SwitchController.m has the next code: - (void)viewDidLoad { SecondViewController*secondController = [[SecondViewControlleralloc] initWithNibName:@"SecondView"bundle:nil]; self.secon

Re: Garbage Collection, Core Foundation, and the -finalize problem

2009-03-16 Thread Bill Cheeseman
On Mar 16, 2009, at 2:32 PM, Michael Tsai wrote: On Mar 16, 2009, at 2:08 PM, Bill Cheeseman wrote: I am looking for a strategy to avoid implementing a -finalize method in a garbage-collected Objective-C class that declares a CFTypeRef-style Core Foundation instance variable. I believe this

Re: Garbage Collection, Core Foundation, and the -finalize problem

2009-03-16 Thread Quincey Morris
On Mar 16, 2009, at 11:08, Bill Cheeseman wrote: I am looking for a strategy to avoid implementing a -finalize method in a garbage-collected Objective-C class that declares a CFTypeRef- style Core Foundation instance variable. I believe this is a fairly common problem, because any Cocoa wrap

Working with weekdays on NSDate, NSDateComponents, NSCalendar and NSValueTransformer

2009-03-16 Thread Michele Barboni
Hi, I'm developing a small CoreData app which is essentially a week scheduler, so, I " don't have " to worry about years, month, days etc.. only weekdays, hours and minutes. For editing timings (weekday, hour and minute) I have a NSSegmentedControl with 7 segments named Monday, Thuesday, W

Re: Garbage Collection, Core Foundation, and the -finalize problem

2009-03-16 Thread Michael Tsai
On Mar 16, 2009, at 2:08 PM, Bill Cheeseman wrote: I am looking for a strategy to avoid implementing a -finalize method in a garbage-collected Objective-C class that declares a CFTypeRef- style Core Foundation instance variable. I believe this is a fairly common problem, because any Cocoa wr

Re: case-insensitive NSDictionary

2009-03-16 Thread Sherm Pendley
On Mon, Mar 16, 2009 at 2:20 PM, Stuart Malin wrote: > > On Mar 16, 2009, at 7:55 AM, Sherm Pendley > wrote: > > Beats me - I've often wondered the same thing. All you need to do is > implement the required primitive methods. What's so hard about that? > > > Question from a non-expert: > > How d

Re: case-insensitive NSDictionary

2009-03-16 Thread Michael Ash
On Mon, Mar 16, 2009 at 2:20 PM, Stuart Malin wrote: > > On Mar 16, 2009, at 7:55 AM, Sherm Pendley  wrote: > > On Mon, Mar 16, 2009 at 12:03 PM, Michael Ash wrote: > > > Why does everybody think that subclassing a class cluster is hard? > > > Beats me - I've often wondered the same thing. All yo

Re: case-insensitive NSDictionary

2009-03-16 Thread Bill Bumgarner
On Mar 16, 2009, at 11:20 AM, Stuart Malin wrote: How does one know just which methods are "required primitive" methods for some class? Is that discernible from documentation? Header file? They are documented, but the header files also split the primitives from the rest. Look at NSString

Re: case-insensitive NSDictionary

2009-03-16 Thread Stuart Malin
On Mar 16, 2009, at 7:55 AM, Sherm Pendley wrote: On Mon, Mar 16, 2009 at 12:03 PM, Michael Ash wrote: Why does everybody think that subclassing a class cluster is hard? Beats me - I've often wondered the same thing. All you need to do is implement the required primitive methods. W

Garbage Collection, Core Foundation, and the -finalize problem

2009-03-16 Thread Bill Cheeseman
I am looking for a strategy to avoid implementing a -finalize method in a garbage-collected Objective-C class that declares a CFTypeRef- style Core Foundation instance variable. I believe this is a fairly common problem, because any Cocoa wrapper class for a Core Foundation API would have to

Re: Adding multiple NSTextViews inside one NSScrollView

2009-03-16 Thread Ross Carter
On Mar 16, 2009, at 10:39 AM, Kyle Sluder wrote: On Mon, Mar 16, 2009 at 9:17 AM, Ashish Tiwari wrote: The behavior I want is that when user scrolls the shared ScrollView all 3 textviews should scroll simultaneously. Ah, is this kind of like a 3-way diff? I had originally envisioned somet

Re: case-insensitive NSDictionary

2009-03-16 Thread Sherm Pendley
On Mon, Mar 16, 2009 at 12:03 PM, Michael Ash wrote: > > Why does everybody think that subclassing a class cluster is hard? Beats me - I've often wondered the same thing. All you need to do is implement the required primitive methods. What's so hard about that? sherm-- -- Cocoa programming i

Re: User interruption

2009-03-16 Thread I. Savant
On Mon, Mar 16, 2009 at 1:09 PM, Livio Isaia wrote: > I have a program searching data on disk for a long while and would like to > allow the user to stop the searching in any moment. What is the best and > easy way to do it? > (In addition, if the user clicks an another application during the sear

Re: case-insensitive NSDictionary

2009-03-16 Thread Bill Bumgarner
On Mar 16, 2009, at 8:57 AM, Paul Sanders wrote: Why not just subclass NSDictionary to do this? Seems straightforward to me. That would certainly be viable. I made a different assumption than you; namely that the strings should continue to hash and isEqual: as case insensitive outside o

User interruption

2009-03-16 Thread Livio Isaia
I have a program searching data on disk for a long while and would like to allow the user to stop the searching in any moment. What is the best and easy way to do it? (In addition, if the user clicks an another application during the search and then again on my application, my application doesn'

Re: Do hard links have creation dates?

2009-03-16 Thread Nick Zitzmann
On Mar 16, 2009, at 9:55 AM, Oleg Krupnov wrote: So the question boils down to this one: does the file system also stores creation dates alongside with the link ids (the nodeID), referring to the links themselves, not the files they refer to? No. As Dave said, hard links are just extra insta

Re: NSTimer: Debug vs. Release build

2009-03-16 Thread Scott Ribe
> btw, this method doesn't have any parameter, it's definition is: Whether you need it or not, you must take it, because that's the method signature that NSTimer expects to call back. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___

Re: case-insensitive NSDictionary

2009-03-16 Thread Paul Sanders
> Why not just subclass NSDictionary to do this? Seems straightforward to > me. > What is swizzling? Ah, OK, having just read Michael's post I now understand what the problem is. Sorry about that, the solution proposed is otherwise admirably simple. Rgds - Paul Sanders.

Re: case-insensitive NSDictionary

2009-03-16 Thread Michael Ash
On Mon, Mar 16, 2009 at 11:52 AM, Jean-Daniel Dupas wrote: > > Le 16 mars 09 à 16:37, Bill Bumgarner a écrit : > >> On Mar 16, 2009, at 7:05 AM, Dave DeLong wrote: >>> >>> You could swizzle the objectForKey: and setObject:forKey: methods with >>> your own that just lowercase the passed in string a

Re: case-insensitive NSDictionary

2009-03-16 Thread Paul Sanders
>> You could swizzle the objectForKey: and setObject:forKey: methods >> with your own that just lowercase the passed in string and then call >> the actual methods with the new key. > Wile certainly a creative solution, this suggestion is an 11 on the > scale of 1 to 10 of bad ideas. Even if it w

Re: Do hard links have creation dates?

2009-03-16 Thread Oleg Krupnov
I would agree, but there's one detail that makes me doubt. Here is my code: FSCatalogInfo catInfo; FSGetCatalogInfo(fsRef, kFSCatInfoCreateDate | kFSCatInfoNodeFlags, &catInfo, NULL, NULL, NULL); if (catInfo.nodeFlags & kFSNodeHardLinkMask) { int whatIsThisNodeId = catInfo.nodeID; }

Re: case-insensitive NSDictionary

2009-03-16 Thread Jean-Daniel Dupas
Le 16 mars 09 à 16:37, Bill Bumgarner a écrit : On Mar 16, 2009, at 7:05 AM, Dave DeLong wrote: You could swizzle the objectForKey: and setObject:forKey: methods with your own that just lowercase the passed in string and then call the actual methods with the new key. Wile certainly a crea

Re: case-insensitive NSDictionary

2009-03-16 Thread Michael Ash
On Mon, Mar 16, 2009 at 11:07 AM, Dave DeLong wrote: > As a followup, I tried doing this just now, and then realized that I'd > forgotten that NSDictionary is a class cluster, and so it would probably > take a lot of gentle massaging to get this method to work correctly. > > Using the callback wou

Re: Do hard links have creation dates?

2009-03-16 Thread Dave Carrigan
On Mar 16, 2009, at 8:27 AM, Oleg Krupnov wrote: If I create a file and then a hard link to that file, is there a way to distinguish their creation dates (e.g. to sort by date)? A hard link is simply an entry in the directory that points to the physical file. No matter how many hard links

Re: MobileMe API for uploading photos

2009-03-16 Thread Nick Zitzmann
On Mar 15, 2009, at 10:32 PM, Deepa wrote: Are there any APIs available for uploading photos to MobileMe account? There are, but you don't want to use them. Apple once made a DotMacKit framework that would upload anything to MobileMe, but it hasn't been updated in years, it's horribly ob

Re: case-insensitive NSDictionary

2009-03-16 Thread Bill Bumgarner
On Mar 16, 2009, at 7:05 AM, Dave DeLong wrote: You could swizzle the objectForKey: and setObject:forKey: methods with your own that just lowercase the passed in string and then call the actual methods with the new key. Wile certainly a creative solution, this suggestion is an 11 on the sc

SearchKit quiestion.

2009-03-16 Thread Тимофей Даньшин
Hi all. In my application I have to search for strings closest matching a given string. So, for example, if the "given string" is "Hello. Would you like some oranges", I need to find "Hello. Would you like some lemons" or "Hello. Would you want some oranges" (if they are in the database)

Do hard links have creation dates?

2009-03-16 Thread Oleg Krupnov
I apologize for a not Cocoa-specific question, but I really can't find the answer anywhere, or I must be using wrong keywords. If I create a file and then a hard link to that file, is there a way to distinguish their creation dates (e.g. to sort by date)? It appears that in Terminal and in Finder

Re: case-insensitive NSDictionary

2009-03-16 Thread Dave DeLong
As a followup, I tried doing this just now, and then realized that I'd forgotten that NSDictionary is a class cluster, and so it would probably take a lot of gentle massaging to get this method to work correctly. Using the callback would probably be easier. =) Dave On Mar 16, 2009, at 8:

Re: case-insensitive NSDictionary

2009-03-16 Thread Adam R. Maxwell
On Mar 16, 2009, at 7:37 AM, Michael Ash wrote: On Mon, Mar 16, 2009 at 10:26 AM, Adam R. Maxwell wrote: On Mar 16, 2009, at 7:02 AM, Roland King wrote: Any good ideas for doing a key-case-insensitive NSDictionary of NSString to NSString? I have some HTTP headers I want to stick in a d

Re: Adding multiple NSTextViews inside one NSScrollView

2009-03-16 Thread Kyle Sluder
On Mon, Mar 16, 2009 at 9:17 AM, Ashish Tiwari wrote: > The behavior I want is that when user scrolls the shared ScrollView all 3 > textviews should scroll simultaneously. Ah, is this kind of like a 3-way diff? I had originally envisioned something like a three-column document layout, almost lik

Re: case-insensitive NSDictionary

2009-03-16 Thread Michael Ash
On Mon, Mar 16, 2009 at 10:26 AM, Adam R. Maxwell wrote: > > On Mar 16, 2009, at 7:02 AM, Roland King wrote: > >> Any good ideas for doing a key-case-insensitive NSDictionary of NSString >> to NSString? I have some HTTP headers I want to stick in a dictionary and >> look up later. HTTP headers hav

Re: Type Declaration With Protocol

2009-03-16 Thread Jean-Daniel Dupas
Le 16 mars 09 à 15:21, Jeremy Pereira a écrit : On 16 Mar 2009, at 12:10, Jean-Daniel Dupas wrote: No, you can't, else the compiler will complains if you do not override all NSObject protocol methods in classes that conform to the Foo protocol. No it shouldn't. The compiler should onl

Re: Messages between Threads

2009-03-16 Thread Michael Ash
On Mon, Mar 16, 2009 at 1:43 AM, Gerriet M. Denkmann wrote: > > On 15 Mar 2009, at 15:43, Joar Wingfors wrote: >> >> On 15 mar 2009, at 01.14, Paul Sanders wrote: >> >>> I was referring to where the OP said: >>> "but would it be safe, given the fact that sum and count are bound to some

Re: case-insensitive NSDictionary

2009-03-16 Thread Roland King
thank you - I really must think about searching the CF-equivalent to the NS classes, there is a lot of extra stuff I have no idea at all exists. This is exactly what I need. On Mar 16, 2009, at 10:26 PM, Adam R. Maxwell wrote: On Mar 16, 2009, at 7:02 AM, Roland King wrote: Any good ideas

Re: case-insensitive NSDictionary

2009-03-16 Thread Adam R. Maxwell
On Mar 16, 2009, at 7:02 AM, Roland King wrote: Any good ideas for doing a key-case-insensitive NSDictionary of NSString to NSString? I have some HTTP headers I want to stick in a dictionary and look up later. HTTP headers have case-insensitive keys. Use a CFDictionary with custom key call

Re: Type Declaration With Protocol

2009-03-16 Thread Jeremy Pereira
On 16 Mar 2009, at 12:10, Jean-Daniel Dupas wrote: No, you can't, else the compiler will complains if you do not override all NSObject protocol methods in classes that conform to the Foo protocol. No it shouldn't. The compiler should only complain if your class does not implement those

Re: Messages between Threads

2009-03-16 Thread Michael Vannorsdel
You'll need to use an atomic operation to access tempSum in the main thread as well and make sure tempSum is on a 4 byte boundary (required by atomic ops). But a cleaner method would be to keep a local running total in the worker thread and after your time period send a message to the main

Re: case-insensitive NSDictionary

2009-03-16 Thread Dave DeLong
You could swizzle the objectForKey: and setObject:forKey: methods with your own that just lowercase the passed in string and then call the actual methods with the new key. Dave Sent from my iPod On Mar 16, 2009, at 8:02 AM, Roland King wrote: Any good ideas for doing a key-case-insensitiv

case-insensitive NSDictionary

2009-03-16 Thread Roland King
Any good ideas for doing a key-case-insensitive NSDictionary of NSString to NSString? I have some HTTP headers I want to stick in a dictionary and look up later. HTTP headers have case-insensitive keys. I could upper, or lowercase the key before putting it in the NSMutableDictionary, but th

Re: Adding multiple NSTextViews inside one NSScrollView

2009-03-16 Thread rajesh
You can always synchronize the scrollers on textViews, I am sure there is an example (by Apple) not sure if its for Text view or TableView scrollers. On Mar 16, 2009, at 2:17 PM, Ashish Tiwari wrote: Don't do that? Keep them all in their own scroll views. I need to do that I cant let each

Re: Adding multiple NSTextViews inside one NSScrollView

2009-03-16 Thread I. Savant
On Mon, Mar 16, 2009 at 5:14 AM, Ashish Tiwari wrote: > I need to have 3 NSTextViews share same NSScrollView. The ScrollView should > be able to show/scroll all contents of these 3 TextViews. Search the archives: http://www.cocoabuilder.com/archive/message/cocoa/2004/9/2/116498 -- I.S. _

RE: Adding multiple NSTextViews inside one NSScrollView

2009-03-16 Thread Ashish Tiwari
> Don't do that? Keep them all in their own scroll views. I need to do that I cant let each NSTextView has its own ScrollView. The behavior I want is that when user scrolls the shared ScrollView all 3 textviews should scroll simultaneously. Also I will look into layout manager thing suggested b

Re: Adding multiple NSTextViews inside one NSScrollView

2009-03-16 Thread Kyle Sluder
On Mon, Mar 16, 2009 at 5:14 AM, Ashish Tiwari wrote: > I need to have 3 NSTextViews share same NSScrollView. The ScrollView should > be able to show/scroll all contents of these 3 TextViews. Don't do that? Keep them all in their own scroll views. If you really want to have three separate text

Re: Type Declaration With Protocol

2009-03-16 Thread Jean-Daniel Dupas
Le 16 mars 09 à 13:04, Mike Abdullah a écrit : On 16 Mar 2009, at 11:43, Jean-Daniel Dupas wrote: Le 16 mars 09 à 12:22, Jeremy Pereira a écrit : On 14 Mar 2009, at 04:27, Roland King wrote: As NSObject is also a protocol you could probably also do id to say the object supports NSOb

Re: Renaming a file

2009-03-16 Thread Mike Abdullah
NSFileManager. Also, please do not cross-post between lists; especially the Core Audio list which is completely unsuited to such a question. On 16 Mar 2009, at 11:49, rethish wrote: Hi , How can I rename files that is stored in the document folder of an iphone application. Thank you.

Re: Type Declaration With Protocol

2009-03-16 Thread Mike Abdullah
On 16 Mar 2009, at 11:43, Jean-Daniel Dupas wrote: Le 16 mars 09 à 12:22, Jeremy Pereira a écrit : On 14 Mar 2009, at 04:27, Roland King wrote: As NSObject is also a protocol you could probably also do id to say the object supports NSObject and Protocol methods but I never do, partly

Renaming a file

2009-03-16 Thread rethish
Hi , How can I rename files that is stored in the document folder of an iphone application. 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 moderators

Re: Type Declaration With Protocol

2009-03-16 Thread Jean-Daniel Dupas
Le 16 mars 09 à 12:22, Jeremy Pereira a écrit : On 14 Mar 2009, at 04:27, Roland King wrote: As NSObject is also a protocol you could probably also do id to say the object supports NSObject and Protocol methods but I never do, partly because it doesn't seem as clear, partly because I

Re: What's the best way to access top level objects loaded from a nib?

2009-03-16 Thread Graham Cox
On 16/03/2009, at 10:12 PM, Ken Tozier wrote: I tried adding an IBOutlet to the class that loads the nib, but these objects are meant to be generic building blocks and setting filesOwner to a specific class doesn't make any sense. Suggestion: why not make Files Owner be some sort of facto

Re: Type Declaration With Protocol

2009-03-16 Thread Jeremy Pereira
On 14 Mar 2009, at 04:27, Roland King wrote: As NSObject is also a protocol you could probably also do id to say the object supports NSObject and Protocol methods but I never do, partly because it doesn't seem as clear, partly because I know that I'm always going to pass something whic

What's the best way to access top level objects loaded from a nib?

2009-03-16 Thread Ken Tozier
Hi I'm building up some complex custom views from other custom views etc, etc and am able to load nibs programatically and get the list of top level objects, but it just seems awkward to have to iterate over the list of items and do class tests to determine what I'm being handed. Is there

Re: MobileMe API for uploading photos

2009-03-16 Thread Mike Abdullah
iDisk is fully accessible by any standard WebDAV client. Is this what you had in mind, or something more specialised? On 16 Mar 2009, at 04:32, Deepa wrote: Hi All, Are there any APIs available for uploading photos to MobileMe account? Thanks in advance. Regards, Deepa -

Re: NSTimer: Debug vs. Release build

2009-03-16 Thread Graham Cox
On 16/03/2009, at 9:02 PM, Stefan Wolfrum wrote: Interestingly, if I add the colon after @selector(timerFireMethod) to read @selector(timerFireMethod:) the timerFireMethod doesn't get called anymore, in Debug AND Release builds. btw, this method doesn't have any parameter, it's definition

Re: NSTimer: Debug vs. Release build

2009-03-16 Thread Stefan Wolfrum
Interestingly, if I add the colon after @selector(timerFireMethod) to read @selector(timerFireMethod:) the timerFireMethod doesn't get called anymore, in Debug AND Release builds. btw, this method doesn't have any parameter, it's definition is: - (void)timerFireMethod { // do something }

Re: Fast dictionary with integer keys?

2009-03-16 Thread Graham Cox
On 16/03/2009, at 7:37 PM, Jean-Daniel Dupas wrote: That's why a good hash table uses primary numbers as table size This only helps if the hash function distributes more or less randomly. If your hash function turned out to hit multiples of the hash table size, prime or not, you'd end up

Adding multiple NSTextViews inside one NSScrollView

2009-03-16 Thread Ashish Tiwari
Hi, I need to have 3 NSTextViews share same NSScrollView. The ScrollView should be able to show/scroll all contents of these 3 TextViews. | | | || |

Re: Messages between Threads

2009-03-16 Thread Chris Hanson
On Mar 15, 2009, at 10:43 PM, Gerriet M. Denkmann wrote: On 15 Mar 2009, at 15:43, Joar Wingfors wrote: Please refer to the Cocoa thread safety documentations:

Re: Fast dictionary with integer keys?

2009-03-16 Thread Jean-Daniel Dupas
Le 16 mars 09 à 04:42, Chris Suter a écrit : Hi Clark, If your keys are integers, then you've got the best hash function possible: the identity function :) I know what you mean, but that's not strictly speaking true. If your integers were congruent modulo your hash table size, it wouldn't b

Re: Automatically replacing part of text in a text label

2009-03-16 Thread Mark Ritchie
On 16-Mar-09, at 2:20 AM, Peter Zegelin wrote: I would like this registration dialog to be general enough that I can use it in multiple applications. Is there a simple way to replace the xxx with the actual application name at runtime? At the moment I'm thinking I'll have to wire every label