草庐IT

Selector

全部标签

node.js - 蒙哥错误: selector must be a valid JavaScript object

我正在为nodejs使用mongodb驱动程序。我在更新记录时遇到错误。{"name":"MongoError","message":"selectormustbeavalidJavaScriptobject","driver":true}这是我的脚本:MongoClient.connect(url,function(err,db){if(err){console.log('UnabletoconnecttothemongoDBserver.Error:',err);return;}varcollName="bank";varSelectParas={"name":"ABC"};var

Error: L6406E: No space in execution regions with .ANY selector matching xxx.o(.xxx).

keil5下载时出现错误前言一、错误分析二、解决方法三、其它报错原因前言我在使用STM32F4的FreeRTOS做项目实验过程中遇到报错:提示内存大小不足以存储当前代码,简单的说就是:芯片的存储空间不够一、错误分析linking……\OBJ\LED.axf:Error:L6406E:Nospaceinexecutionregionswith.ANYselectormatchingheap_4.o(.bss).…\OBJ\LED.axf:Error:L6406E:Nospaceinexecutionregionswith.ANYselectormatchingspi.o(.bss).…\OBJ\

Android Studio实现简易计算器(带横竖屏,深色浅色模式,更该按钮颜色,selector,style的使用)

目录前言运行结果:运行截屏(p50e) apk文件源码文件 项目结构总览MainActivity.javadrawable更改图标的方法:blackbutton.xmlbluebuttons.xmlgreybutton.xmlorangebuttons.xmlwhitebutton.xmllayout布局文件 竖屏:横屏:values    colors.xmlstrings.xmlstyles浅色模式深色模式themes.xml前言        本文章以及之后文章的程序版本使用AndroidStudio2022.3.1Patch1版本编辑,使用语言为java,最低支持API27Androi

ios - [GMSCachedTile setVersionID :]: unrecognized selector

我在我的一个iPhone应用程序中集成了谷歌地图SDK2.7.0。我做了所有相关的配置,并添加了所有的框架。当我运行应用程序时,它会崩溃并出现错误-“[GMSCachedTilesetVersionID:]:unrecognizedselector”。我在互联网上搜索但没有得到与GMSCachedTile相关的任何答案。 最佳答案 我也有同样的问题。最后,我发现我的项目中有两个GoogleMaps.bundle副本。一个在项目源中,另一个在pod中。所以我删除了其中一个。(我把pod留了一个。)崩溃再也没有发生过。希望这对您有所帮助

ios - ipad怎么知道键盘被隐藏了

我正在构建一个ipad应用程序,它有一些文本字段,当点击时,它们会移动到键盘上方,如果点击“计算”按钮,键盘和View,向下,但是如果用户从ipad上点击隐藏键盘[键盘右下角的键]我的观点仍然高涨,那么,我如何以编程方式知道“隐藏键盘”已被点击?非常感谢! 最佳答案 您应该使用通知中心来跟踪键盘,NSNotificationCenter*center=[NSNotificationCenterdefaultCenter];[centeraddObserver:selfselector:@selector(didShow)name:U

ios - "unrecognized selector sent to instance"在 performSegueWithIdentifier

所以我在我的ViewController中有一个以编程方式添加的按钮。因此,我创建了一个直接从我的根ViewController到下一个的pushsegue。已嵌入导航Controller。这是我设置按钮并添加它的目标;registerButton=[UIButtonbuttonWithType:UIButtonTypeCustom];[registerButtonaddTarget:selfaction:@selector(pushRegisterScreen)forControlEvents:UIControlEventTouchUpInside];这就是pushRegisterS

ios - 发送 NSNotification 时无法识别的选择器

我正在尝试在iOS应用程序中实现可折叠的表格View。为此,我在部分标题中设置了一个手势识别器,它将向父Controller触发NSNotification,然后刷新显示展开View的View。一切正常,直到父Controller收到它的消息,这将导致发生以下错误:'+[MasterViewControllerreceiveTestNotification:]:unrecognizedselectorsenttoclass0xa92a8'我浏览了这个网站并发现了一些与此错误相关的帖子,但据我所知我没有犯这些错误。我的注册发生在Controller的初始化过程中,看起来像这样:[[NSN

ios - 使用 NSString 为标签设置颜色

我想创建一个方法并使用字符串值“redColor”来设置标签的UIColor。tableColorName是NSString“redColor”,我尝试应用选择器来创建UIColor并将其应用于我的textLabel。谢谢-(void)changeLabelColor{SELlabelColor=NSSelectorFromString([NSStringstringWithFormat:[@"%@",tableColorName]]);UIColor*color=[[UIColorclass]performSelector:labelColor];self.textLabel.tex

iphone - 如何将 3 个参数传递给@selector

我在中创建了一个Action-(void)ccTouchEnded:(UITouch*)touchwithEvent:(UIEvent*)event就像这样:self.moveAction=[CCSequenceactions:[CCMoveToactionWithDuration:moveDurationposition:touchLocation],[CCCallFuncactionWithTarget:selfselector:@selector(guyMoveEnded)],nil];但是现在,我想通过@selector自动调用以下方法:-(void)guyMoveEnded:

objective-c - NSTimer 在触发时导致 "unrecognized selector"崩溃

我正在使用NSTimer来运行动画(现在只称它为myMethod)。但是,它会导致崩溃。代码如下:@implementationSecondViewController//ImplementviewDidLoadtodoadditionalsetupafterloadingtheview,typicallyfromanib.-(void)myMethod{NSLog(@"MarkTimerFire");}-(void)viewDidLoad{[superviewDidLoad];NSLog(@"We'veloadedscan");[NSTimerscheduledTimerWithTi