Invitation to connect on LinkedIn

2010-06-17 Thread Alex Wait
LinkedIn
Alex Wait requested to add you as a connection on LinkedIn:
--

Cameron,

I'd like to add you to my professional network on LinkedIn.

- Alex

Accept invitation from Alex Wait
http://www.linkedin.com/e/7CEPLQL12CQ4K1l0S-51en6YhLE4yif1p-H_BC7/blk/I719833053_3/pmpxnSRJrSdvj4R5fnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_cRYPdj0PcPwVcjt9bP5ydm5btkd6bPcOc3wPc3gVcP4LrCBxbOYWrSlI/EML_comm_afe/

View invitation from Alex Wait
http://www.linkedin.com/e/7CEPLQL12CQ4K1l0S-51en6YhLE4yif1p-H_BC7/blk/I719833053_3/0PnPcRc3cPe3ANdQALqnpPbOYWrSlI/svi/

-- 
DID YOU KNOW your LinkedIn profile helps you control your public image when 
people search for you? Setting your profile as public means your LinkedIn 
profile will come up when people enter your name in leading search engines. 
Take control of your image! 
http://www.linkedin.com/e/ewp/inv-22/

 
--
(c) 2010, LinkedIn Corporation
___

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 arch...@mail-archive.com


CDMA Programming

2008-10-06 Thread Alex Wait
I know that the iPhone uses cell phone communication technologies, probably
like CDMA. (I am a huge n00b on this area of expertise).
I am in a group project that needs to do some CDMA programming. Any ideas if
there are any C libraries that can help with this function?

Thanks!

-- 
If you can't be kind, at least have the decency to be vague.
___

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: Help for a beginner..

2008-10-03 Thread Alex Wait
you should start with a c based language. like vanilla c or c++.
it will teach you the basics. :)
I'm sure others on here can recommend a good book.

On Fri, Oct 3, 2008 at 12:20 PM, Jent Kyle [EMAIL PROTECTED] wrote:

 My Greetings!
 Okay so everyone has to start somewhere, right? Please don't tell me that
 all of you were born with this special ability (built in) to program. I'm
 a complete beginner, I have never done any programming but I really want to
 learn cocoa. So my question is, where, how, etc. to learn cocoa?
 Thanks!

 Jent
 ___

 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/bobber205%40gmail.com

 This email sent to [EMAIL PROTECTED]




-- 
If you can't be kind, at least have the decency to be vague.
___

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: Set string value

2008-07-09 Thread Alex Wait
It's this line

[textLabel setStringValue:@\[EMAIL PROTECTED] is %d characters long, string,
stringLength];

The setStringValue function does not take more than one argument. If you
want to format the string like that try

[textlabel setStringValue: [NSString stringWithFormat:@\[EMAIL PROTECTED] is 
%d
characters long, string, stringLength] ]

On Wed, Jul 9, 2008 at 1:12 PM, Kevin Walzer [EMAIL PROTECTED] wrote:

 Hello,

 I'm trying to work through an exercise in the new Hillegass book and am
 encountering difficulties. The app fails to build. The relevant code snippet
 is below, with errors noted in the comments:

 -(IBAction)getCount:(id)sender
 {

NSString *string = [textField stringValue];
int *stringLength = [string length];  //warning: initialization
 makes pointer from integer without a cast
[textLabel setStringValue:@\[EMAIL PROTECTED] is %d characters 
 long, string,
 stringLength]; //error: too many arguments to function 'setStringValue:'
NSLog(@%@, string);
 }

 The idea is to take input from a text field, calculate the number of
 characters in the text string, and display both the entered text string and
 the number of characters in a text label.

 I'd appreciate it if someone could clarify two things for me:

 1. How to structure the setStringValue method so that gcc doesn't barf
 because of too many arguments--I'm not clear what that means.
 2. How to structure the initialization of the  stringLength variable so
 that gcc doesn't emit warnings--I'm not clear on what the problem is here.

 TIA,
 Kevin

 --
 Kevin Walzer
 Code by Kevin
 http://www.codebykevin.com
 ___

 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/bobber205%40gmail.com

 This email sent to [EMAIL PROTECTED]




-- 
If you can't be kind, at least have the decency to be vague.
___

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: Mysterious NULL Coming From NSUserDefaults

2008-07-07 Thread Alex Wait
I knew that naming my variables like that was a bad idea. :)
Thanks! I changed the names and updated what needed to be updated because of
the name changes and it works now!

w00t!

Thanks again!
Alex

