2011年3月31日 星期四
2011年3月30日 星期三
sharemgr remove share problem
when an asterisk (*) preceding the share. it is a temporary share
We can not delete it
user can access temporary share
It will disappear after reboot
how to create temporary share:
ex:
sharemgr add-share -t -r peter -s /Test/imac/peter smb_group
We can not delete it
user can access temporary share
It will disappear after reboot
how to create temporary share:
ex:
sharemgr add-share -t -r peter -s /Test/imac/peter smb_group
share problem:
auto create nfs share because /lib/svc/method/nfs-server call "sharemgr start -P nfs -a" to enable nfs on all group
solution:
not use -a, use specific nfs group name
ex:
sharemgr start -P nfs nfs_group
2011年3月29日 星期二
save data using plist
只有以下類別的物件可以利用writeToFile:atomically:存入plist
NSArray
NSMutableArray
NSDictionary
NSMutableDictionary
NSData
NSMutableData
NSString
NSMutableString
NSNumber
NSDate
NSArray
NSMutableArray
NSDictionary
NSMutableDictionary
NSData
NSMutableData
NSString
NSMutableString
NSNumber
NSDate
UITextField: 按下鍵盤上的return後,讓鍵盤消失
關鍵: UIControlEventEditingDidEndOnExit和resignFirstResponder
ex:
Enter鍵按下時觸發的method
建立TextField
ex:
Enter鍵按下時觸發的method
-(void)textFieldDone:(UITextField*)textField
{
[textField resignFirstResponder];
}
建立TextField
textField = [[UITextField alloc] initWithFrame:
CGRectMake(5, 5,
image.size.width,
image.size.height)];
[imageView addSubview:textField];
[textField addTarget:self
action:@selector(textFieldDone:)
forControlEvents:UIControlEventEditingDidEndOnExit];
[textField release];
訂閱:
意見 (Atom)
