Xcode 4.5.2给了我以下警告:
Unsupported Configuration
Scene is unreachable due to lack of entry points and does not have an identifier
for runtime access via -instantiateViewControllerWithIdentifier:.
Run Code Online (Sandbox Code Playgroud)
不幸的是,我无法确定有罪的场景.在"问题导航器"中选择警告不会突出显示故事板中的任何内容.我有一个相当复杂的故事板(30多个场景).
有什么建议?

我对Xcode 4.5中的错误看起来很困惑.我无法在Interface Builder中设置新创建的UIViewController的根视图的autoresizingMask属性.以下是重现问题的步骤:
如果我删除现有视图并从对象库中拖动新视图,则新视图启用了autosizingMask(并且无法禁用).
这在我正在进行的两个项目上发生过两次,但在新创建的项目中却不会发生.我错过了什么吗?什么可以触发这种行为?
这是测试故事板的XML.第一个ViewController,storyboardIdentifier="springsWorking"我编辑的是删除原始视图,第二个storyboardIdentifier="default"是默认视图.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C60" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="KEy-1l-Qqy">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="dwh-DZ-gCp">
<objects>
<viewController storyboardIdentifier="springsWorking" id="KEy-1l-Qqy" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="ngZ-jh-RR4">
<rect key="frame" x="0.0" y="20" width="768" height="1004"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="jow-h4-M4B" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-428" y="-327"/>
</scene>
<!--View Controller-->
<scene sceneID="445-Ak-YxL"> …Run Code Online (Sandbox Code Playgroud) 我正在开发一个应用程序,它本质上是许多不同测试的序列(为简单起见,考虑SAT测试或Mensa测试).每个测试都在不同的View + View Controller中实现.
最初我想使用Storyboards和UINavigationControllers来管理测试的顺序和它们之间的转换,但现在我质疑这种方法的有效性.UINavigationController是一个堆栈,而我的导航只是单向的(一旦你完成了一个你不能回去的测试).有没有更好的方法来实现应用程序?我还能以某种方式利用故事板吗?
Fortran新手在这里,我被要求使用Salford/Silverfrost编译器(最初的开发人员去世)使用Fortran 77编写的旧Fortran代码库.
原始开发人员COMMON广泛使用命名块(模拟全局变量,AFAIU),并且他EQUIVALENCE在需要时使用(重新)初始化块,如下面的代码片段:
IMPLICIT REAL*8 (A-H,O-Z)
COMMON/COMMF2D/
* ASCN(0:99,0:20,0:4)
*,FEMPTY2(8700)
DIMENSION KLCKF2D(38400)
EQUIVALENCE (KLCKF2D,ASCN)
DO I= 1,38400
KLCKF2D(I)= 0
END DO
Run Code Online (Sandbox Code Playgroud)
这是一个可接受的编程实践还是只是一个黑客?此外,由于我正在尝试将代码移植到GFortran,它是否可移植?(我知道声明就像REAL*8只是提示编译器而不保证)
我一直认为向nil指针发送消息通常会返回0.因此同样适用于属性.但是这段代码片段似乎与我的假设相矛盾
NSArray *testArray;
NSInteger i = 0;
NSLog(@"testArray.count-1=%ld", testArray.count-1);
NSLog(@"i<testArray.count-1=%d", i<testArray.count-1);
Run Code Online (Sandbox Code Playgroud)
输出是
2013-05-22 11:10:24.009 LoopTest[45413:303] testArray.count-1=-1
2013-05-22 11:10:24.009 LoopTest[45413:303] i<testArray.count-1=1
Run Code Online (Sandbox Code Playgroud)
虽然第一行是有道理的,但第二行却没有.我错过了什么?
编辑:感谢@JoachimIsaksson和@Monolo指出(双关语)我正确的方向.问题实际上是签名v.无符号,以下代码显示:
NSArray *testArray;
NSInteger i = 0;
unsigned ucount = 0;
int count = 0;
NSLog(@"testArray.count-1=%ld", testArray.count-1);
NSLog(@"i<testArray.count-1=%d", i<testArray.count-1);
NSLog(@"i<ucount-1=%d", i<ucount-1);
NSLog(@"i<count-1=%d", i<count-1);
Run Code Online (Sandbox Code Playgroud)
输出是
2013-05-22 11:26:14.443 LoopTest[45496:303] testArray.count-1=-1
2013-05-22 11:26:14.444 LoopTest[45496:303] i<testArray.count-1=1
2013-05-22 11:26:14.444 LoopTest[45496:303] i<ucount-1=1
2013-05-22 11:26:14.445 LoopTest[45496:303] i<count-1=0
Run Code Online (Sandbox Code Playgroud) 我正在使用 PySide2 和 scikit-learn 开发一个应用程序。如果我使用单线程,应用程序可以正常工作,但如果我将 sckikit-learn 计算移至工作 QThread(以在处理过程中保持 UI 响应),我会在 Mac OS Catalina 上遇到随机分段错误。同一个程序似乎在 Windows 上运行良好(在 Mac 上,我每次运行该程序时都会遇到分段错误;我在 Windows 上运行该程序至少二十次,但从未崩溃)。我试图遵循此答案中的建议,但我无法在 Catalina 上gdb正常lldb工作。
这就是我得到的lldb:
% lldb python
(lldb) target create "python"
Current executable set to 'python' (x86_64).
(lldb) run test.py
error: process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries when the attached failed. The subsystem that denied the …Run Code Online (Sandbox Code Playgroud) ios ×3
fortran ×1
gdb ×1
lldb ×1
null ×1
objective-c ×1
pointers ×1
properties ×1
python ×1
storyboard ×1
uistoryboard ×1
uiview ×1
warnings ×1
xcode ×1