问题标签 [nsprogressindicator]

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.

0 投票
1 回答
344 浏览

objective-c - 如何解决?'NSProgressIndicator'之前的预期说明符限定符列表

嗨,我该如何解决这是我的 *.h 文件:我可以包含一些想法吗?我发现我必须,#import <AppKit/AppKit.h>但我什至没有找到 AppKit 框架

谢谢

0 投票
2 回答
1093 浏览

cocoa - 在 NSStatusItem 中显示 NSProgressIndicatorSpinningStyle 然后隐藏它

我正在研究 NSStatusItem。我已经设法使用 setImage 和 setAlternateImage 来工作。当用户选择某物时,它需要一段时间才能完成它正在做的任何事情。当它在做某事时,我尝试从通常的 Image 更改为 spinner。我现在这样做的方式是创建一个视图,将 NSProgressIndicator 设置为它,然后使用

在我尝试删除它并显示原始图像之前,它似乎有效。我可以隐藏它的唯一方法是

但这破坏了一切,原始图像不会回来。我猜是因为没有更多的视野。在设置 viewWithSpinner 之前,我似乎无法保存原始视图。

有人可以告诉我实现这一目标的方法吗?

所以...

0 投票
2 回答
926 浏览

objective-c - NSProgressBar startAnimation called FROM a ManiMenu action

First question in StackOverflow and also Cocoa newbye and in addition I am using XCode 4 (so be kind please!)

Scenario:

A simple NSPersistentDocument Multi-windows: each document have a window.nib and an attached WindowController The application RUN a NSTask (in background) when I press a button in the WINDOW TOOLBAR.

In the window (inside a View) I decided to put a nice NSProgressIndicator (indeterminate) that animate when task start and stopAnimation when task end (I collect task messages trough Notifications).

Sample Code:

NSButton --> IBAction --> method in the WindowController

Everything works nice and perfectly.

Now (as usual in this scenarios) you get a strange bug and you start to become unproductive:

I decide to run the same Action also from the MainMenu (from an NSMenuItem):

In the MainMenu.xib:

NSMenuItem ("RUN") --> FirstResponder --> User Defined Action in First responder:launchSim (type id)

The RUN menu item run correctly the Task (I have NSLog DEBUG messages) BUT the animation (startAnimation) of the progressBar don't start!

THe DIFFERENCE in the 2 Actions:

  • the first one (working) is called from the Nib file owned by the WindowController
  • the second one (not working) is called from the MainMenu.xib and sent to FirstResponder

Both the actions execute correctly the other part of code in the method, but if I call the action from the menu I can't see any animation of the progress indicator.

What I missing?

Thanks and Best Regards

0 投票
1 回答
683 浏览

cocoa - 将 NSProgressIndicators 添加到 NSOutlineView 子类

我正在使用经过大量修改的出色PXSourceList控件来模拟其他流行的 OS X 源列表。不幸的是,我在尝试将 NSProgressIndicator 添加到所述源列表中的行时遇到了一些问题。

PXSourceList 充当标准 NSOutlineView 控件的子类,并与示例 SourceListItem 类(骨架 NSObject 子类)一起打包。PXSourceList 及其 SourceListItem 的渲染是在 PXSourceList 的drawRow:clipRect:方法中处理的,这是我的问题的根源。

我试图找到允许每个 SourceListItem 有选择地显示 NSProgressIndicator 的最佳方式。本能告诉我我应该创建一个自定义单元格,但我不确定我应该如何以最佳方式实施一个体面的解决方案。

任何和所有的帮助将不胜感激。

0 投票
1 回答
1599 浏览

objective-c - NSProgressIndicator For 循环的进度?

我的应用程序用一堆 For 循环做了很多工作。它计算了大量的字符串,并且可能需要整整一分钟才能完成。

所以我在我的应用程序中放置了一个 NSProgressIndicator。

在循环中,我使用了 NSProgressIndicator 的“incrementBy”函数。但是,我没有看到实际的酒吧填满。

我怀疑这是因为循环占用了所有可能的能量,因此 NSProgressIndicator 没有更新(以图形方式)。

那我怎么让它进步呢?

0 投票
1 回答
697 浏览

xcode - 如何使用 NSProgressIndicator 作为 NSToolbarItem

如何将 NSProgressIndicator(NSProgressIndicatorSpinningStyle) 作为 NSToolbarItem 添加到工具栏?

0 投票
2 回答
1796 浏览

objective-c - 如何检查 NSProgressIndicator 当前是否为动画?

NSProgressIndicator具有称为startAnimation:and的方法stopAnimation:,但我找不到检查状态的方法(当前是否处于动画状态)。你会怎么做?

0 投票
1 回答
1367 浏览

colors - NSProgressIndicator 的 setControlTint 没有效果

我有一个非常简单的任务:当用户暂停进度时,将 NSProgressIndicator 的颜色更改为石墨,这是一个确定的进度条。我找到了setControlTint方法,但是使用它之后就没有效果了。我也搜索了很多没有太多明确的答案。子类 NSProgressIndicator 和做一些自定义绘图是必须的吗?我只是想知道为什么这种方法存在并且没有关于正确使用的进一步文档或讨论。

非常感谢您的帮助:)

0 投票
2 回答
1432 浏览

objective-c - Cocoa:在 Lion 上继承 NSProgressIndicator

我有一个让我发疯的问题。我想NSProgressIndicator以其“条形”形式进行子类化,以根据几个逻辑状态更改进度条的颜色。为此,我基本上-drawRect:像往常一样覆盖。然而,狮子身上发生了一件非常奇怪的事情。即使我-drawRect只是通过调用超类的实现[super drawRect:]并且根本不做任何其他事情,整个进度条也将使用Lion之前使用的样式显示。如果您还记得的话,使用 Lion 时,进度条样式已从之前的玻璃样式变为更平坦、更时尚的外观。

再一次,只是重写-drawRect调用超类的实现将进度条的样式更改为 Leopard 的样式。有没有人知道发生了什么以及我该如何解决这个问题?

0 投票
0 回答
360 浏览

objective-c - 为 Mac 定制的旋转进度指示器

我想在 Webview 上实现一个自定义的旋转进度指示器,我见过小而常规的指示器,但我需要实现我自己的自定义指示器,比如指示器的大小会很大。

我需要隐藏并使其在不同的场景中可见,这应该在 webview 上旋转。