• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing color in NSColorWell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing color in NSColorWell


  • Subject: Re: Changing color in NSColorWell
  • From: Apparao <email@hidden>
  • Date: Thu, 12 Oct 2006 10:52:01 +0530

Check anotherChosenColorWell outlet points to ColorWell or not. My assumption is, it points to nil.

On 12-Oct-06, at 8:44 AM, R T wrote:

In the "DrawerController" files below, the code...

	float aRed = .7581, aGre = 1., aBlu = 0, aAlp = 1;
	[chosenColorWell	setColor:[NSColor
colorWithCalibratedRed:aRed green:aGre blue:aBlu
alpha:aAlp]];

...works correctly. It Changes the color in a
ColorWell.
In the "Space" files also below the same code does not
work.
Any ideas Why?
The ColorWells were both created in IB and then set up
as outlets and connected.

Thanks Rick T.
//////////////////////////


#import <Cocoa/Cocoa.h>

@interface DrawerController :	NSObject
{
	IBOutlet NSColorWell *aChosenColorWell;
}

- (float)processLeftDrawer;

@end

//////////////////////////

#import "DrawerController.h"

@implementation DrawerController

- (float)processLeftDrawer{
	float aRed = .7581, aGre = 1., aBlu = 0, aAlp = 1;
	[aChosenColorWell	setColor:[NSColor
colorWithCalibratedRed:aRed green:aGre blue:aBlu
alpha:aAlp]];
}

@end

//////////////////////////
/* Space */

#import <Cocoa/Cocoa.h>

@class DrawerController;

@interface Space : NSView
{

	IBOutlet NSColorWell *anotherChosenColorWell;
}

- (void) mouseUp:(NSEvent *) theEvent;

@end

//////////////////////////

#import "Space.h"
#import "DrawerController.h"

@implementation Space

- (void) mouseUp:(NSEvent *) theEvent
{
	float gPriRed = .7581, gPriGre = 1., gPriBlu = 0,
gPriAlp = 1;
	[anotherChosenColorWell	setColor:[NSColor
colorWithCalibratedRed:gPriRed green:gPriGre
blue:gPriBlu alpha:gPriAlp]];
}

@end


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40effigent.net


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Changing color in NSColorWell (From: R T <email@hidden>)

  • Prev by Date: Changing initial settings view in NSPrintPanel or NSPageLayout
  • Next by Date: Re: NSArrayController bindings -- duplicate data? [SOLVED]
  • Previous by thread: Changing color in NSColorWell
  • Next by thread: Re: creating views
  • Index(es):
    • Date
    • Thread