我与我的标签有关:
@property (weak) IBOutlet NSTextField *scoreBox;
Run Code Online (Sandbox Code Playgroud)
正确的,我正试图像这样访问它:
void namedfunction(button) {
if (button == button) {
score = score + 100;
[scoreBox setIntValue:score];
// ^ error
}
}
Run Code Online (Sandbox Code Playgroud)
我收到这个错误:
AppDelegate.m:52:10:使用未声明的标识符'scoreBox'
我究竟做错了什么?
我正在尝试转换Vec<&str>为Vec<u16>但我无法找到一种功能性的方法来实现它.
let foo: &str = "1,2,3"; // Parsing a string here
let bar: Vec<&str> = foo.split(",").collect(); // Bar is a nice vector of &str's
Run Code Online (Sandbox Code Playgroud)
我需要bar进入一个Vec<u16>.