A quick one: Passing a reference/pointer to NSString

2008-07-22 Thread Jeff Brown
Hi Guys

What do I need to do in the following code to get theString to take the value 
I'm giving it in foo i.e. Hi there?

- (void) aMethod
{
NSString* theString = @;
[self foo:theString];
}

- (NSString*) foo:(NSString*)aString
{
NSString* stringB = @Hi there;
aString = stringB;
}

Thanks guys.


  Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: A quick one: Passing a reference/pointer to NSString

2008-07-22 Thread Jeff Brown
Sorry - it should have been:

- (void) aMethod
{
   NSString* string1 = @;
   NSString* string2 = @;
   
   string1 = [self foo:string2];
}

- (NSString*) foo:(NSString*)aString
{
   NSString* stringA = @Hi there;
   NSString* stringB = @Everyone;
   aString = stringB;

   return stringA;
}

I need to get 2 strings back from foo. I can get foo to return one. I need to 
pass the other one in by reference. It seems that since I'm passing a pointer 
to an NSString as the argument, it should be fine but it's not. 

By the way
How do you reply on this mailing list so that the reply remains part of the 
thread?




  Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: A quick one: Passing a reference/pointer to NSString

2008-07-22 Thread Jeff Brown
Thanks guys for all the advice.

Much appreciated.

Jeff





  Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Questions about Core Data and SQLite

2008-07-15 Thread Jeff Brown
Thanks guys for all this info.

Also can anyone point me to a good book or website where I can learn about and 
how to incorporate Core Data into my existing Cocoa App. 
I've found mac documentation isn't the easiest to learn from.

Cheers
Jeff


  Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Jeff Brown
Hi Jon

Just an aside - does Hillegass, Third Edition teach you Core Data?
The blurb on Amazon says it does but when I looked at the index online it 
didn't mention Core Data. 

Jeff 


  Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Questions about Core Data and SQLite

2008-07-14 Thread Jeff Brown
Hi Guys

I've got a cocoa app that is installed as a client on several machines and uses 
MySql as the database.

Is there any way I can incorporate Core Data into the app so that I can do away 
with using MySql? i.e. log into the app on one machine (using it's SQLite 
database) from the same app on a different machine?
 
If so, given that I know a some about Cocoa development but nothing about using 
Core Data, can anyone direct me to some good documentation that explains how to 
incorporate Core Data into an already existing Cocoa app. (It currently uses 
MySQL).

Thanks greatly for any help.

Jeff


  Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Stopping actions mid stream

2008-07-07 Thread Jeff Brown
Thanks everyone.
I ended up just disabling the option in the end.

Cheers
Jeff


Thanks Andy and Jean-Daniel.

Peter


On 07/07/2008, at 3:34 AM, Andy Lee wrote:

Yes:

http://ignorethecode.net/blog/2008/07/01/disabling-inactive-menu-items/ 

(by way of DaringFireball)

--Andy

On Jul 6, 2008, at 11:57 AM, Jean-Daniel Dupas wrote:

I haven't test but -[NSMenuItem setToolTip:] look fine to do this.
Now, just chek if this methods works even when the item is disabled.

Le 6 juil. 08 à 16:31, Peter Zegelin a écrit :

Some of the commenters suggest a tool tip over the disabled menu explaining why 
it is disabled, which sounds reasonable. As a newby here would this be easy to 
implement in Cocoa?


snip

___




  Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Stopping actions mid stream

2008-07-06 Thread Jeff Brown
Hi Guys

I've set up matrix with 2 radio buttons (1 and 2) with a delegate method that 
gets run when the matrix gets clicked. Lets say radio button 1 is highlighted 
and someone clicks on radio button 2. The delegate method has some code that 
checks whether the radio buttons are allowed to be changed from 1 to 2 and if 
not, sends an alert to the user. 
My problem is how can I stop the radio buttons themselves changing from 1 to 2. 
When programming in Visual Basic there was a method that stopped the action 
from completing. Is there something similar I can do here or some other way.

Thanks in advance.
Jeff


  Get the name you always wanted with the new y7mail email address.
www.yahoo7.com.au/mail
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]