开发者

How to control a NSView, located in a dedicated NSWindow, from the main NSWindow designed to support the GUI built under COCOA?

开发者 https://www.devze.com 2022-12-17 19:11 出处:网络
This is probably a simple problem for the high skilled Cocoa 开发者_运维知识库programmers, but I can\'t find how to control the graph in a separate window. I read carefully the Cocoa related books, go

This is probably a simple problem for the high skilled Cocoa 开发者_运维知识库programmers, but I can't find how to control the graph in a separate window. I read carefully the Cocoa related books, go through many web notes,but I can't find a solution to my problem. The purpose is to use a dedicated window to draw the I=F(Vg) curves extracted by the GUI from a specific hardware. All the GUI and the hardware works fine ( thanks to the help provided by several members of stackoverflow) , but no way to send the parameters to the NSView to display the results. So far, the GUI class is based on a NSObject, the graphic class is NSView. Any idea, examples, links will be appreciated. Thank you so much. Michael


So you have a controller class that receives data and owns a window? Just give it an outlet to the view.

This is the job of the controller in MVC: To pass data from the model (in this case, the hardware connection) to the views.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号