On Sun, Jul 6, 2008 at 10:52 PM, Boaz Stuller [EMAIL PROTECTED] wrote:

 Well, I see a couple problems here
 1) Even though you're getting directly passed a color in your setters,
 you're ignoring that and trying to find out the color from the wells. That's
 bad form for many reasons, and if those backGroundWell and lineWell
 variables weren't hooked up correctly, that would explain your symptoms.
 Especially since your lineWell and backGroundWell aren't getting hooked up
 correctly.

 2)  Since I can't see your whole project, I can't be 100% sure, but I'm 99%
 sure your lineWell and backGroundWell probably aren't getting hooked up
 correctly.  This is because you named your color setters and getters *the
 exact same thing* as the instance variables for your color wells.  This is
 a big mistake, for reasons that are way too complicated to explain in an
 email.  The short version is that when nibs are loaded, outlets are set
 using key-value coding.  If you have a method named -setLineWell: and an
 ivar named lineWell, the KVC routines assume that the -setLineWell: method
 is the way to set the lineWell ivar and call that method instead of setting
 lineWell directly.  You can avoid this problem in the future by making your
 getter and setter names describe what you're actually getting and setting,
 i.e -lineWell and -setLineWell: should get/set an NSColorWell, while
 -lineColor and -setLineColor: should get/set an NSColor.

 3) Pulling back a bit, you're working way too hard.  You don't have to
 write any code at all to hook a color well up to a preference key.  You just
 bind to the 'Shared User Defaults Controller', set the controller key to
 'values', the Model Key to whatever you want your preference key to be, and
 the Value Transformer to NSUnarchiveFromData (it'll be in the popup
 menu).  It will handle all that archiving and unarchiving you're currently
 doing manually.

 4) The G in Background should not be capitalized. ;)

 Best wishes,
 Bo




-- 
If you can't be kind, at least have the decency to be vague.
___

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]


Mysterious NULL Coming From NSUserDefaults

2008-07-06 Thread Alex Wait
I've been enjoying NSUserDefaults when going through the Hillegeass book.

I've decided to do a small app that has two colors it stores. I get these
colors from a colorwell via  Preference Pane.

I have bounded the values of the wells to backGroundWell and lineWell in IB.

I have the appropriately named methods. I know my bindings are ok becuase if
I just return [NSColor whiteColor] instead of the data
from NSUserDefaults, they're yellow when I open the pane. so that's ok.

I am pretty sure I'm getting a null from the defaults because the wells are
black. I have no blackColor in my project. Already searched for that. ;)

What am I doing wrong? I thought that NSUserDefaults was pretty simple...

Below are my getters and setters.

-(NSColor*)backGroundWell
{

NSLog(@called BGwell);

NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSData* data = [defaults objectForKey:@BGCOLOR];
NSColor* newColor = [NSKeyedUnarchiver unarchiveObjectWithData:data];
NSLog(@retrieved Color for BG is %@, newColor);
//NSLog(@%@,[NSKeyedUnarchiver unarchiveObjectWithData:data]);
return [NSKeyedUnarchiver unarchiveObjectWithData:data];
}
-(NSColor*)lineWell
{

NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSData* data = [defaults objectForKey:@LINECOLOR];
return [NSKeyedUnarchiver unarchiveObjectWithData:data];
}

-(void)setBackGroundWell: (NSColor*)newColor
{
NSLog(@New Color is %@, newColor);
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSColor* color = [backGroundWell color];
NSData* colorData = [NSKeyedArchiver archivedDataWithRootObject:color];
[defaults setObject:colorData forKey:@BGCOLOR];
NSLog(@changing background color);
}
-(void)setLineWell: (NSColor*)newColor
{
NSLog(@New Color is %@, newColor);
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
NSData* colorData = [NSKeyedArchiver
archivedDataWithRootObject:[lineWell color] ];
[defaults setObject:colorData forKey:@LINECOLOR];
NSLog(@changing line color);

}


---
Below is my +(void) initialize method

