NSPredicateEditor

2008-06-25 Thread Chris
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 and the predicate returned is Name == Fred. Later on, I reload that predicate into

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

2008-06-25 Thread Tran Kim Bach
Hi folks,I'm a newbie to Cocoa. Recently, I'm working on a project relating to Resource Management. In my project, there's a part that I'm reading through the resources in a resource file. I'm using: int count = CountResources( typeName ); to get all resource that has the type typeName, then loop

NSFileHandle -readInBackgroundAndNotify behavior on EOF

2008-06-25 Thread Rick Mann
It's not clear from the docs what this method does when the NSFileHandle is associated with a file. The docs say it will return an empty NSData at EOF, but what I'm seeing instead is this: I get back an NSData with -length = 50, even though the file is less than half that length. Upon

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

2008-06-25 Thread Kai
Hi, I GOT AN ERROR HERE may be a little too unspecific. Perhaps you can elaborate: crash, exception, nil return, Console entry, what else? That said, you should use GetHandleSize (dataHandle) instead of GetResourceSizeOnDisk(dataHandle). GetResourceSizeOnDisk() can return values which

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

2008-06-25 Thread Ken Thomases
On Jun 25, 2008, at 1:19 AM, Tran Kim Bach wrote: Hi folks,I'm a newbie to Cocoa. Recently, I'm working on a project relating to Resource Management. In my project, there's a part that I'm reading through the resources in a resource file. I'm using: int count = CountResources( typeName ); to

Re: [SOLVED] NSFileHandle -readInBackgroundAndNotify behavior on EOF

2008-06-25 Thread Rick Mann
On Jun 24, 2008, at 23:31:24, Rick Mann wrote: It's not clear from the docs what this method does when the NSFileHandle is associated with a file. The docs say it will return an empty NSData at EOF, but what I'm seeing instead is this: I get back an NSData with -length = 50, even though

Re: NSFileHandle -readInBackgroundAndNotify behavior on EOF

2008-06-25 Thread Ken Thomases
On Jun 25, 2008, at 1:31 AM, Rick Mann wrote: It's not clear from the docs what this method does when the NSFileHandle is associated with a file. The docs say it will return an empty NSData at EOF, but what I'm seeing instead is this: I get back an NSData with -length = 50, even though the

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

2008-06-25 Thread Tran Kim Bach
Thanks Ken and Kai for your very very quick responsesThis 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): message release sent to freed object=0x17d1d0* This

Get the UUID of the current user

2008-06-25 Thread Yoann GINI
Hi all, I look for get the UUID of the current user, the only way actually found is to run a NSTask with this command : dsmemberutil getuuid -U `whoami`... But it's not really a good solution for me. Have you a idea for get the UUID without NSTask ? Thanks in advance, Yoann

Re: Get the UUID of the current user

2008-06-25 Thread Jean-Daniel Dupas
#include membership.h 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.apple.com/documentation/Networking/Reference/IdentityServices_RefCollection/index.html )

Re: Get the UUID of the current user

2008-06-25 Thread Michael Watson
Jean-Daniel already provided an answer, but it's worth reminding people that the source code to many of the utilities that come with Mac OS X is available for dissection, including the Directory Services utilities:

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 membership.h 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 (

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

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 pwd.h 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

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: 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

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.

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 or

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 extension exe

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: 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 and the

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

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 ___

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 list

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

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, but

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

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

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

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: 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: 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

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 identify

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

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

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: 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 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've only

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.

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

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: 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):

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

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: 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

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

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: 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: 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

[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: [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.

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 Intel

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

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

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

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 that

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

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

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

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

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.

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

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

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

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.

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: 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

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

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

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

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 http://www.libssh2.org/wiki/index.php/Main_Page. This is a good suggestion. But if he still wants to stick with command line ssh, I'd suggest looking at how sshfs does it:

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

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

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

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

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

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

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

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 behaving

[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

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

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

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: 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: 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

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 =

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

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

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

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

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