dashcode Web 应用程序中的滑块?
我正在尝试在 Dashcode 中制作一个使用范围滑块的网络应用程序。 我看到代码库有“获取范围滑块值”和“设置范围滑块值”的代码,但没有范围滑块部分。 那么如何制作范围滑块呢? 我对 JavaScript 很陌生。
I am trying to make a web app in Dashcode that uses a range slider. I see that the code library has code for "get range slider value" and "set range slider value," but there is no range slider part. So how do I make a range slider? I'm very new to Javascript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这不是 Dashcode 3.0 下的选项。 Dashcode 现在对 Safari 和 Mobile Safari 提供双目标支持,这可能很酷,具体取决于您的观点。 在此双重模式中,您需要为每个目标创建单独的 UI 并创建单独的数据绑定。 现在,Safari 库有滑块,但 Mobile Safari 库没有。 您可能会感到沾沾自喜,就像我最初一样,然后简单地复制并复制它。 将滑块从 Safari 端粘贴到 Mobile Safari 端,您会发现它似乎可以工作(您将看到滑块、属性等)。 但是,部署后您只会看到一个输入文本框而不是滑块。
经过一番挖掘,事情是这样的:生成的代码看起来像这样
这是 HTML5 的东西,桌面 Safari 只知道如何渲染它,但 Mobile Safari 不渲染。 所以你运气不好。
替代方案:坦率地说,我还没有找到一个可以在 iPhone 上运行良好的 javascript/html 滑块。 我不知道有什么好的一对一替代方案。 我计划重新评估我的需求并实现一些其他输入机制,例如一排按钮。
Outlook:我想它最终会得到本地支持,所以经常回来查看。
This is not an option under Dashcode 3.0. Dashcode now has dual target support for Safari and Mobile Safari, which could be cool, depending upon your perspective. In this dual mode you need to create a separate UI for each target and separate data bindings. Now, the Safari library has a slider, but the Mobile Safari library does not. You might feel smug, like I originally did, and simply copy & paste the slider from the Safari side over to the Mobile Safari side and notice that it SEEMS to work (you'll see a slider, attributes, etc). However, once deployed you'll only see a input text box instead of a slider.
After some digging, here is what is going on: The code generated looks something like this
<input type=range min=0 max=100>
The is an HTML5 thing and desktop Safari just knows how to render it, but Mobile Safari does not. So you are out of luck.Alternatives: Frankly, I have not found a workable javascript/html slider that works acceptably well on the iPhone. I don't know of any good 1-to-1 alternatives. I'm planning on re-assessing my needs and implementing some other input mechanism, like, maybe, a row of buttons.
Outlook: I would imagine that it would be eventually be supported natively, so check back often.
单击“零件”后,我能够在库中的“按钮”下找到“滑块”。 或者从头开始:
[请注意,这些步骤是使用 Snow Leopard 附带的新 DashCode 3.0 完成的。]
如果您没有看到滑块,您能否更新您的问题,准确说明您正在查看的位置以及您看到的部件? 也许我们可以从那里引导您。
更新查看 Apple 的这篇文章:
使用 Apple Slider 来自 < a href="http://developer.apple.com/mac/library/documentation/AppleApplications/Conceptual/Dashboard_ProgTopics" rel="nofollow noreferrer">仪表板编程主题
I was able to find the "Slider" under "Buttons" in the Library after clicking on "Parts". Or from the beginning:
[Note those steps were done using the new DashCode 3.0 that came with Snow Leopard.]
If you don't see the slider there, could you update your question with exactly where you're looking and what Parts you do see? Perhaps we can guide you from there.
update Check out this article from Apple:
Using an Apple Slider from Dashboard Programming Topics