+(void) initialize
{

NSMutableDictionary* defaultValues = [NSMutableDictionary dictionary];

NSData* backgroundColorData = [NSKeyedArchiver
archivedDataWithRootObject:[NSColor greenColor] ];
NSData* lineColorData = [NSKeyedArchiver
archivedDataWithRootObject:[NSColor whiteColor] ];

[defaultValues setObject:backgroundColorData forKey:@BGCOLOR];
[defaultValues setObject:lineColorData forKey:@LINECOLOR];

[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
NSLog(@registered defaults %@, defaultValues);

}


-- 
If you can't be kind, at least have the decency to be vague.
___

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: Mysterious NULL Coming From NSUserDefaults

2008-07-06 Thread Alex Wait
Indeed. Both the setters and getters are being called. I looked in the plist
file for my app and I see BgColor and LineColor
as values with a bunch of digits/hex for its value.

On Sun, Jul 6, 2008 at 10:13 PM, Thomas Mueller 
[EMAIL PROTECTED] wrote:

 Hi,

 Are the setters actually being called? Maybe the values are never
 being stored in the defaults? Maybe have a look at the preferences
 file for your app (in ~Library/Preferences) to see if anything is
 stored in there. I guess you won't be able to see *which* color is
 stored, though.

 Just an idea; I'm just a few chapters ahead of you, so I'm probably
 wrong... :-)

 Regards,
 Thomas


 2008/7/7 Alex Wait [EMAIL PROTECTED]:
  I've been enjoying NSUserDefaults when going through the Hillegeass book.
 
  I've decided to do a small app that has two colors it stores. I get these
  colors from a colorwell via  Preference Pane.
 
  I have bounded the values of the wells to backGroundWell and lineWell in
 IB.
 
  I have the appropriately named methods. I know my bindings are ok becuase
 if
  I just return [NSColor whiteColor] instead of the data
  from NSUserDefaults, they're yellow when I open the pane. so that's ok.
 
  I am pretty sure I'm getting a null from the defaults because the wells
 are
  black. I have no blackColor in my project. Already searched for that.
 ;)
 
  What am I doing wrong? I thought that NSUserDefaults was pretty simple...
 
  Below are my getters and setters.
 
  -(NSColor*)backGroundWell
  {
 
 NSLog(@called BGwell);
 
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSData* data = [defaults objectForKey:@BGCOLOR];
 NSColor* newColor = [NSKeyedUnarchiver unarchiveObjectWithData:data];
 NSLog(@retrieved Color for BG is %@, newColor);
 //NSLog(@%@,[NSKeyedUnarchiver unarchiveObjectWithData:data]);
 return [NSKeyedUnarchiver unarchiveObjectWithData:data];
  }
  -(NSColor*)lineWell
  {
 
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSData* data = [defaults objectForKey:@LINECOLOR];
 return [NSKeyedUnarchiver unarchiveObjectWithData:data];
  }
 
  -(void)setBackGroundWell: (NSColor*)newColor
  {
 NSLog(@New Color is %@, newColor);
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSColor* color = [backGroundWell color];
 NSData* colorData = [NSKeyedArchiver
 archivedDataWithRootObject:color];
 [defaults setObject:colorData forKey:@BGCOLOR];
 NSLog(@changing background color);
  }
  -(void)setLineWell: (NSColor*)newColor
  {
 NSLog(@New Color is %@, newColor);
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSData* colorData = [NSKeyedArchiver
  archivedDataWithRootObject:[lineWell color] ];
 [defaults setObject:colorData forKey:@LINECOLOR];
 NSLog(@changing line color);
 
  }
 
 
  ---
  Below is my +(void) initialize method
 
  +(void) initialize
  {
 
 NSMutableDictionary* defaultValues = [NSMutableDictionary dictionary];
 
 NSData* backgroundColorData = [NSKeyedArchiver
  archivedDataWithRootObject:[NSColor greenColor] ];
 NSData* lineColorData = [NSKeyedArchiver
  archivedDataWithRootObject:[NSColor whiteColor] ];
 
 [defaultValues setObject:backgroundColorData forKey:@BGCOLOR];
 [defaultValues setObject:lineColorData forKey:@LINECOLOR];
 
 [[NSUserDefaults standardUserDefaults]
 registerDefaults:defaultValues];
 NSLog(@registered defaults %@, defaultValues);
 
  }
 
 
  --
  If you can't be kind, at least have the decency to be vague.
  ___
 
  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/thomasmueller76%40googlemail.com
 
  This email sent to [EMAIL PROTECTED]
 




-- 
If you can't be kind, at least have the decency to be vague.
___

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: Mysterious NULL Coming From NSUserDefaults

2008-07-06 Thread Alex Wait
Sorry. forgot something.
I should add this: I tried reading NSColorPanel from the file (it's a
NSString) and I WAS able to read that just fine.

I think it has something to do with NSKeyedArchive/NSKeyedUnarchiver

