問題タブ [nscontrol]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
xcode - NSTextfield.sendAction が関数を呼び出さない
ユーザーが NSTextField に何かを入力したときに、Swift Cocoa アプリケーションで関数を呼び出そうとしています。NSTextField は実行時に生成されます。これが私の試みです:
関数が呼び出されない理由を誰かが知っていますか?
macos - NSCell サブクラス化: NSProgressIndicator を描画しますか?
セルベースの NSTableView を使用しています。カスタムNSCell
サブクラスを作成して NSProgressIndicator を描画する方法はありますか?
次のようなもの:
それNSProgressIndicator
自体はステータス表示としてのみ機能し、ユーザーとの対話はありません(マウスのクリックなどは必要ありません)。
私は NSTableViewDataSource を使用しているので、セルベースの NSTableView に固執したいと思います。NSLevelIndicatorCell
代替手段ですが、私はの外観/デザインを好みますNSProgressIndicator
objective-c - カスタム NS コントロール
xib ファイルを作成して独自の NSControl を作成し、それを .h および .m ファイルに関連付けようとしています
私のコントロールは NSControl のサブクラスであり、NSStepper と NSTextfield が含まれています。NSControl スーパークラスを使用する理由は、後で IB からコントロールをアクション可能にしたいからです。
コントロールで doubleValue などのスーパークラス (NSControl) 値を使用したいのですが、値を設定すると常に 0 になり、そのセルが nil であることが原因だと思います。
私のコントロールには NSTextFieldCell と NSStepperCell の 2 つのセルがありますが、NSControl には 1 つのセルを配置するオプションしかありません。
この問題を解決するにはどうすればよいですか?
何か不足していますか?
ありがとう
xcode - Controls on NSPopover not responding
The setup is as follows:
- Menubar application with one view controller. The view from the view controller is stored in a NSMenuItem
- That view controller has one button we'll call 'Settings button'
- When you click Settings button a NSPopover is opened.
- The NSPopover has it's content set to SettingsViewController
- The SettingsViewController has one button.
The button in SettingsViewController does not animate when clicked. It does not respond to any user action. I don't mean that the 'action' is fired, I mean there is not physical response. It's as if the button is disabled even though I have not disabled it.
AppDelegate.swift:
SettingsViewController.swift:
DirektMainViewController.swift: