xStep
Apr 4, 07:12 PM
rustywild sent me a private message and this is my response to that.
I only slept 4 hours last night so I might still be misunderstanding. Part of your explanation didn't make any sense given your code.
This is what I believe you have�
A dictionary where the keys will be the left most component that sets up what the right side component should display. The keys are placed into a sorted array. Each time component 0 changes, you want to update the right side component. Each time a choice is made, you want it reflected in two labels. The following code should do that for you. This is untested code.
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
if (component == kPotenciaComponent) {
NSString *selectedState = [self.potencia objectAtIndex:row];
// Update values array for key of component 0.
[self.cantidad release];
self.cantidad = [potenciavoltaje objectForKey:selectedState];
[pickerView reloadAllComponents]; // Might not need to load all, but I do.
[pickerView selectRow: row inComponent: kPotenciaComponent animated: YES];
[pickerView selectRow: 0 inComponent: kCantidadComponent animated: YES];
label1.text = [self.potencia objectAtIndex:row];
label2.text = [self.cantidad objectAtIndex: 0];
}
else {
label2.text = [self.cantidad objectAtIndex: row];
}
}
The labels are updated here because that is when the change is occurring in your selection. You may also want to set them when you first setup your two data arrays in your viewDidLoad method.
P.S. Looks like you are a native Spanish speaker. Welcome to the challenge of communicating technical problems in another language. :)
I only slept 4 hours last night so I might still be misunderstanding. Part of your explanation didn't make any sense given your code.
This is what I believe you have�
A dictionary where the keys will be the left most component that sets up what the right side component should display. The keys are placed into a sorted array. Each time component 0 changes, you want to update the right side component. Each time a choice is made, you want it reflected in two labels. The following code should do that for you. This is untested code.
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
if (component == kPotenciaComponent) {
NSString *selectedState = [self.potencia objectAtIndex:row];
// Update values array for key of component 0.
[self.cantidad release];
self.cantidad = [potenciavoltaje objectForKey:selectedState];
[pickerView reloadAllComponents]; // Might not need to load all, but I do.
[pickerView selectRow: row inComponent: kPotenciaComponent animated: YES];
[pickerView selectRow: 0 inComponent: kCantidadComponent animated: YES];
label1.text = [self.potencia objectAtIndex:row];
label2.text = [self.cantidad objectAtIndex: 0];
}
else {
label2.text = [self.cantidad objectAtIndex: row];
}
}
The labels are updated here because that is when the change is occurring in your selection. You may also want to set them when you first setup your two data arrays in your viewDidLoad method.
P.S. Looks like you are a native Spanish speaker. Welcome to the challenge of communicating technical problems in another language. :)
Omad0n
Mar 4, 03:33 PM
Hi all, it's now been 2 and a half weeks since i got my new 17 inch powerbook and I thought I'd give a more through review.
Screen:
wallpaper pc hd. PaRaGoNViCtiM
Hi Def Wallpaper. high
Mac Backgrounds Wallpaper HD.
Ultra High Definition Vista
wallpaper hd 1080p nature.
This is a very Nice HD Live
wallpaper space hd. HD.
Tags: hi def widescreen
portal 2 wallpaper hd. portal
HiDef Punisher Wallpaper
hi def wallpapers.
Hi Def Wallpapers.
legend of zelda wallpaper
hi def background
hi def wallpaper widescreen
fallout hi def Wallpaper
hi def background
Screen:
Aperture
Oct 17, 11:23 PM
Very Nice! Love the music also.:)
Tomorrow
Apr 20, 09:57 AM
MacBook and an iMac - and I virtually never do anything on one that would ever get done on the other, so no syncing necessary.
HexMonkey
Jan 10, 09:09 PM
Open Terminal (/Application/Utilities/Terminal) and type in the following:
defaults write com.apple.dock wvous-floater -bool false
killall Dock
defaults write com.apple.dock wvous-floater -bool false
killall Dock
Mr. Retrofire
Apr 11, 10:45 AM
Also I even tried restoring twice into earlier OS X Lion backups but that didn't even work :/ :(
I had a similar problem with Lion DP1. I erased the HD with Apples Disk Utility and reinstalled Lion DP1. However, the safe boot works usually in the final versions of Mac OS X.
I had a similar problem with Lion DP1. I erased the HD with Apples Disk Utility and reinstalled Lion DP1. However, the safe boot works usually in the final versions of Mac OS X.
andylyon
Nov 30, 02:40 PM
Finally available to us in the UK!!
chunhohuen
Apr 22, 08:05 AM
I'm surprised this compiles (i.e. that you only get errors when linking). The line
string input=inputusername;
must have thrown an error at you, since "inputusername" is not visible to functions outside the class.
Where you define the code, you need to put in classname::functionname
Do this for every function you define. This need not be done if you are within the class declaration.
void login::find()
{
ifstream file;
file.open("file.txt");
string input=inputusername;
string input_line;
bool found = false;
while( file >> input_line ) {
if( input_line.compare(input) == 0 ) {
cout << "The name " << input_line << " was found in file.\n";
found = true;
break;
}
}
Thank you very much !;)!
It can work now :p!
string input=inputusername;
must have thrown an error at you, since "inputusername" is not visible to functions outside the class.
Where you define the code, you need to put in classname::functionname
Do this for every function you define. This need not be done if you are within the class declaration.
void login::find()
{
ifstream file;
file.open("file.txt");
string input=inputusername;
string input_line;
bool found = false;
while( file >> input_line ) {
if( input_line.compare(input) == 0 ) {
cout << "The name " << input_line << " was found in file.\n";
found = true;
break;
}
}
Thank you very much !;)!
It can work now :p!
allisonnn
Oct 24, 02:51 PM
tice's is better
xFU3Lx
Dec 15, 04:22 PM
How do I get to it? PBfixit.com says its behind a little door inside the battery compartment. That door isn't there. Do I have to take the logic board off?
carrieann
May 5, 01:53 PM
FANTASTIC. I don't know why it didn't occur to me to go the NAS route. Thanks all, I'll check out Synology and Drobo... seems like the best way to go!
mikes63737
Apr 3, 03:19 PM
Here's a question that's been bugging me for a while. If you have a headless PC, does it need a video card in it?
The way I see it, it shouldn't because there's no monitor attached to it, but at the same time, VNC outputs what is on the monitor, which is driven by a video card. I've always wondered this, and I'm too lazy to pull the video card from my comp....
It most likely does. Your BIOS may keep you from booting the computer. If you have a really expensive graphics card, you can certainly downgrade. Newegg.com has many for under $20.
I wouldn't reccommend VNC if you have a 10/100 network because VNC causes high network traffic.
The way I see it, it shouldn't because there's no monitor attached to it, but at the same time, VNC outputs what is on the monitor, which is driven by a video card. I've always wondered this, and I'm too lazy to pull the video card from my comp....
It most likely does. Your BIOS may keep you from booting the computer. If you have a really expensive graphics card, you can certainly downgrade. Newegg.com has many for under $20.
I wouldn't reccommend VNC if you have a 10/100 network because VNC causes high network traffic.
fun173
Aug 19, 08:44 PM
So you get them, strip them of the parts and sell them again?
Haha of course not! if i am going to hustle someone it will be with a more expensive Mac:p
I get them from the trash take their parts and recycle them. I would keep them but i don't have the room
Haha of course not! if i am going to hustle someone it will be with a more expensive Mac:p
I get them from the trash take their parts and recycle them. I would keep them but i don't have the room
Fubar1977
Apr 18, 06:05 AM
It's not the number of Megapixels, but the sensor size. Jamming that many MPs into a tiny sensor will not give you a good camera
True.
An 8MP cam with with a better lens will destroy it.
Cameraphones will always be a bit gimped purely because of their size and multifunction nature.
I had the 12MP SE Satio for a couple of months and it was good for a phone but my old 7MP compact camera with a better lens blew it away.
True.
An 8MP cam with with a better lens will destroy it.
Cameraphones will always be a bit gimped purely because of their size and multifunction nature.
I had the 12MP SE Satio for a couple of months and it was good for a phone but my old 7MP compact camera with a better lens blew it away.
Ibanez Strummer
Sep 23, 07:54 AM
I have Logic 8 Express, but am hoping to upgrade to 9 Studio whilst still at university (lovely discount :D ). On the interface front, I would not buy through the apple store as very expensive. Try somewhere like dolphin music (www.dolphinmusic.co.uk) or Guitar, Amp and Keyboard Centre (www.gak.co.uk). These are both reputable music stores.
Just for comparison - the M-Audio Fast Track Pro USB
Apple Store = �205.95
http://store.apple.com/uk/product/TQ919ZM/A?mco=OTE4MzMxNQ
Dolphin Music = �134.99
http://www.dolphinmusic.co.uk/product/7475-m-audio-fast-track-pro-4-x-4-mobile-usb-audio-midi-interface-with-preamps.html
Gak = �131
http://www.guitarampkeyboard.com/en/fast-track/68482
I haven't really used the interfaces myself to give a good opinion. I have an Fast Track USB which is the most basic and cheap available and its been ok. Guess more expense should mean better quality!
Oh and if you meant the midi keyboards then again just shop around and see. I want an M-Audio Oxygen 61 when get the money....
Just for comparison - the M-Audio Fast Track Pro USB
Apple Store = �205.95
http://store.apple.com/uk/product/TQ919ZM/A?mco=OTE4MzMxNQ
Dolphin Music = �134.99
http://www.dolphinmusic.co.uk/product/7475-m-audio-fast-track-pro-4-x-4-mobile-usb-audio-midi-interface-with-preamps.html
Gak = �131
http://www.guitarampkeyboard.com/en/fast-track/68482
I haven't really used the interfaces myself to give a good opinion. I have an Fast Track USB which is the most basic and cheap available and its been ok. Guess more expense should mean better quality!
Oh and if you meant the midi keyboards then again just shop around and see. I want an M-Audio Oxygen 61 when get the money....
trekkie604
Oct 30, 03:25 AM
DVD's
http://link.trekcubed.com/dvds1.jpg http://link.trekcubed.com/dvds2.jpg
Blu-Ray
http://link.trekcubed.com/dvds3.jpg
Only have one PS3 for blu-rays so the family still buys DVDs most of the time...
http://link.trekcubed.com/dvds1.jpg http://link.trekcubed.com/dvds2.jpg
Blu-Ray
http://link.trekcubed.com/dvds3.jpg
Only have one PS3 for blu-rays so the family still buys DVDs most of the time...
narco
Dec 19, 06:40 AM
I've always fell for the "hauntingly beautiful" line, and I think it definitely fits with her. I have the album before this one (which I believe is her debut?) and had no idea a new one came out -- I'll have to check it out.
Fishes,
narco.
Fishes,
narco.
wordoflife
Apr 8, 02:29 PM
http://news.cnet.com/i/tim//2010/06/23/iphone4-52_2_610x407_610x407.jpg
mc68k
Mar 5, 02:52 PM
im not gonna lie, i do it for the points
i like the whole research idea, but i don't think folding is gonna change the world or anything
i like the whole research idea, but i don't think folding is gonna change the world or anything
Fubar1977
Feb 14, 05:51 AM
That`s why I arm all my poultry with Mac 10`s.
Never bring a knife to a gunfight.
Never bring a knife to a gunfight.
Illusion86
Jun 20, 05:01 PM
Gonna be on this damn forum fantasizing about it...
Mikesus
May 1, 02:10 PM
Did you put it in DFU mode?
rainman::|:|
Sep 10, 09:18 AM
They just need to have another Us Fest, seriously. For those that don't remember, in the early 80s (before Apple lost it's cool, while Jobs and Woz were still a team) they laid down sod over part of the desert, had air-conditioned tents, and threw a rock festival in part for their employees and the press. This was two decades before Apple got into digital music... they knew how to throw a party :)
edit: I'm not sure if it was Apple or Wozniac that officially sponsored it, so don't flame me.
edit: I'm not sure if it was Apple or Wozniac that officially sponsored it, so don't flame me.
clayj
Mar 20, 09:09 PM
Here's a similar project (http://www.clayj.com/html/BRVAIOBoy.htm) (although the description is not quite as detailed) on a Sony notebook, in case anyone wants to compare results.
http://www.clayj.com/html/BRVAIOBoy(1).jpg
http://www.clayj.com/html/BRVAIOBoy(1).jpg
Комментариев нет:
Отправить комментарий