On Sun, Jul 6, 2008 at 10:40 PM, Alex Wait [EMAIL PROTECTED] wrote:

 Indeed. Both the setters and getters are being called. I looked in the
 plist file for my app and I see BgColor and LineColor
 as values with a bunch of digits/hex for its value.


 On Sun, Jul 6, 2008 at 10:13 PM, Thomas Mueller 
 [EMAIL PROTECTED] wrote:

 Hi,

 Are the setters actually being called? Maybe the values are never
 being stored in the defaults? Maybe have a look at the preferences
 file for your app (in ~Library/Preferences) to see if anything is
 stored in there. I guess you won't be able to see *which* color is
 stored, though.

 Just an idea; I'm just a few chapters ahead of you, so I'm probably
 wrong... :-)

 Regards,
 Thomas


 2008/7/7 Alex Wait [EMAIL PROTECTED]:
  I've been enjoying NSUserDefaults when going through the Hillegeass
 book.
 
  I've decided to do a small app that has two colors it stores. I get
 these
  colors from a colorwell via  Preference Pane.
 
  I have bounded the values of the wells to backGroundWell and lineWell in
 IB.
 
  I have the appropriately named methods. I know my bindings are ok
 becuase if
  I just return [NSColor whiteColor] instead of the data
  from NSUserDefaults, they're yellow when I open the pane. so that's ok.
 
  I am pretty sure I'm getting a null from the defaults because the wells
 are
  black. I have no blackColor in my project. Already searched for that.
 ;)
 
  What am I doing wrong? I thought that NSUserDefaults was pretty
 simple...
 
  Below are my getters and setters.
 
  -(NSColor*)backGroundWell
  {
 
 NSLog(@called BGwell);
 
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSData* data = [defaults objectForKey:@BGCOLOR];
 NSColor* newColor = [NSKeyedUnarchiver unarchiveObjectWithData:data];
 NSLog(@retrieved Color for BG is %@, newColor);
 //NSLog(@%@,[NSKeyedUnarchiver unarchiveObjectWithData:data]);
 return [NSKeyedUnarchiver unarchiveObjectWithData:data];
  }
  -(NSColor*)lineWell
  {
 
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSData* data = [defaults objectForKey:@LINECOLOR];
 return [NSKeyedUnarchiver unarchiveObjectWithData:data];
  }
 
  -(void)setBackGroundWell: (NSColor*)newColor
  {
 NSLog(@New Color is %@, newColor);
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSColor* color = [backGroundWell color];
 NSData* colorData = [NSKeyedArchiver
 archivedDataWithRootObject:color];
 [defaults setObject:colorData forKey:@BGCOLOR];
 NSLog(@changing background color);
  }
  -(void)setLineWell: (NSColor*)newColor
  {
 NSLog(@New Color is %@, newColor);
 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
 NSData* colorData = [NSKeyedArchiver
  archivedDataWithRootObject:[lineWell color] ];
 [defaults setObject:colorData forKey:@LINECOLOR];
 NSLog(@changing line color);
 
  }
 
 
  ---
  Below is my +(void) initialize method
 
  +(void) initialize
  {
 
 NSMutableDictionary* defaultValues = [NSMutableDictionary
 dictionary];
 
 NSData* backgroundColorData = [NSKeyedArchiver
  archivedDataWithRootObject:[NSColor greenColor] ];
 NSData* lineColorData = [NSKeyedArchiver
  archivedDataWithRootObject:[NSColor whiteColor] ];
 
 [defaultValues setObject:backgroundColorData forKey:@BGCOLOR];
 [defaultValues setObject:lineColorData forKey:@LINECOLOR];
 
 [[NSUserDefaults standardUserDefaults]
 registerDefaults:defaultValues];
 NSLog(@registered defaults %@, defaultValues);
 
  }
 
 
  --
  If you can't be kind, at least have the decency to be vague.
  ___
 
  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/thomasmueller76%40googlemail.com
 
  This email sent to [EMAIL PROTECTED]
 




 --
 If you can't be kind, at least have the decency to be vague.




-- 
If you can't be kind, at least have the decency to be vague.
___

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]


Keyboard Shortcut for Stop

2008-07-05 Thread Alex Wait
It has the solid white up arrow, the apple/command symbol and what looks
like the right arrow.

I press these three keys to no avail. What am I doing wrong?

-- 
If you can't be kind, at least have the decency to be vague.
___

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: Cocoa says not KVC compliant

2008-07-02 Thread Alex Wait
if you have the @property statement, and you use the I think @synthesize
(could be wrong about that) you don't need to write the functions yourself.
Try taking out the @property statement.

On Wed, Jul 2, 2008 at 10:13 AM, Milen Dzhumerov [EMAIL PROTECTED] wrote:

 Hi all,

 I've run into a something I find strange. I've got a property declared as:

 @property(readwrite, assign, nonatomic) CGImageRef image;

 And it's implemented as:

 -(CGImageRef)image
 {
return mImage;
 }

 -(void)setImage:(CGImageRef)newImage
 {
if(mImage != newImage)
{
CGImageRelease(mImage);
CGImageRetain(newImage);
mImage = newImage;
}
 }

 When I try to set it using KVC (e.g. [obj setValue:[NSValue
 valueWithPointer:image] forKeyPath:@image]), it says [*ClassName*
 0x133050 setValue:forUndefinedKey:]: this class is not key value
 coding-compliant for the key image.'

 Any hints on why the class is not KVC-compliant? I've read the docs and it
 seems to satisfy the bullet points listed (moreover it's even declared as
 @property so the naming of the setters / getters should be alright).

 Thanks,
 M
 ___

 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/bobber205%40gmail.com

 This email sent to [EMAIL PROTECTED]




-- 
If you can't be kind, at least have the decency to be vague.
___

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]


Is this still true?

2008-06-29 Thread Alex Wait
this page has been frequently linked to as helpful and it is! :)

http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

But does the bug it talks about still exist?

- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object change:(NSDictionary *)change context:(void
*)context
{
/*
Should be able to use
id oldValue = [change objectForKey:NSKeyValueChangeOldKey];
but the dictionary doesn't contain old and new values...
*/

The change dictionary doesn't contain old and new values. This is not your
fault, it's due to a bug in the controller. This bug will not be fixed in
the forseeable future.
--


-- 
If you can't be kind, at least have the decency to be vague.
___

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: Is this still true?

2008-06-29 Thread Alex Wait
weird. I tried this:

[newPerson addObserver:observe forKeyPath:@lastName options:(
NSKeyValueObservingOptionOld| NSKeyValueObservingOptionNew) context:NULL];

and below is my method

NSLog(@observing);

//int oldLastName = [change o];
id oldName = [change objectForKey:NSKeyValueChangeOldKey];
id newName = [change objectForKey:NSKeyValueChangeNewKey];

NSLog(@old value was %@, oldName);
NSLog(@new value was %@, newName);

}


and sure enough I get both the new value and the old value. Am I shooting
past the problem?

On Sun, Jun 29, 2008 at 3:45 PM, Hamish Allan [EMAIL PROTECTED] wrote:

 On Sun, Jun 29, 2008 at 9:48 PM, Alex Wait [EMAIL PROTECTED] wrote:

  But does the bug it talks about still exist?

 I'm afraid so. But what I really want to know is, *why* won't it be
 fixed any time soon? I presume there *is* a reason, otherwise why
 would mmalc make such a claim?

 Hamish




-- 
If you can't be kind, at least have the decency to be vague.
___

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: Is this still true?

2008-06-29 Thread Alex Wait
ah. I see.

I would still love to know why the apple devs haven't gotten around to do
this yet. :)

On Sun, Jun 29, 2008 at 4:37 PM, Scott Anguish [EMAIL PROTECTED] wrote:

 the controller classes don't return old and new values, that's the part
 that isn't implemented.

 your own classes (provided they're written in a KVO compliant manner) will
 return both.



 On Jun 29, 2008, at 7:32 PM, Alex Wait wrote:

  weird. I tried this:

 [newPerson addObserver:observe forKeyPath:@lastName options:(
 NSKeyValueObservingOptionOld| NSKeyValueObservingOptionNew) context:NULL];

 and below is my method

   NSLog(@observing);

   //int oldLastName = [change o];
   id oldName = [change objectForKey:NSKeyValueChangeOldKey];
   id newName = [change objectForKey:NSKeyValueChangeNewKey];

   NSLog(@old value was %@, oldName);
   NSLog(@new value was %@, newName);

 }


 and sure enough I get both the new value and the old value. Am I shooting
 past the problem?

 On Sun, Jun 29, 2008 at 3:45 PM, Hamish Allan [EMAIL PROTECTED] wrote:

  On Sun, Jun 29, 2008 at 9:48 PM, Alex Wait [EMAIL PROTECTED] wrote:

  But does the bug it talks about still exist?


 I'm afraid so. But what I really want to know is, *why* won't it be
 fixed any time soon? I presume there *is* a reason, otherwise why
 would mmalc make such a claim?

 Hamish




 --
 If you can't be kind, at least have the decency to be vague.
 ___

 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/scott%40cocoadoc.com

 This email sent to [EMAIL PROTECTED]





-- 
If you can't be kind, at least have the decency to be vague.
___

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]


mutableArrayForKeyValue Question

2008-06-28 Thread Alex Wait
I have successfully done some more bindings (they're so much fun ^_^ )

I am trying to modify the array controller programmatically and I'm running
into problems using mutableArrayForKeyValue

I am using this line

id proxy = [controller mutableArrayValueForKey:@Person];



-- 
If you can't be kind, at least have the decency to be vague.
___

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]


mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread Alex Wait
Gmail sent an email on me while I was typing. No idea what happened! :) So
please ignore the incomplete message.

I have successfully done some more bindings (they're so much fun ^_^ )

I am trying to modify the array controller programmatically and I'm running
into problems using mutableArrayForKeyValue

I am using this line

id proxy = [controller mutableArrayValueForKey:@Person];

when I do
[proxy addObject:newPerson]

I get

[NSArrayController 0x130050 valueForUndefinedKey:]: this class is not key
value coding-compliant for the key Person.

In IB I have bound the Content Array to my array member in App Controller.
Shouldn't this work?
I have set the class name to be of the Person class. Right now the key I
am using is Person but I have also tried array and got the same problem.

What do I do next?

-- 
If you can't be kind, at least have the decency to be vague.
___

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: mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread Alex Wait
i've read most of
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_Class/Reference/Reference.html

and I don't see what you mean. is there some magic key?

why isn't it Person or array?
I tried doing
[controller addObject:newObj];
[table reloadData];

and that 'worked at least.


On Sat, Jun 28, 2008 at 8:03 PM, mmalc crawford [EMAIL PROTECTED] wrote:


 On Jun 28, 2008, at 7:42 PM, Alex Wait wrote:

  I am trying to modify the array controller programmatically and I'm
 running
 into problems using mutableArrayForKeyValue
 I am using this line
   id proxy = [controller mutableArrayValueForKey:@Person];
 when I do
   [proxy addObject:newPerson]
 I get
 [NSArrayController 0x130050 valueForUndefinedKey:]: this class is not
 key
 value coding-compliant for the key Person.
 In IB I have bound the Content Array to my array member in App Controller.
 Shouldn't this work?

  No.
 Just as the error states, @Person is not a valid key for the controller.

  I have set the class name to be of the Person class. Right now the key I
 am using is Person but I have also tried array and got the same
 problem.

  Similarly, @array is not a valid key for the controller.

  What do I do next?

  Look at the API reference for NSArrayController to see what are valid
 messages to send to the controller to achieve what it is that you want; read
 the bindings conceptual documentation to see how else you might achieve this
 by modifying the source data controller; or look at the myriad online
 examples that illustrate this.

 mmalc




-- 
If you can't be kind, at least have the decency to be vague.
___

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: mutableArrayForKeyValue Question (ignore other email)

2008-06-28 Thread Alex Wait
indeed it was. it's not needed. I took it out.

On Sat, Jun 28, 2008 at 9:19 PM, mmalc crawford [EMAIL PROTECTED] wrote:


 On Jun 28, 2008, at 8:51 PM, Alex Wait wrote:

  i've read most of
 http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_Class/Reference/Reference.html
 and I don't see what you mean. is there some magic key?

  No, there is no magic key.

  why isn't it Person or array?

  What does the documentation say about how mutableArrayValueForKey: works?
 
 http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/Reference/Reference.html#//apple_ref/occ/instm/NSObject/mutableArrayValueForKey
 :
 If you read *all* the reference for NSArrayController, do you see a method
 Person or a method array?

  I tried doing
 [controller addObject:newObj];
[table reloadData];
 and that 'worked at least.

  It's not clear in what sense this worked as opposed to just worked.
 The invocation of relaodData should be superfluous.

 mmalc




-- 
If you can't be kind, at least have the decency to be vague.
___

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]


Opening a Panel

2008-06-27 Thread Alex Wait
Been working my way through the Hillegass book.

I'm on the chapter where you usea a Panel window and I am having some
trouble. I did all the instructions to the letter (as best as I can tell ^_^
)
and when my program runs, the Preferences menu item is grayed out. I checked
to make sure it was Enabled and it is.

Is there some property I need to set?

-- 
If you can't be kind, at least have the decency to be vague.
___

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

2008-06-27 Thread Alex Wait
To complete the exercise you need to make your app controller a data source
of the NSTableView.

The function he gives you as a hint is the one that is called when a user
edits the field.

On Fri, Jun 27, 2008 at 5:37 PM, Ken Thomases [EMAIL PROTECTED] wrote:

 On Jun 27, 2008, at 5:46 PM, Nick Zitzmann wrote:

  On Jun 27, 2008, at 4:41 PM, Eric Lee wrote:

  My question is, how do you add an object to a NSMutableArray,


 -addObject:. This is in the NSMutableArray documentation...


 If the NSMutableArray is the backing storage for a property, then modifying
 it directly using -addObject: will not inform objects observing that
 property using KVO of the change.  So, be careful when slinging that advice
 around.


  and then have
 to array display it?


 Arrays usually serve as back-ends for NSTableView views (hint).

  The book has a hint about a method, -replaceObjectAtIndex:withObject:.
 How
 do you implement that?



 What do you mean? The method is already implemented as part of
 NSMutableArray.


 I'm not familiar with the Hillegass book, so I don't know what this
 particular exercise is about.  I can think of a few possibilities:

 *) He may be hinting that you modify your to-many property using the
 key-value coding (KVC) indexed accessor
 -replaceObjectInKeyAtIndex:withObject:, which you can implement in terms
 of -[NSMutableArray replaceObjectAtIndex:withObject:].

 *) He may be hinting that you modify your to-many property by obtaining a
 proxy for it using -mutableArrayValueForKey:, and then modify that using
 -replaceObjectAtIndex:withObject:.

 *) If you're not up to KVO and bindings, he may be suggesting that you use
 -replaceObjectAtIndex:withObject: to modify the array, and then invoke
 -reloadData on the NSTableView to tell it that the data has changed.

 Cheers,
 Ken

 ___

 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/bobber205%40gmail.com

 This email sent to [EMAIL PROTECTED]




-- 
If you can't be kind, at least have the decency to be vague.
___

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: Opening a Panel

2008-06-27 Thread Alex Wait
apologies to all ;)

I had misspelled my action's name. I am still getting used to Obj C and it's
ability to compile methods that haven't been declared. :)

On Fri, Jun 27, 2008 at 6:15 PM, Ken Thomases [EMAIL PROTECTED] wrote:

 On Jun 27, 2008, at 6:31 PM, Alex Wait wrote:

  and when my program runs, the Preferences menu item is grayed out. I
 checked
 to make sure it was Enabled and it is.

 Is there some property I need to set?


 By default, Cocoa automatically enables/disables menu items.  It does this
 based on their target and action.  If the target implements the action, then
 the menu is enabled; if not, it's disabled.  If the target is First
 Responder (i.e. nil), then Cocoa scans the responder chain for an object
 that responds to the action.  If it finds one, the menu item is enabled;
 otherwise, it's disabled.

 So, double-check that you've set the menu item's action.  If it's connected
 to a specific target object, make sure that object responds to that
 selector.  (Check spelling and case!)  If it's connected to First Responder,
 make sure that something in the responder chain responds.  For a Preferences
 menu, it's usually the application delegate/controller or the application
 object which would ultimately respond.  If you have an object which is
 supposed to be the application delegate, make sure it really is.  That's
 often accomplished by instantiating the delegate in the main nib and
 connecting the application's delegate outlet to it.

 Cheers,
 Ken




-- 
If you can't be kind, at least have the decency to be vague.
___

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]


Style Question

