unexpected nil window in _UIApplicationHandleEventFromQueueEvent, _windowServerHitTestWindow: <UIWindow: 0x7b8d6a60; frame = (0 0; 0 0); gestureRecognizers = <NSArray: 0x7b8d6780>; layer = <UIWindowLayer: 0x7b8d6a20>> 出现这个错误是因为没有设置窗口的fra…
一.window创建方法不同,导致window的显示不同 1.window创建,但是不会显示 UIWindow *myWindow3 = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; myWindow3.backgroundColor = [UIColor greenColor]; myWindow3.windowLevel = ; myWindow3.hidden = NO; [myWindow3 makeKeyW…
这是本系列的第三篇文章,前两篇我们讲了qt的安装和编译,今天我们讲一讲程序的打包. 好像我们现在都没怎么讲到qt的使用,因为想要放开手脚写代码,一些基础是要打牢的. 不过请放心,下一篇文章开始我们就会真正进入正题了. 这是针对使用qtdeploy时的打包教程,不适用于使用qt-tools + go build进行构建的情况. 打包 首先我们做一些打包前的准备工作,没错,做事之前先做好准备是个好习惯:-p. 这次用于打包的仍然是一个小例子,将一张图片缩小一半显示出来,这个例子正好需要使用外部资源,…
直接上文件 nginx.conf #运行用户和组,缺省为nobody,若改为别的用户和组,则需要先创建用户和组 #user wls81 wls; #开启进程数,一般与CPU核数等同 worker_processes  4; #设置进程到cpu(四cpu:0001 0010 0100 1000) #worker_cpu_affinity 0001 0010 0100 1000; #每个进程最大打开文件数 worker_rlimit_nofile 8000; #进程号保存文件 #pid       …
首先来看一下UIWindow 继承关系 方法和属性 NS_CLASS_AVAILABLE_IOS(2_0) @interface UIWindow : UIView //window的屏幕,默认是 [UIScreen mainScreen] ,不能更改,否则没有界面 @property(nonatomic,strong) UIScreen *screen NS_AVAILABLE_IOS(3_2); //window的视图层级,默认是0.0 @property(nonatomic) UIWind…
http://www.cnblogs.com/railgunman/archive/2010/12/10/1902524.html#2868236 说到VCL中的消息处理就不能不提到TApplication,Windows会为每一个当前运行的程序建立一个消息队列,用来完成用户与程序的交互,正是通过Application完成了对Windows消息的集中处理! 首先通过Application.Run进入消息循环进行消息的处理,其中调用了HandleMessage. procedure TApplic…
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; CEDET Configuration ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;load cedet (add-to-list 'load-path "/opt/emacs-ide/cedet-1.1/common") (add-to-list 'lo…
创建版本新特性 页面(存放图片) HMNewfeatureViewController.m #define HMNewfeatureImageCount 4 #import "HMNewfeatureViewController.h" #import "HMTabBarViewController.h" @interface HMNewfeatureViewController ()<UIScrollViewDelegate> @property(non…
深入浅出 Cocoa 之 Core Data(4)- 使用绑定 罗朝辉(http://blog.csdn.net/kesalin) CC 许可,转载请注明出处 前面讲解了 Core Data 的框架,并完全手动编写代码演示了 Core Data 的运作过程.下面我们来演示如何结合 XCode 强大的可视化编辑以及 Cocoa 键值编码,绑定机制来使用 Core Data.有了上面提到的哪些利器,在这个示例中,我们无需编写 NSManagedObjectModel 代码,也无需编写 NSManag…
UISplitViewController是iPad特有的系统方法,主要效果就是呈现iPad的经典切割界面 代码创建实例: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { MyFirstViewController* firstVC = [[MyFirstViewController alloc] initWithNibNa…
https://www.cnblogs.com/yeungchie/ 使用 deRegUserTriggers 可以用来配置:当打开一个新窗口时,自动集成自定义的菜单.工具栏等等. 使用格式如下: deRegUserTriggers( t_viewType [ s_appTrigger [ s_menuTrigger [ s_postInstallTrigger ] ] ] ) => t / nil ViewType 首先,viewType 在不同版本的 Virtuoso 可能存在差异,比如 m…
//窗体Showmedol 遇到的奇怪异常: cannot make a visible window model //背景:ShowModal A窗体,A窗体再ShowModal B窗体:A是透明背景窗体,B是提示窗体: //第一次使用该全局变量,使用完毕后,FreeAndNil,目的是不影响第二次使用(和重新初始化属性) if not Assigned(frmAd) then frmAd := TfrmAd.Create(nil); frmAd.SetUrl(r46002.Data.URL)…
在 IOS 开发当中经常碰到 whose view is not in the window hierarchy 的错误,该错误简单的说,是由于 "ViewController" 还没有被加载,就调用该 ViewController 或者 ViewController 内的方法时,就会报这个错误.   在不同地方调用 ViewController,解决的方法也不太一样.     1. 在 一个 ViewController 里面调用另外一个 ViewController 是出现这个错误…
Linux中syntax error near unexpected token ... 错误提示有一般有两种原因: 1)window和Linux下换行符不一致导致 window下的换行和Linux下的换行不同,如果将window下编写的代码文件上传到Linux下,容易出现该错误提示.可用 vi -b 文件名 或者cat -v 文件名命令查看,如果是游云换行符引起的,则每行后面有^M,这时只要将每个^M去掉即可. 2)Linux指令之间没有空格隔开…
近来笔者在一个项目中需要实现一个功能:模仿弹出菜单的隐藏方式,即鼠标在窗口的非PanelA区域点击时,使得PanelA隐藏.   经过思考,笔者想到通过处理鼠标的点击事件来实现相应功能.但是,究竟由谁来处理这个点击事件呢?如果窗口中包含多个句柄控件,则不能确定谁能获取到这个鼠标的点击事件,故而无法做出处理.   通过热心网友的帮忙,笔者了解到了window消息截获的实现方式,更棒的是:消息截获并不影响消息的正常处理.最终实现的效果非常完美.在此分享给有需要的朋友.下面是消息截获的实现代码.1.对…
application:didFinishLaunchingWithOptions该函数是应用程序启动之后首次加载页面的函数,删除storyboard之后,需要在这里new出新的window,初始化,并将其置为当前状态下的key window并展示之. 第一步:删除storyboard,建立一个xib文件. 第二步:如下图所示,点击对应的xib文件->File's Owner->show the identify inspector(绿圈圈出的位置) 将Custom Class的class名称…
Thread message loop for a thread with a hidden window? I have a Delphi 6 application that has a thread dedicated to communicating with a foreign application that uses SendMessage() and WM_COPYDATA messages to interface with external programs. Therefo…
在windows下用记事本编写linux shell脚本后,执行遇到syntax error near unexpected token错误 问题原理:网上找了好久,找到原因,原来是回行的问题,每个系统的回行符是不一样的. window系统的记事本回车是CR和LFlinux系统的记事本回车是LFmac系统的记事本回车是CR 在windows下编写程序linux执行它不认识CR是什么东西.所以会出现syntax error near unexpected token错误.在linux环境下可以通过…
转自unity圣典: http://game.ceeger.com/Manual/ProfilerWindow.html http://game.ceeger.com/Manual/Profiler.html 分析器窗口 Profiler window Date:2013-07-01 13:44   Attaching to Unity players 附加到Unity播放器 To profile your game running on an other device or a player…
转自:http://qbaok.blog.163.com/blog/static/10129265201112302014782/ 对于监控指定目录内文件变更,window 系统提供了两个未公开API:SHChangeNotifyRegister  SHChangeNotifyDeregister 分别用于注册Notify以及监视. 同时,还提供了ReadDirectoryChangesW  函数(貌似NT以上可用). 在 .net framework 中,另提供了封装好的 FileSystem…
转自linfengwenyou 在运行过程中更改根控制器的方法:(假设:A为当前根控制器,B为要设的根控制器) 方法一: 1. appdelegate.m中 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; A *vc = [[A alloc] init]; // init会执行viewDidLoad viewWillAppear vc.view.backgroundColor = [UICo…
问题现象:想在页面初始化的时候,使用self.presentViewController方法弹出个告警提示框UIAlertController.但行后报了个如下告警,同时告警框也出不来. 1 2015-03-10 09:55:34.197 Test[1140:29622] Warning: Attempt to present <UIAlertController: 0x7c95ca20> on <Test.ViewController: 0x7a6afc60> whose vie…
window/mac系统关机 #ifdef Q_OS_WIN #include "windows.h" #endif void OnShutDown() { #ifdef Q_OS_WIN HANDLE hToken; TOKEN_PRIVILEGES tkp; //get process flags if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken…
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 一个简单的单窗口App在运行时出现错误: 2016-04-07 14:28:48.411 BlurViewAndPopView[4364:168520] Warning: Attempt to present <UIAlertController: 0x7a0a4e00> on <BlurViewAndPopView.ViewController: 0…
昨天写豆瓣发广播Demo的时候,为了写Demo的简单,就使用了Storyboard,结果执行视图跳转时遇到了这个问题: Warning: Attempt to present <UINavigationController: 0x8d514e0> on <OAuthViewController: 0xa044a60> whose view is not in the window hierarchy! 其功能是OAuthViewController用于用户授权,在获取用户的授权后将…
keyWindow与delegate中Window的区别 源码: // // ViewController.m // UIWindowRelated // // Created by YouXianMing on 14/10/25. // Copyright (c) 2014年 YouXianMing. All rights reserved. // #import "ViewController.h" @interface ViewController () @end @implem…
将window上编辑的xxy1.sh脚本上传到linux上,并执行的时候提示 xxy1.sh: line 17: syntax error: unexpected end of file 但是通过cat xxy1.sh查看脚本的时候,未发现语法异常,找了度娘后知道   原来是window和linux的文件格式不同导致,解决办法就是 (1)vi xxy1.sh (2)按下键盘Esc键,按下键盘“:”冒号键 (3)输入:set fileformat=unix,后回车 (4)重复步骤2,输入:wq,后…
2014-06-19 BaoXinjian 1. Issue 调用如下Shell脚本时出现错误syntax error near unexpected token `fi'…
http://delphi.about.com/cs/adptips2004/a/bltip0504_4.htm When using ShellExecute (as explained in the above article) to open a web site or a htm file with the default web browser you *don't* have the option to specify that you want to start a new ins…
判断两个控件在同一个Window上是否有重叠 //对UIView写分类 - (BOOL)intersectWithView:(UIView *)view; - (BOOL)intersectWithView:(UIView *)view { UIWindow *window = [UIApplication sharedApplication].keyWindow; CGRect selfRect = [self convertRect:self.bounds toView:window]; C…