|
|
#1 |
|
Debugging color problem(s)
OS X 10.8.2, XCode 4.5.2.
I put a round button on my view and set it borderless and used it to simulate an LED. I set the color thus. Worked well. Code:
[[buttonLED3 cell] setBackgroundColor:[NSColor redColor]]; [[buttonLED3 cell] setBackgroundColor:[NSColor greenColor]]; Code:
NSColor *myColor = [NSColor colorWithCalibratedRed:(189/255.0f) green:(219/255.0f) blue:(201/255.0f) alpha:(1.0)]; [myColor set]; [myWindow setBackgroundColor:myColor]; Somewhere along the way the LEDS quit, they show no color. I went back and removed all the window coloring and the core animation settings and did a clean. I even added another simulated LED, but still no color. Two questions. How can I debug the loss of ability to color the LEDS? Is there a conflict between any of the steps I took that would prevent me from doing all the coloring? |
|
|
|
0
|
|
|
#2 |
|
The line
Code:
[myColor set];
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed. Like it on Facebook! |
|
|
|
0
|
|
|
#3 |
|
This is a long shot, but sometimes it seems like UI elements don't always realize they need display updating correctly (or rather, when you might think they should). You might try calling setNeedsDisplay:YES on anything that doesn't look like you expect it to. If that doesn't work, try just issuing a straight-up display to the object (e.g., [[buttonLED3 cell] display]).
|
|
|
|
0
|
|
|
#4 | ||
|
Quote:
---------- Quote:
|
|||
|
|
0
|
|
|
#5 |
|
Are your outlets set properly?
It seems like you might want to just zip your project and post it to these forums so someone else can take a look at it... I don't think we can help you with just the snippets and description you've given so far... |
|
|
|
0
|
|
|
#6 | |
|
Quote:
Removed the progress bar and the button still works. I also removed the 1st button. All this before I read this post, so I don''t think attaching the project would be of any benefit, but I will if you think it would. So, problem gone. Not understood, just gone.
|
||
|
|
0
|
|
|
#7 |
|
Well, sometimes your outlets get stopped up with extra bits and junk, and you need to clear that out for them to work properly. The solution is to create an NSOutletPlunger and call [plunger unclogOutletsForObject:].
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 02:36 AM.







Linear Mode