2008-06-27 Thread Alex Wait
I have noticed, coming from C++ and Visual Studio (at school), a couple
style differences

if (value) {
//do something
}

insteasd of

if (value)
{
//do something
}

Also since I am using this style, XCode doesn't tab in for me when I type {
then a return. This is the style I taught and I would like to continue the
good habits
during the summer.

Is this a Cocoa style? I've seen it on this mailing list and in the
Hillegeass book.

-- 
If you can't be kind, at least have the decency to be vague.
___

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

2008-06-27 Thread Alex Wait
I got another Style related question.

if I have a member, let's say a NSString, called FirstName...

would the setter still be setFirstName?

I notice how it capitalizes the first letter even if the member doesn't
start with a capital letter.
if I have a three word named variable, let's say firstNameFirst
how would it find it? Or does it do a case insensitive compare?


On Fri, Jun 27, 2008 at 9:40 PM, Shawn Erickson [EMAIL PROTECTED] wrote:

 On Fri, Jun 27, 2008 at 9:30 PM, Alex Wait [EMAIL PROTECTED] wrote:

  Also since I am using this style, XCode doesn't tab in for me when I type
 {
  then a return.

 It will if you enable it (at least it always does for me).

 Use whatever coding style you want however do try to follow Cocoa like
 naming convention.

 Personally for methods I have the { on the line following the method
 definition while for all other blocks (most other) I have the { at the
 trailing end of the line (aka end of the if statement line, etc.).

 -Shawn




-- 
If you can't be kind, at least have the decency to be vague.
___

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

2008-06-27 Thread Alex Wait
I was meaning to imply that if it was called FirstName would setFirstName
still be called?

I know the convention for naming variables. :)

On Fri, Jun 27, 2008 at 10:13 PM, Jens Alfke [EMAIL PROTECTED] wrote:


 On 27 Jun '08, at 9:44 PM, Alex Wait wrote:

  if I have a member, let's say a NSString, called FirstName...
 would the setter still be setFirstName?


 Yes. But you shouldn't name the property FirstName. Property and method
 (and instance variable) names should be lowercased. There are some
 exceptions made when the name begins with an acronym, most commonly URL,
 that needs to remain uppercase for legibility.

 Honestly, no one reading your code is going to care whether you put braces
 at the end of a line or on a new line. But naming conventions are important
 and can help or confuse other people (or yourself, a year later) trying to
 understand it.

 —Jens




-- 
If you can't be kind, at least have the decency to be vague.
___

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]


KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
Practicing some KVO concepts.

I have this line

[person addObserver:textField forKeyPath:@firstName
options:NSKeyValueObservingOptionNew context:NULL];


person is App Controller's Person object.
textField is a NSTextField
person does have a firstName property of type NSString

When I click on a button that updates the firstName property I get this
message

2008-06-27 22:17:29.751 Bindings1[21896:10b] NSTextField: 0x123c30: An
-observeValueForKeyPath:ofObject:change:context: message was received but
not handled.
Key path: firstName
Observed object: firstName: Basic and lastName: Wait
Change: {
kind = 1;
new = Basic;
}
Context: 0x0


At least it's firing! ^_^
But I was sure since I have a firstName method and a setFirstName method it
would update the textField. I have used IB to bind the value of the
textField to the value of the person object and that works when I edit the
textfield (yay). So I know I have the proper methods. I think.

Am I doing something wrong? (I assume I am)

-- 
If you can't be kind, at least have the decency to be vague.
___

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: KVO Question -- Really Simple for Pros

2008-06-27 Thread Alex Wait
could you be more specific that just a link? ;)

On Fri, Jun 27, 2008 at 10:23 PM, mmalc crawford [EMAIL PROTECTED]
wrote:


 On Jun 27, 2008, at 10:20 PM, Alex Wait wrote:

  But I was sure since I have a firstName method and a setFirstName method
 it
 would update the textField. I have used IB to bind the value of the
 textField to the value of the person object and that works when I edit the
 textfield (yay). So I know I have the proper methods. I think.

  Observing != binding:

 http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html
 

 mmalc




-- 
If you can't be kind, at least have the decency to be vague.
___

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: Bindings Concept Question

2008-06-21 Thread Alex Wait
Ok. Pretty deep topic and I'm working to wrap my head around it.

