我从互联网上找到了很多示例代码,但也没有用....任何人都可以告诉我下面编码的错误是什么?非常感谢.SOS
//我的商店屏幕
http://imageupload.org/en/file/209300/03.jpg.html
//This is PickerViewTest.h
@interface InputRound : UIViewController<UITextFieldDelegate>
{
UIPickerView *pvPickerTest;
NSMutableArray *aryMaster;
}
@property (nonatomic, retain) IBOutlet UIPickerView *pvPickerTest;
@property (nonatomic, retain) NSMutableArray *aryMaster;
@end
//This is PickerViewTest.m
@interface InputRound ()
@end
@implementation PickerViewTest
@synthesize pvPickerTest, aryMaster;
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
-(void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
aryMaster = [[NSMutableArray alloc] init];
[aryMaster addObject:@"User01"]; …
Run Code Online (Sandbox Code Playgroud) Let's say I have this table with the identity column pkid
, how can I generate the cust_num
as VIP000000 + <pkid>
when inserting a record like this?
pkid | cust_name | cust_num |
---|---|---|
1 | Tom | VIP0000001 |
2 | May | VIP0000002 |
10 | John | VIP0000010 |
CREATE TABLE [dbo].[tbl01]
(
[pkid] [numeric](9, 0) IDENTITY(1,1) NOT NULL,
[cust_name] [varchar](50) NOT NULL,
[cust_num] [varchar](20) NOT NULL
) ON [PRIMARY]
Run Code Online (Sandbox Code Playgroud) 我有以下编码,我确保如果条件为TRUE,但我无法进入它.我通过使用NSLog将步骤前后的值和长度写入if语句证明它,两者都等于"test"和length = 4,任何人都可以解决我的问题?
请看下面链接哪个是我的帽子屏幕,请帮忙,谢谢!!!!
http://postimage.org/image/rvtxcq1g1/
NSLog(@"Before value=%@, lenght=%i", txtMaster.text, [txtMaster.text length]);
if (txtMaster.text == @"test")
{
NSLog(@"%@\n", @"Success");
}
NSLog(@"After value=%@, lenght=%i", txtMaster.text, [txtMaster.text length]);
Run Code Online (Sandbox Code Playgroud) cocoa-touch ×1
if-statement ×1
ios ×1
objective-c ×1
sql ×1
sql-server ×1
uipickerview ×1
uitextfield ×1