Post

Replies

Boosts

Views

Activity

Reply to Failed to load embed dylib in M1?
I used otool -l to get some information on my lib. Does anybody know why the load path will be different within the same project? For Intel: Load command 11           cmd LC_LOAD_DYLIB       cmdsize 56          name @rpath/libavcodec.58.dylib (offset 24)    time stamp 2 Thu Jan  1 08:00:02 1970       current version 58.54.100 compatibility version 58.0.0 For Arm Load command 12           cmd LC_LOAD_DYLIB       cmdsize 64          name /usr/local/lib/libavcodec.58.dylib (offset 24)    time stamp 2 Thu Jan  1 08:00:02 1970       current version 58.54.100 compatibility version 58.0.0
Dec ’21
Reply to Failed to load embed dylib in M1?
For additional reference, I was building the ffmpeg library for Arm. The Intel part I got from my previous owner directly. I just using the same build config got from the original owner to build the Arm build and using lipo to combine these two library into one to be used in my app. I am wondering are there something I am missing when I build the Arm version. Are there any possible hint to find the solution?
Dec ’21
Reply to Mouse move event between two window..
There is a special behavior I forget to mention above, I think my problem caused by the first window was opened by the modal mode. NSApplication.shared.runModal(for: windowController.window!) Why I do this is because I need to make back window temporary disable when window A open. Then when second window, window B may meet following situation: Open by "modal", then the button B in window B receive mouseEntered event, and button A in window A can't. Open by "show", then the button A in window A receive mouseEntered event, and button B in window B can't. If I use windowController.showWindow(self) to open window A, then both button can receive mouseEntered event, but the back window is still working. This isn't what I want. I am not sure what the correct relation I should set to these three window to achieve I purpose: disable back window and window A and window B can receive mouseEntered event correctly. I am sorry for the incomplete information to make you confuse. Eric
Jan ’21
Reply to Mouse move event between two window..
I think the code related to tracking area is not the problem, because I have two buttons, button A is in window A, button B is in window B, the window B is opened by click button A, when I use "show" in segue to open the window B, then button B can't receive mouseEntered event (button A is OK). When I use "modal" to open the window B, then button A can't receive the mouseEntered event (button B is OK). So I may need to find some way that can make mouseEntered been detected in both windows to fix my problem.
Jan ’21
Reply to Mouse move event between two window..
Here is my code, all objects in both windows are derived from same base class with set tracking area , but I think this issue is not related to tracking area because one of the object always worked, mouseEntered was called on working item and another didn't. The mouse move event just captured by one window and didn't dispatch to another window when leaving current window's area. private func setupTrackingArea() {     trackingArea = NSTrackingArea.init(rect: bounds, options: [.mouseEnteredAndExited, .activeAlways, .inVisibleRect], owner: self, userInfo: nil)     addTrackingArea(trackingArea)   } override func mouseEntered(with event: NSEvent) {     isHovered = true   }
Jan ’21