Search Results

Search found 5 results on 1 pages for 'botto'.

Page 1/1 | 1 

  • UITableViewCell with UITableViewCellStyleValue1, adding new line to detailTextLabel at cell at botto

    - by slim
    on my tableview i have the last cell that is not initially visible as seen in the first image, when i scroll the list up, you can see in the second image that the price or my detailTextLabel is put on a new line not maintaining the right justification. Here is the code, i can't figure out why its doing this, any direction or help would be much appreciated - (UITableViewCell *)tableView:(UITableView *)ltableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [ltableView dequeueReusableCellWithIdentifier:CellIdentifier]; // Configure the cell. NSUInteger indexRow = [indexPath row]; switch (indexRow) { case 0:{ NSCharacterSet *set = [NSCharacterSet whitespaceCharacterSet]; NSString *description = [[currentData objectForKey:@"Description"] stringByTrimmingCharactersInSet:set]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.accessoryType = UITableViewCellAccessoryNone; cellShift = 1; if (![description isEqualToString:@""]) { cell.textLabel.text = @""; cell.detailTextLabel.text = description; cell.detailTextLabel.numberOfLines = 2; } else { cell.textLabel.text = @""; cell.detailTextLabel.text = @""; cell.detailTextLabel.numberOfLines = 0; } break; } default:{ if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease]; } NSDictionary *item = [tableData objectAtIndex:(indexRow-cellShift)]; NSString *name = [item objectForKey:@"Name"]; if ([name length] > MaxVendorsLength ) { name = [NSString stringWithFormat:@"%@ ...",[name substringToIndex:MaxVendorsLength]]; } cell.textLabel.text = name; cell.textLabel.minimumFontSize = 12; NSString *priceString; float price = [[item objectForKey:@"Price"] floatValue]; //NSLog(@"| %@ | : | %@ |",[item objectForKey:@"Name"], [item objectForKey:@"Price"]); if (price != 0) { priceString = [[NSString alloc] initWithFormat:@"$%.2f",price]; } else { priceString = [[NSString alloc] initWithString:@"--"]; } cell.detailTextLabel.text = priceString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [priceString release]; break; } } cell.textLabel.font = [UIFont boldSystemFontOfSize:15]; cell.textLabel.minimumFontSize = 14; cell.detailTextLabel.font = [UIFont boldSystemFontOfSize:15]; cell.detailTextLabel.minimumFontSize = 14; return cell; } Let me know if i need to post anything else to get help with this ???

    Read the article

  • Clean URLS on Hiawatha

    - by Botto
    I am using the Hiawatha web server and running drupal on a FastCGI PHP server. The drupal site is using imagecache and it requires either private files or clean urls. The issue I am having with clean urls is that requests to files are being rewritten into index.php as well. My current config is: UrlToolkit { ToolkitID = drupal RequestURI exists Return Match (/files/*) Rewrite $1 Match ^/(.*) Rewrite /index.php?q=$1 } The above does not work. Drupal's apache set up is: <Directory /var/www/example.com> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </Directory>

    Read the article

  • Hiawatha and Drupal

    - by Botto
    I posted this on serverfault as well, but I probably asked in the wrong group. I am using the Hiawatha web server and running drupal on a FastCGI PHP server. The drupal site is using imagecache and it requires either private files or clean urls. The issue I am having with clean urls is that requests to files are being rewritten into index.php as well. My current config is: UrlToolkit { ToolkitID = drupal RequestURI exists Return Match (/files/*) Rewrite $1 Match ^/(.*) Rewrite /index.php?q=$1 } The above does not work. Drupal's apache set up is: <Directory /var/www/example.com> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </Directory>

    Read the article

  • One to One relationship in MySQL

    - by Botto
    I'm trying to make a one to one relationship in a MySQL DB. I'm using the InnoDB engine and the basic table looks like this: CREATE TABLE `foo` ( `fooID` INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `name` TEXT NOT NULL ) CREATE TABLE `bar` ( `barName` VARCHAR(100) NOT NULL, `fooID` INT(11) NOT NULL PRIMARY KEY, CONSTRAINT `contact` FOREIGN KEY (`fooID`) REFERENCES `foo`(`fooID`) ) Now once I have set up these I alter the foo table so that the fooID also becomes a foreign key to the fooID in bar. The only issue I am facing with this is that there will be a integrity issue when I try to insert into either. I would like some help, thanks.

    Read the article

  • Compile a PHP script in Linux

    - by Botto
    I know php scripts don't actually compile until they are run. However say I want to create a small simple program and compile it to a binary without requiring the php binary. How could I do this? I'v seen a few IDE's out there that would do this, but either they are all for windows or the linux versions don't actually build properly. What I would like is something like py2exe that does it in the script itself.

    Read the article

1