Re: NSTrackingArea message lag

2008-06-25 Thread Quincey Morris
On Jun 25, 2008, at 23:11, Markus Spoettl wrote: I have double (quadruple actually) checked that the redrawing is not the problem, the view draws very quickly. When the mouse is being dragged over the view, the same series of redrawing events is completely instant up to a bar count of more

[NSOutlineView] Saving/Restoring the hierarchy disclosure state (Reloaded)

2008-06-25 Thread Stéphane Sudre
I'm beginning to wonder if it's possible to save and restore the current disclosure state of the hierarchy of a NSOutlineView. - Iterating the hierarchy does not save the state of hidden children. - the persistentObject API is not useful in my case as I have multiple instances of the same NS

Re: NSString help!

2008-06-25 Thread Bill Bumgarner
On Jun 25, 2008, at 11:05 PM, Omar Qazi wrote: On Jun 25, 2008, at 10:44 PM, Eric Lee wrote: Okay, I've done this: [labelField setstringValue:[textField StringValue]]; However, when I build it, and I type something in and then press the button, the string doesn't show up on the labelField I

NSTrackingArea message lag

2008-06-25 Thread Markus Spoettl
Hello List, I have a custom NSView that draws a number of rectangles of different heights, overlapping 1 pixel on the left and right edge. Each rectangle gets its own tracking area NSTrackingAreaOptions opts = (NSTrackingMouseEnteredAndExited | NSTrackingAct

Re: NSString help!

2008-06-25 Thread Omar Qazi
On Jun 25, 2008, at 10:44 PM, Eric Lee wrote: Okay, I've done this: [labelField setstringValue:[textField StringValue]]; However, when I build it, and I type something in and then press the button, the string doesn't show up on the labelField IBOutlet. How can I resolve this? Ok, Cocoa

Re: Causing CFLog error messages

2008-06-25 Thread Apparao Mulpuri
HI All, Is there any way to get/catch the error. I am planning to terminate the launch process based on the return value. Thanks & Regards, - Apparao Mulpuri. On Mon, Mar 10, 2008 at 12:04 PM, Kevin Dixon <[EMAIL PROTECTED]> wrote: > Hi, > > I'm new to Cocoa development...I've started an

tag != pointer under GC (was Re: SetControlReference equivalent in NSControl?)

2008-06-25 Thread Chris Hanson
On Jun 25, 2008, at 9:39 PM, Graham Cox wrote: On 26 Jun 2008, at 6:01 am, Kevin Elliott wrote: There is no reason to subclass his control to attach an int value (or more generally to track which instance a particular control is). See NSControl tag/setTag. They allow you to do exactly wha

Re: SetControlReference equivalent in NSControl?

2008-06-25 Thread Graham Cox
On 26 Jun 2008, at 6:01 am, Kevin Elliott wrote: There is no reason to subclass his control to attach an int value (or more generally to track which instance a particular control is). See NSControl tag/setTag. They allow you to do exactly what he wants. Well, not quite - tags store int

Re: Creating Installer Package from Cocoa

2008-06-25 Thread Wayne Packard
Since the plist is just one small file, another way to do it might be to drop the custom plist into the resources folder of the pkg bundle (no paxing required) and use a postflight script to copy it into place after the rest of the payload has been deployed the normal way. Or, as someone el

Re: Sourcelist background colors

2008-06-25 Thread Markus Spoettl
On Jun 25, 2008, at 4:09 PM, Corbin Dunn wrote: That may be a fluke -- certain views might do this, but not all. It is best to watch the appropriate notifications for your window: NSWindowDidBecomeKeyNotification && NSWindowDidResignKeyNotification My view is a custom NSView subclass, I'm n

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread Tran Kim Bach
Thanks everybody for your kind helps. I'm so happy that all of you welcome me warmly here. On Wed, Jun 25, 2008 at 3:36 PM, Ken Thomases <[EMAIL PROTECTED]> wrote > > > Also, in the pseudo-code you provide, the NSData objects will accumulate in > the autorelease pool until some point after your "fo

NSPredicateEditor

2008-06-25 Thread Chris
Consider the following code, any NSPredicateEditor gurus: NSPredicateEditorRowTemplate *tmpTemplate = [[NSPredicateEditorRowTemplate alloc] initWithCompoundTypes: [NSArray arrayWithObjects: [NSNumber numberWithInt: NSNotPredicateType], nil]]; NSPredicate * tmpPredicate =

Re: Auto pop-up list from State field in Address book database

2008-06-25 Thread Peter Ammon
In fact, NSPopUpButton does do type-select when it has key focus, even if not popped up. However, there is no visual feedback until you finish typing, so this doesn't work as well as it might. On Jun 25, 2008, at 5:30 PM, Gary L. Wade wrote: I don't think NSPopUpButton will accept key event

Issues with addressbook framework

2008-06-25 Thread Papa-Raboon
Hi All, I am currently trying to work through a tutorial regarding creating a simple app that allows you to enter an address into Apple's Addressbook database. I added the addresbook framework just as the tutorial explained and saved my files and I can see AddressBook.framework there in the source

RE: Auto pop-up list from State field in Address book database

2008-06-25 Thread Gary L. Wade
I don't think NSPopUpButton will accept key events if the menu is not active, although once the menu is active, it will accept key events, but you could probably embed your NSPopUpButton control in a custom control that does take key events and then filter those into choosing an item in the menu

Re: NSString help!

2008-06-25 Thread Omar Qazi
On Jun 25, 2008, at 2:36 PM, Eric Lee wrote: I’m trying to get a string from one text field and then set the string in another text field. [anotherTextField setStringValue:[oneTextField string value]]; Or, if you want to be cool with Objective-C 2.0: anotherTextField.stringValue = oneTex

Re: Adding a new type of NSButton

2008-06-25 Thread P Teeson
On 25-Jun-08, at 6:37 PM, Hamish Allan wrote: On Wed, Jun 25, 2008 at 11:01 PM, P Teeson <[EMAIL PROTECTED]> wrote: What appealed to me about the NSButton was it maturity as an interface item and I wanted to take advantage of that. This is a double-edged sword: I for one would find it u

Re: Sourcelist background colors

2008-06-25 Thread Corbin Dunn
On Jun 25, 2008, at 3:52 PM, Markus Spoettl wrote: On Jun 25, 2008, at 3:33 PM, Keith Duncan wrote: Be sure to redisplay your view when the window looses key-ness. How would this be achieved? I've been trying to figure it out, I'm sure there's something simple eluding me. It appears to

Re: Sourcelist background colors

2008-06-25 Thread Markus Spoettl
On Jun 25, 2008, at 3:33 PM, Keith Duncan wrote: Be sure to redisplay your view when the window looses key-ness. How would this be achieved? I've been trying to figure it out, I'm sure there's something simple eluding me. It appears to me that the view/window will repaint when the hosting

Re: SSH Wrapper

2008-06-25 Thread Hamish Allan
On Wed, Jun 25, 2008 at 10:01 PM, Kevin Ferguson <[EMAIL PROTECTED]> wrote: > There doesn't appear to > be any way to make my application wait for the password prompt, either. If stdin is not a tty (which is indeed the case running from an NSTask) and the environment variables DISPLAY and SSH_ASK

Auto pop-up list from State field in Address book database

2008-06-25 Thread Papa-Raboon
Hi Guru dudes,I am working on a simple application where I want to get a list from a file out of a file. Maybe XML or a flat text file and I want the list to pop up and drill down based on what I type so that I can select them. Like many web sites do using AJAX technologies. Can anyone tell me whe

[NSMutableAttributedString] How is NSBaseURLDocumentOption supposed to work?

2008-06-25 Thread Stéphane Sudre
When reading a html document into a NSMutableAttributedString (or NSTextStorage) using - (BOOL)readFromURL:(NSURL *)url options:(NSDictionary *)options documentAttributes:(NSDictionary **)dict, what value are you supposed to set for NSBaseURLDocumentOption? When I test this with HTML files

Re: Adding a new type of NSButton

2008-06-25 Thread Hamish Allan
On Wed, Jun 25, 2008 at 11:01 PM, P Teeson <[EMAIL PROTECTED]> wrote: > What appealed to me about the NSButton was it maturity as an interface item > and I wanted to take advantage of that. This is a double-edged sword: I for one would find it unsettling if a standard-looking button started behav

Re: Sourcelist background colors

2008-06-25 Thread Keith Duncan
Be sure to redisplay your view when the window looses key-ness. How would this be achieved? I've been trying to figure it out, I'm sure there's something simple eluding me. Keith ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: Creating Installer Package from Cocoa

2008-06-25 Thread Stéphane Sudre
On Jun 25, 2008, at 10:59 PM, Ryan Harter wrote: That sounds like exactly what I would like to do, but I'm not quite sure how to copy the plist into the package. I was looking at using pax, but since I'm targeting Leopard, and developing on Leopard, package maker keeps making metapackage

[MODERATOR] Re: sphere in openGL ES ++IRC

2008-06-25 Thread Scott Anguish
On Jun 25, 2008, at 4:47 PM, Simon Fleming wrote: Dear All, Can anyone help me create a sphere in openGL ES for the iphone? NO they can't. The iPhone SDK is covered by a non-disclosure agreement. You can't talk about it here, or anywhere else.

Re: Adding a new type of NSButton

2008-06-25 Thread P Teeson
On 25-Jun-08, at 4:13 PM, Kevin Elliott wrote: On Jun 25, 2008, at 12:12 PM, P Teeson wrote: Environment is Mac OS X 10.4.11 Xcode 2.5 I need a new type of NSButton/NSButtonCell that I am calling an NSLatchButton. Once it is pushed it stays pushed - pushing it again does not revert it b

Re: Adding a new type of NSButton

2008-06-25 Thread P Teeson
On 25-Jun-08, at 3:21 PM, Marco Masser wrote: Once it is pushed it stays pushed - pushing it again does not revert it back to unpushed state. You could simply hook up an appropriate kind of a standard NSButton to an IBAction that disables the button. That way, you can't click it anymore and

Re: Adding a new type of NSButton

2008-06-25 Thread P Teeson
On 25-Jun-08, at 3:22 PM, I. Savant wrote: I need a new type of NSButton/NSButtonCell that I am calling an NSLatchButton. Once it is pushed it stays pushed - pushing it again does not revert it back to unpushed state. (Of course there would be a method to set it to it's unlatched state but

Re: NSString help!

2008-06-25 Thread Andy Lee
On Jun 25, 2008, at 5:36 PM, Eric Lee wrote: I’m trying to get a string from one text field and then set the string in another text field. Note that NSTextField inherits from NSControl. NSControl has methods - stringValue and -setStringValue:. --Andy

NSString help!

2008-06-25 Thread Eric Lee
I¹m trying to get a string from one text field and then set the string in another text field. How do you do this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mo

Re: SSH Wrapper

2008-06-25 Thread Stephen J. Butler
On Wed, Jun 25, 2008 at 4:28 PM, Jens Alfke <[EMAIL PROTECTED]> wrote: > You might consider using the libssh2 library instead > . This is a good suggestion. But if he still wants to stick with command line ssh, I'd suggest looking at how sshfs does

sphere in openGL ES ++IRC

2008-06-25 Thread Simon Fleming
Dear All, Can anyone help me create a sphere in openGL ES for the iphone? If anyone could help me I would really appreciate it... Ive been using GL_TRIANGLE_STRIP but alas this hasn't worked out as planned! I have converted several examples from c++ to objective c but they do not produce a

Re: SSH Wrapper

2008-06-25 Thread Jens Alfke
On 25 Jun '08, at 2:01 PM, Kevin Ferguson wrote: I am, however, running into a problem. I have my task set up to go. The issue I'm running into is that SSH obviously requires a password authentication. Reading though the SSH man page, I can't find a flag that lets you specify a password in

Re: Adding a new type of NSButton

2008-06-25 Thread Andy Lee
On Jun 25, 2008, at 4:26 PM, I. Savant wrote: Other peoples comments about this being a "Controller" problem and not something that belongs in the Model are somewhat true, but if this is really a button type your going to use in several places then subclassing is perfectly appropriate. Also

SSH Wrapper

2008-06-25 Thread Kevin Ferguson
Greetings, I'm attempting to write an SSH wrapper for a cocoa application. It doesn't need to do anything fancy, only get me logged into the remote machine. Beyond that, my application will execute commands as the user requests them. I am, however, running into a problem. I have my task s

Re: Creating Installer Package from Cocoa

2008-06-25 Thread Ryan Harter
That sounds like exactly what I would like to do, but I'm not quite sure how to copy the plist into the package. I was looking at using pax, but since I'm targeting Leopard, and developing on Leopard, package maker keeps making metapackages, which pax doesn't seem to understand, and I can'

Re: How to use .a in XCode?

2008-06-25 Thread Nick Zitzmann
IANTM, but this really belongs on the Xcode list, not the Cocoa list. On Jun 25, 2008, at 2:43 PM, dexter morgan wrote: is id3 the folder inside /usr/local/include? Yes. How can I import these libreries into the project? Just drag the library in from the Finder. Or choose "add existing

Re: How to use .a in XCode?

2008-06-25 Thread I. Savant
On Wed, Jun 25, 2008 at 4:43 PM, dexter morgan <[EMAIL PROTECTED]> wrote: > I need to use id3lib inside my xcode project. > Basically it's a Cocoa app with some c/c++ source files. > At this time I would simply get it compiled. You want the xcode-users list. -- I.S. ___

How to use .a in XCode?

2008-06-25 Thread dexter morgan
Hello guys, I need to use id3lib inside my xcode project. Basically it's a Cocoa app with some c/c++ source files. At this time I would simply get it compiled. I've downloaded id3lib and now it's under /usr/local/include/id3 (some headers), /usr/local/lib (libraries .a) and finally /usr/local/incl

Re: Newbie question: error in creating a NSData object using handle(Resource Management)

2008-06-25 Thread Jens Alfke
Handle dataHandle = Get1IndResource( type1, n); I hope you checked that dataHandle!=NULL and *dataHandle!=NULL. struct A_STRUCT aStruct; memcpy(& aStruct,[data bytes], [data length]); This is dangerous — if [data length] is larger than sizeof(aStruct), you've just clobbered yo

Re: Adding a new type of NSButton

2008-06-25 Thread Andy Lee
On Jun 25, 2008, at 3:12 PM, P Teeson wrote: I need a new type of NSButton/NSButtonCell that I am calling an NSLatchButton. You shouldn't use the NS prefix -- someone reading your code might think it was a Cocoa class. PTLatchButton would be fine. Once it is pushed it stays pushed - pushi

Re: [Q] Is there a NSPathController-like custom controllerl for pre-MacOS X 10.5?

2008-06-25 Thread I. Savant
> Should it be used for file path? Or can it be used for representing > path-like entity? I'm not familiar with Uli's (very fine) control, but what is a file path but /a/bunch/of/strings/separated/by/slashes ...? It *should* handle that situation just fine but (due to the icons) may need a minor

Re: Adding a new type of NSButton

2008-06-25 Thread I. Savant
> Other peoples comments about this being a "Controller" problem and not > something that belongs in the Model are somewhat true, but if this is really > a button type your going to use in several places then subclassing is > perfectly appropriate. Also, if it's important to you that the user not

Re: Sourcelist background colors

2008-06-25 Thread Markus Spoettl
Hi Corbin, On Jun 25, 2008, at 10:28 AM, Corbin Dunn wrote: Yes. It is a magical NSColor that draws correctly depending on the window key-state. Create an NSOutlineView, set it to be a source list, and get the -backgroundColor. Keep it around and use it as you wish. Be sure to redisplay you

Re: [Q] Is there a NSPathController-like custom controllerl for pre-MacOS X 10.5?

2008-06-25 Thread JongAm Park
Thank you Should it be used for file path? Or can it be used for representing path-like entity? For example, I would like to use it to represent the XML node path from parent to itself. By the way, it is pretty nice for you to provide source codes also. It is a good study material. Tha

Re: Adding a new type of NSButton

2008-06-25 Thread Kevin Elliott
On Jun 25, 2008, at 12:12 PM, P Teeson wrote: Environment is Mac OS X 10.4.11 Xcode 2.5 I need a new type of NSButton/NSButtonCell that I am calling an NSLatchButton. Once it is pushed it stays pushed - pushing it again does not revert it back to unpushed state. (Of course there would be a

Re: NSPredicateEditor

2008-06-25 Thread Peter Ammon
Hi Chris, If the holds down the option key and clicks a + button, it will insert another compound row, so the user can make arbitrarily complex predicates. If this doesn't seem to happen, make sure the nesting mode is set to compound. By default, NSPredicateEditor supports And, Or, and N

Re: SetControlReference equivalent in NSControl?

2008-06-25 Thread Kevin Elliott
On Jun 24, 2008, at 3:45 PM, Graham Cox wrote: Bear in mind that the typical purpose of a ControlRef in Carbon is to keep track of an associated wrapper object (or other extended data). In Cocoa, NSControl already is that object. The way to extend an object is to subclass it and add whatev

Re: Adding a new type of NSButton

2008-06-25 Thread I. Savant
> You could simply hook up an appropriate kind of a standard NSButton to an > IBAction that disables the button. That way, you can't click it anymore and > it stays pushed. Some sort of 'disabled' look is probably preferable, else users are going to be very frustrated when they can't click a but

Re: Adding a new type of NSButton

2008-06-25 Thread I. Savant
> I need a new type of NSButton/NSButtonCell that I am calling an > NSLatchButton. > Once it is pushed it stays pushed - pushing it again does not revert it back > to unpushed state. > (Of course there would be a method to set it to it's unlatched state but > pushing the button would not > invoke t

Re: Adding a new type of NSButton

2008-06-25 Thread Marco Masser
Once it is pushed it stays pushed - pushing it again does not revert it back to unpushed state. You could simply hook up an appropriate kind of a standard NSButton to an IBAction that disables the button. That way, you can't click it anymore and it stays pushed. If you don't want it to be g

RE: Newbie question: error in creating a NSData object using handle(Resource Management)

2008-06-25 Thread Gary L. Wade
1. Have you set the resource file you're iterating over as the current resource file (UseResFile)? Make sure you save off the current resource file (CurResFile) before you do that so you can reset it once you close it. The Resource Manager is not good at keeping track of state in the way you m

Adding a new type of NSButton

2008-06-25 Thread P Teeson
Environment is Mac OS X 10.4.11 Xcode 2.5 I need a new type of NSButton/NSButtonCell that I am calling an NSLatchButton. Once it is pushed it stays pushed - pushing it again does not revert it back to unpushed state. (Of course there would be a method to set it to it's unlatched state but p

Re: Xcode eats 100% CPU and more while typing

2008-06-25 Thread I. Savant
On Wed, Jun 25, 2008 at 2:17 PM, Jaime Rios <[EMAIL PROTECTED]> wrote: > Well, > It's good to see that I'm not the only one having these problems. Turning > off the syntax coloring helps, but Xcode still freezes when I am saving a > file. This is on a brand new iMac 24" running 3GB of RAM and a 2.8

Re: [Q] Is there a NSPathController-like custom controllerl for pre-MacOS X 10.5?

2008-06-25 Thread Uli Kusterer
Am 25.06.2008 um 20:34 schrieb JongAm Park: I'm trying to put an NSPathController to my program. But it is only available after the Leopard. Is there any similar custom controller for pre-10.5? I think The 10.4 Tiger is still popular and quite stable, so I would like to support 10.4 also.

[Q] Is there a NSPathController-like custom controllerl for pre-MacOS X 10.5?

2008-06-25 Thread JongAm Park
Hello, all. I'm trying to put an NSPathController to my program. But it is only available after the Leopard. Is there any similar custom controller for pre-10.5? I think The 10.4 Tiger is still popular and quite stable, so I would like to support 10.4 also. Thanks.

Re: Creating Installer Package from Cocoa

2008-06-25 Thread Wayne Packard
If the only thing that changes about the pkg is that one plist file, you could create the pkg manually and store it as a resource. When you want to write out the custom installer, write a copy of your pkg template to disk and then copy in your newly-created plist file. wp Sent from my iPho

Re: Xcode eats 100% CPU and more while typing

2008-06-25 Thread Jaime Rios
Well, It's good to see that I'm not the only one having these problems. Turning off the syntax coloring helps, but Xcode still freezes when I am saving a file. This is on a brand new iMac 24" running 3GB of RAM and a 2.8 Intel Core 2 Duo Extreme chip. -Jaime __

Re: Leak in NSSavePanel

2008-06-25 Thread Corbin Dunn
On Jun 24, 2008, at 3:55 PM, Jelle Vandebeeck wrote: When I try to call the NSSavePanel, I always receive some memory leaks on it. I have no idea if they are bad or not so bad... I just can't find a decent tutorial on the Instruments tool. Have you tried using the "leaks" tool in instruments

Re: Sourcelist background colors

2008-06-25 Thread Corbin Dunn
On Jun 24, 2008, at 12:57 PM, Markus Spoettl wrote: Hello List, is there a way to get the background color of an NSOutlineView when in sourcelist mode (for both key and non-ket state)? Yes. It is a magical NSColor that draws correctly depending on the window key-state. Create an NSOutli

Re: Creating Installer Package from Cocoa

2008-06-25 Thread Ryan Harter
Thanks for the response Thomas. What I want to do is create the pkg on the fly by the code. The setup program has text fields for the user (in this case the lab administrator) to set the custom preferences which my program pulls from the plist. Now I just need to be able to construct a pl

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread I. Savant
> PS: In case you have more questions about old-style resource access, > you'd better take them to Apples Carbon list. People there are > probably more understanding about the need to use time proven but no > longer fancy APIs. ;-) Not that you're bitter, though ... ;-) -- I.S.

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread I. Savant
> Just to mention, the natural approach would be a dictionary whose > keys are connection objects with a value being a request, or maybe > another dictionary with several pieces of info about a connection. > The problem is that you can't use NSURLConnection objects as keys > because they aren't cop

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread Kai
On 25.6.2008, at 10:42, Tran Kim Bach wrote: Thanks Ken and Kai for your very very quick responses This is my first post in the list, I'm sorry for not clarifying my problem. Actually, the program stopped at the mentioned line. In console, it said something like: objc[2144]: FREED(id): mess

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread Ken Thomases
On Jun 25, 2008, at 10:20 AM, I. Savant wrote: On Wed, Jun 25, 2008 at 11:02 AM, an0 <[EMAIL PROTECTED]> wrote: So it forces me to keep all the fired NSURLConnections, right? Otherwise, I can't tell which is which in my delegate methods. I believe so, yes. Presumably you'd have a controller

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread Jens Alfke
On 25 Jun '08, at 7:17 AM, Ling Wang wrote: I can't find a way to identify different NSURLConnection instances in the delegate methods, for NSURLConnection does not offer access to the NSURLRequest used to initialize it. If your delegate needs to know which connection is which, then it's a

Re: Newbie question: instantiate a class in its header file OR in IB

2008-06-25 Thread Jens Alfke
On 25 Jun '08, at 7:01 AM, JArod Wen wrote: So if I have initialization method in the class, I need not to instantiate it explicitly in code, correct? IB will create the instant using the initialization method. Is this correct? You don't need a custom -init method for an object in a nib. I

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread an0
Sure, I see that. But since it is what both of us could think up, it makes me more confident. On Wed, Jun 25, 2008 at 11:22 PM, I. Savant <[EMAIL PROTECTED]> wrote: >> I believe so, yes. > > It's important to note that I've never had reason to build anything > that handles multiple requests. I'v

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread an0
Thank you. Now I'm convinced of it. On Wed, Jun 25, 2008 at 11:20 PM, I. Savant <[EMAIL PROTECTED]> wrote: > On Wed, Jun 25, 2008 at 11:02 AM, an0 <[EMAIL PROTECTED]> wrote: >> So it forces me to keep all the fired NSURLConnections, right? >> Otherwise, I can't tell which is which in my delegate m

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread I. Savant
> I believe so, yes. It's important to note that I've never had reason to build anything that handles multiple requests. I've only built a simple system to download a single XML file and have my way with it. My advice and understanding is based on the documentation and how I would attempt to go

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread I. Savant
On Wed, Jun 25, 2008 at 11:02 AM, an0 <[EMAIL PROTECTED]> wrote: > So it forces me to keep all the fired NSURLConnections, right? > Otherwise, I can't tell which is which in my delegate methods. I believe so, yes. Presumably you'd have a controller that knows how to, say, -getResourceAtURL: ...

Re: how to save keyboard shortcuts?

2008-06-25 Thread Bob Warwick
On 25-Jun-08, at 12:04 PM, HAMSoft Admin wrote: I'm really new at this so please be kind! I recently learned how to make menu item keyboard shortcuts for my program. The problem is that on the next launch of the program the shortcuts are gone, so they are not being automatically saved. Is

how to save keyboard shortcuts?

2008-06-25 Thread HAMSoft Admin
I'm really new at this so please be kind! I recently learned how to make menu item keyboard shortcuts for my program. The problem is that on the next launch of the program the shortcuts are gone, so they are not being automatically saved. Is there a setting in IB for my menu to enable auto-

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread an0
So it forces me to keep all the fired NSURLConnections, right? Otherwise, I can't tell which is which in my delegate methods. On Wed, Jun 25, 2008 at 10:57 PM, I. Savant <[EMAIL PROTECTED]> wrote: > On Wed, Jun 25, 2008 at 10:17 AM, Ling Wang <[EMAIL PROTECTED]> wrote: >> I can't find a way to ide

Re: Giving focus to a specific text field after pressing a button

2008-06-25 Thread Mike Abdullah
-[NSWindow makeFirstResponder:someTextField] On 25 Jun 2008, at 15:04, Papa-Raboon wrote: Hi Guys. I was wondering it it is possible to pass cursor focus back to a specific NSText UI element after pressing a button. I have been looking at NSControl and NSText field but can't seem to find a s

Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread Michael Vannorsdel
You can do: if([theName isEqualToString:@"John Lenon"]) //do stuff NSString has some comparison methods in the class listing. The above example will ask two different NSString objects if they have the same string values. On Jun 25, 2008, at 8:24 AM, Papa-Raboon wrote: Hi All,

Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread I. Savant
On Wed, Jun 25, 2008 at 10:51 AM, Dan Uff <[EMAIL PROTECTED]> wrote: > Check Google. Just type in "examples of if() conditionals" (with the > quotes). Perhaps you skimmed the original request - the problem was really "how to compare NSString instances" ( "if()" not withstanding). -- I.S.

Re: Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread I. Savant
On Wed, Jun 25, 2008 at 10:17 AM, Ling Wang <[EMAIL PROTECTED]> wrote: > I can't find a way to identify different NSURLConnection instances in the > delegate methods, for NSURLConnection does not offer access to the > NSURLRequest used to initialize it. Really? The delegate methods I see for NSU

Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread Dan Uff
Hi, Check Google. Just type in "examples of if() conditionals" (with the quotes). Hope this helps, Dan On Jun 25, 2008, at 8:24 AM, Papa-Raboon wrote: Hi All, Anybody know where can I get some examples of if() conditionals being used with string variables in Objective-C? To be specifi

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread Andrew Farmer
On 25 Jun 08, at 06:43, Hamish Allan wrote: Someone who knows more about these things than I do may be able to point you in the direction of a more modern way of accessing resources :) There is, in fact, no "more modern way" of accessing resources. The preferred alternative is to use indivi

Re: NSPredicateEditor

2008-06-25 Thread Chris
Cool. Now I notice that if you manually plug in a complex predicate like "a = b or c = d and e = f", that it is capable of displaying it correctly. Do you know if there is any way to allow the user to create more complex expressions? By default it only seems to allow either AND or OR, bu

Is it possible for several NSURLConnection instances to share one delegate?

2008-06-25 Thread Ling Wang
I can't find a way to identify different NSURLConnection instances in the delegate methods, for NSURLConnection does not offer access to the NSURLRequest used to initialize it. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Re: Giving focus to a specific text field after pressing a button

2008-06-25 Thread I. Savant
> Hi Guys. I was wondering it it is possible to pass cursor focus back to a > specific NSText UI element after pressing a button. I have been looking at > NSControl and NSText field but can't seem to find a solution to this one. The terminology for this is a bit non-obvious, but see -[NSWindow m

Re: Can't open PrefPane on Air w/10.5.3

2008-06-25 Thread I. Savant
Anything in the user's console logs? > "You cannot open (PrefName) preferences pane because it is not available to > you at this time. You might need to connect a device to your computer to see > this preferences pane" -- I.S. ___ Cocoa-dev mailing l

Giving focus to a specific text field after pressing a button

2008-06-25 Thread Papa-Raboon
Hi Guys. I was wondering it it is possible to pass cursor focus back to a specific NSText UI element after pressing a button. I have been looking at NSControl and NSText field but can't seem to find a solution to this one. Cheers Paul Randall ___ Cocoa-d

Re: Newbie question: instantiate a class in its header file OR in IB

2008-06-25 Thread JArod Wen
First of all, thanks for kind reply! Nope. All this does is define a variable - it doesn't allocate an instance. That'd have to happen in +initialize or something. So if I have initialization method in the class, I need not to instantiate it explicitly in code, correct? IB will create the i

Re: NSPredicateEditor

2008-06-25 Thread Jim Turner
On Wed, Jun 25, 2008 at 1:08 AM, Chris <[EMAIL PROTECTED]> wrote: > Let's say I create a NSPredicateEditor and it looks like this: > > > [All] of the following are true: > > [Name] equals [ ] > --- > > So the user enters say "Fred" a

Can't open PrefPane on Air w/10.5.3

2008-06-25 Thread Trygve Inda
We have a prefPane app that uses additional background apps for doing its thing. We have an odd report that we can't duplicate: A user is reporting: "You cannot open (PrefName) preferences pane because it is not available to you at this time. You might need to connect a device to your computer to

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread Hamish Allan
On Wed, Jun 25, 2008 at 2:08 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Wed, Jun 25, 2008 at 4:42 AM, Tran Kim Bach <[EMAIL PROTECTED]> wrote: > >> But I checked the exe file and it's absolutely there(in the bundle). > > What is this "exe file" nonsense? I don't have any files with the > ext

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread Kyle Sluder
On Wed, Jun 25, 2008 at 4:42 AM, Tran Kim Bach <[EMAIL PROTECTED]> wrote: > Actually, the program stopped at the mentioned line. > In console, it said something like: > > *objc[2144]: FREED(id): message release sent to freed object=0x17d1d0* > > This GDB was configured as "i386-apple-darwin" > (Err

Re: IB 3.0's Managed Object Context class

2008-06-25 Thread Kyle Sluder
On Wed, Jun 25, 2008 at 8:43 AM, Danny Price <[EMAIL PROTECTED]> wrote: > Interface Builder 3.0's 'library' includes a Managed Object Context object > which you can add to a nib. However, it has no outlets and no bindings so in > what scenario would it be of any use? Just because it has no outlets

Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread Mike Abdullah
if ([theName isEqualToString:@"John Lennon"]) { theName = @"Ringo Starr"; } -- By using == you were checking to see if the strings were the same object. Sometimes this would, sometimes it would not. Instead, you want to check if the two objects have equivalent contents.

IB 3.0's Managed Object Context class

2008-06-25 Thread Danny Price
I hope this isn't a stupid question but I think it would improve my understanding of Core data. Interface Builder 3.0's 'library' includes a Managed Object Context object which you can add to a nib. However, it has no outlets and no bindings so in what scenario would it be of any use? I've not bee

Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread Paul Bruneau
On Jun 25, 2008, at 8:24 AM, Papa-Raboon wrote: Hi All, Anybody know where can I get some examples of if() conditionals being used with string variables in Objective-C? To be specific, I am trying to use an if conditional to check the value of a string being a certain value and then repla

Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread Jean-Daniel Dupas
Le 25 juin 08 à 14:24, Papa-Raboon a écrit : Hi All, Anybody know where can I get some examples of if() conditionals being used with string variables in Objective-C? To be specific, I am trying to use an if conditional to check the value of a string being a certain value and then replacin

Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread Papa-Raboon
Hi All, Anybody know where can I get some examples of if() conditionals being used with string variables in Objective-C? To be specific, I am trying to use an if conditional to check the value of a string being a certain value and then replacing it with a different value if the condition returns

Re: Get the UUID of the current user

2008-06-25 Thread Jean-Daniel Dupas
Probably a private function. Anyway, not really hard to implement: #include mbr_user_name_to_uuid(const char *username, uuid_t uuid) { struct passwd *info = getpwnam(username); if (info) mbr_uid_to_uuid(info->pw_uid, uuid); } Le 25 juin 08 à 13:38, Yoann GINI a écrit : A friend have

Re: Get the UUID of the current user

2008-06-25 Thread Yoann GINI
A friend have teach me this options after send my mail, and in dsmbrutil.c I've found mbr_user_name_to_uuid() rather than mbr_uid_to_uuid(), but I haven't find mbr_user_name_to_uuid() in membership.h :-( But I take note of that "look in Darwin's code" :-) Le 25 juin 08 à 12:47, Michael Wa

Re: Get the UUID of the current user

2008-06-25 Thread Yoann GINI
This work fine ! Thanks for this rapid answer. Le 25 juin 08 à 11:46, Jean-Daniel Dupas a écrit : #include uuid_t uuid; mbr_uid_to_uuid(getuid(), uuid); See "man mbr_uid_to_uuid" for details. Or if you target 10.5 only, that maybe possible using the new Identity API ( http://developer.a

  1   2   >