I have taken the liberty to paste my addData method that is called when the
button is pressed (it's at the end of the message).

I have tried to, in my init method, to do this

id proxy = [controller mutableArrayValueForKey:@arrayOfData];

I have also tried using the values firstName and lastName which are the
properties of my Data class. controller is a pointer
to my array controller.

however proxy is nil. In a reponse, I read that
KVO does provide the -mutableArrayValueForKey... methods to create a proxy
object which you can treat as a mutable array but which messages the owning
object to carry out the actual modifications.  In that way, the owning
object is able to send out KVO notifications as necessary.  (Even if the
proxy ends up accessing the ivar directly, it still messages the owning
object with -will/didChange:valuesAtIndexes

 :forKey:.)


If I am able to get a proxy object, can I do modifications and still have
KVO notifications sent?
After reading the responses I am sure that this method is not adding the
data in the way that means KVO notifciations would be sent.


ADD METHOD

-(void)addData: (id) sender
{

NSString* newFirst = [firstNameField stringValue];
NSString* newLast = [lastNameField stringValue];
Data* newData = [[Data alloc]init];

[newData setValue:newFirst forKey:@firstName];
[newData setValue:newLast forKey:@lastName];


[arrayOfData addObject:newData];

if (table != nil)
NSLog(@num is %d, [arrayOfData count]);

[table reloadData];

}




On Sat, Jun 21, 2008 at 4:40 AM, mmalc Crawford [EMAIL PROTECTED]
wrote:


 On Jun 20, 2008, at 10:16 PM, Alex Wait wrote:

  When the app starts, I see the data as expected. However, when I call my
 add
 function, which gets the strings from the textFields and makes the
 new Data object and adds it to the array, I do not see it in the table.

  http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
 Programmatic modifications to arrays not noticed by table view

 mmalc




-- 
If you can't be kind, at least have the decency to be vague.
___

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]


Warnings in Interface Builder

2008-06-21 Thread Alex Wait
Is there any way to quiet Interface Builder about my using an Array
Controller and button styles not avaiable on all OS X versions?

It's extremely annoying. :)

Alex

-- 
If you can't be kind, at least have the decency to be vague.
___

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: Warnings in Interface Builder

2008-06-21 Thread Alex Wait
Thanks guys. I was being a bit of a dunce there. :)

On Sat, Jun 21, 2008 at 5:19 PM, Aron Nopanen [EMAIL PROTECTED] wrote:

 Click the 'info' button on the main NIB window, and set the deployment
 target appropriately?

 -A


 On 22/06/2008, at 12:11 PM, Alex Wait wrote:

  Is there any way to quiet Interface Builder about my using an Array
 Controller and button styles not avaiable on all OS X versions?

 It's extremely annoying. :)

 Alex

 --
 If you can't be kind, at least have the decency to be vague.
 ___

 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/ardnopes%40yahoo.com

 This email sent to [EMAIL PROTECTED]





-- 
If you can't be kind, at least have the decency to be vague.
___

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]


No File Opening Aftering adding a file Type

2008-06-21 Thread Alex Wait
I was following my book to the letter (Cocoa Programming for Mac OS X 3rd
edition) and I added the file type as it instructed.

Now when I start my program Open and Save are grayed out and I get this
error

2008-06-21 17:44:13.117 RaiseMan[6870:10b] The RaiseMan Doc type doesn't map
to any NSDocumentClass.

How did this happen?
(File is here
http://rapidshare.com/files/124129258/RaiseMan_2.zip.html)


-- 
If you can't be kind, at least have the decency to be vague.
___

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]


Bindings Concept Question

2008-06-20 Thread Alex Wait
I know this is probably a really basic question about binding but it's sure
tripping me up right now.

I am making my way through Cocoa Programming for Mac OS X by Aaron
Hillegrass. It's an excellent book btw.

However the first time he has discusses binding is in the context of a
NSDocument arch.

I am trying to make an app on my own. On the window I have a TableView with
two columns, two edit fields, and a button.

My desired behavior is for the user to type in both of the fields, click the
add button and poof it appears in the table.
I have done this exercise before but I made my AppController class the
dataSource and provided the methods. I would like to this time use
the NSArrayController to handle it for me.

Right now I have NSArrayController binded to App Controller and the
arrayOfData array. In my init method for Appcontroller,
I add one Data object (which contains two strings) to my NSMutableArray.
This array is the array that my ArrayController is bound to.

When the app starts, I see the data as expected. However, when I call my add
function, which gets the strings from the textFields and makes the
new Data object and adds it to the array, I do not see it in the table.

I tried calling the table's reloadData function but that did not work. (I
bounded it of course and I threw in a check to make sure it's not nill with
a NSLog to prove it to me)

What am I doing wrong?

--Thanks for reading this fairly long winded post. I am greatly enjoying
this new methodology of Cocoa programming. It's very exciting and I am eager
to learn more!

Alex Wait

-- 
If you can't be kind, at least have the decency to be vague.
___

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]


NSTableView DataSource Problem

2008-06-19 Thread Alex Wait
First time doing this on my own.

I have the classic AppController class. I set the datasource and the
delegate to be AppController for my dataSource. I have a NSTableView* to the
table
that I also set in Interface Builder.

I have the methods below. listOfItems is a NSMutableArray with some NSString
objects in it.

I get the warning:
2008-06-19 19:12:55.889 OwnDataSource[96942:10b] *** Illegal NSTableView
data source (AppController: 0x137b00).  Must implement
numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:

But I clearly have those. What have I done wrong?

Thanks for any help,
Alex

-(int) numberOfRowsInTableView:(NSTableView*) thetable
{

return [listOfItems count];
}

-(id) table: (NSTableView*)tv
 objectValueForTableColumn:(NSTableColumn*)tableColumn
 row:(int) row
{

return [listOfItems objectAtIndex:row];

}
___

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]