I solved the problem, in reshape I changed glOrtho() to glfrustum(). I'm happy.
Post
Replies
Boosts
Views
Activity
I replaced the NSArrayController from the object library and renamed the @property(strong)IBOutlet NSArrayController * vrArrayController;
Now runs awakeFromNib only one time and the controller is nil.
No Reply is a Reply too. ☹️
Hi Claude,
it is Swift code,
this project shall be the twin of my objective-c what must close because of deprecation of OpenGL.
The first what I want is getting access to managedObjects, I send you the AppDelegate :
import Cocoa
import CoreData
@main
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var arrayController: NSArrayController!
@IBOutlet weak var tableView: NSTableView!
@objc var currentManagedObject: [NSManagedObject]; // error:
func myPrint() {
if(arrayController != nil){
print(arrayController!)
}else {
print("arrayController is NIL")
}
if(tableView != nil){
print(tableView!)
}else {
print("tableView is NIL")
}
}
var center = [NotificationCenter.default]
[center.addObserver: self,
selector:#selector(rowSelectionDidChange(_:)),
name:Notification.Name( selectionDidChangeNotification), object:nil]
// error: Expected declaration
@objc func rowSelectionDidChange(_ notification: Notification){
if(arrayController != nil){
var selected:[] as Any
var arranged:[] as Any
// error :
/*
Consecutive statements on a line must be separated by ';'
Insert ';'
Expected element type
Insert ' <#type#>'
Expected expression
*/
selected: NSArray = [arrayController.selectedObjects];
arranged = [arrayController.arrangedObjects];
if((selected.count) >= 0){
// ...
}
}
}
func applicationDidFinishLaunching(_ aNotification: Notification) {}
func applicationWillTerminate(_ aNotification: Notification) {}
func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { return true}
}
I hope it helps you to help me
I corrected the notification and got error :
[center.addObserver: self,
selector:#selector(rowSelectionDidChange(_:)),
name:Notification.Name( selectionDidChangeNotification), object:nil]
// error: Expected declaration
rowSelectionDidChange(_:) do not belong to tableView, it is the function I want to use
if(arrayController != nil){
var selected:[] as Any
var arranged:[] as Any
/*
error :
Consecutive statements on a line must be separated by ';'
Insert ';'
Expected element type
Insert ' <#type#>'
Expected expression
*/
selected: NSArray = [arrayController.selectedObjects];
arranged = [arrayController.arrangedObjects];
}
}
`
p.s. please give me a link of your communication rules .
No framework, the projects I mentioned arose on Xcode 4.2, maybe a difference .
Edit:
selector: #selector: ( NSTableView.rowSelectionDidChange(_:)),
name:"NSTableViewSelectionDidChangeNotification",
object: nil)
My fault,
the Reason is : Xcode 4 has the default "Automatically Run" and 14 has "Manually Run".
Thank you for your reply.
Sorry, my mistake,
I deleted the class, closed Xcode and began new, I got no error.
Maybe the reason is that I use Sierra.
In the near future I buy a new iMac, then I need your support again.
Edit: The two lines list is fine too.
Hi, I solved the problem with trial and error.
The octahedron in the top sight gave me limits and I changed [0,0,-10] to [-0.25,-0.25,-10];
@OOPer
I changed the project format to 9.3 and the Error disappeared. I changed back to 12.4 : No error.
I know almost nothing about Metal and I hope the community help me when i stuck in the future.
Uwe
Sorry, wrong button pressed.
Yesterday I found in Application Support/CallHistoryDB:
Multiline
CallHistory.storedata
CallHistory.storedata-shm
CallHistory.storedata-wal
BlockQuote
I moved the folder to an external device and killed the original.
I setup a new project StoreData, killed the StoreData.xcdatamodeld and replaced it with the model of my project.
This works, but before a must Sandbox uncheck.
Yesterday I found in Application Support tree documents :
Multiline
CallHistory.storedata
CallHistory.storedata-shm
CallHistory.storedata-wal
BlockQuote
I moved the docs to an external device and killed the originals, today they were at place again.
I would setup a test app, but how do I make ad hoc a failure, so that CD trashes to have a reason to trash the store ?