dashcode

Dashcode - how do you combine two values from one datasource

邮差的信 提交于 2020-01-17 03:05:21
问题 In Dashcode, if I have a dataSource that has, for example, 2 fields called 'FirstName' and 'Last Name', how do I concatenate the 2 fields into one text field in a list view? I'm fairly sure it must be to use a value transformer, so say that I assign the 'FirstName' field to the textfield, and add a value transformer... how do I then add the 'LastName' value to the 'value' variable in the transformer. I'm sure it's to do with dashcode.getDataSource and valueForKeyPath and I think I'm close to

Editing the data in a List in a Dashcode app

限于喜欢 提交于 2020-01-06 13:52:54
问题 I’m writing a Dashcode app that contains a list. I’d like to populate this list with my data, but when I define the function function populate_list() { var list = document.getElementById("list"); list.setDataArray(test_data); list.reloadData(); } I get an error; I think the reason is that list in this context is a normal HTML ul element and not an instance of the fancy DC.List class that Apple has defined. How can I access my list in such a way that I can use its methods and access its

Why are some widget elements not showing up when embedded in iBook?

允我心安 提交于 2019-12-21 17:28:12
问题 I created a widget in Dashcode. It has some buttons, text fields and texts. It works fine when run from Dashcode or when installed into the Dashboard. When I install it into an iBook (via iBooks Author) and run it on the iPad then the buttons and texts all disappear (as well as a few other minor visual changes). Interestingly if I tap where some of buttons are, it invokes the button click event, but others don't work. Also, when a button click event updates the value of a text then that text

Is it possible to create new widget instances from within a Dashboard widget?

孤街浪徒 提交于 2019-12-12 10:59:03
问题 This is a followup to this question. It seems to be impossible to to simply keep already configured dashboard widget instances. An alternative way would be to recreate previous instances. Is it possible to create new Dashboard widget instances from within another widget? I couldn't find anything about this topic, yet. 回答1: It is possible, but I don't know how. The Delivery Status widget allows you to open a new copy of itself. You can see the + sign in the screenshot in the help image. 回答2: I

How can I add my library to be loaded Dashcode parts

泪湿孤枕 提交于 2019-12-12 03:07:31
问题 Dashcode loads a bunch of library listed in an array within part.js (function() { var scripts = dashcodePartSupport['core']; scripts = scripts.concat(dashcodePartSupport['scripts']); for(var index in scripts) { var path = scripts[index]; var scriptTag = '<script apple-no-regeneration="yes" type="text/javascript" src="' + path + '"></script>'; document.write( scriptTag ); } })(); I tried to edit that file to append my own lib, but the file is not editable. So how can I do ? 回答1: function

Multiple Dashboard widget instances don't survive widget update. Any way to prevent this?

不羁的心 提交于 2019-12-10 12:11:57
问题 I've written a Mac OS X Dashboard to show the StackOverflow flair of yourself and other people. My problem is that whenever I update that widget to a new version, all previous instances are removed and a single new instance is created on the Dashboard. So if you previously followed the flair of 4 people you'll have to recreate the widgets and enter their user-IDs again. :( Is there any way to keep all running instances while updating a widget? Checking the preferences file, I see that a new

Howto force DashCode webapp to use Safari Mobile layout on iPhone but Safari layout on iPad

[亡魂溺海] 提交于 2019-12-08 07:56:14
问题 A project in DashCode can be configure to support both Safari and Safari Mobile . I like this dual support, but on the iPad, I found that the Safari layout was much more suitable than the Safari Mobile layout. How can I fix the project so that on the iPad the Safari layout will be used? 回答1: Analyzing the code, I discovered that it is possible to force the Safari layout by using the following parameter ?p=desktop. That will make it. 来源: https://stackoverflow.com/questions/4072238/howto-force

First widget works in Dashcode but not when deployed

◇◆丶佛笑我妖孽 提交于 2019-12-08 05:20:57
问题 My widget does not work once deployed even though it shows no errors in Dashcode. Apologies in advance for my inarticulartness with the terminology. I am a newbie. To create the widget, I deleted the default .js file and pasted the JavaScript plus XHTML into the HTML page and created the accompanying CSS file. The only code I can see that is generated is the plist. I tried opening up all the permissions but nothing seems to change. The OSX utilities console shows errors which are on lines

First widget works in Dashcode but not when deployed

假如想象 提交于 2019-12-07 01:19:32
My widget does not work once deployed even though it shows no errors in Dashcode. Apologies in advance for my inarticulartness with the terminology. I am a newbie. To create the widget, I deleted the default .js file and pasted the JavaScript plus XHTML into the HTML page and created the accompanying CSS file. The only code I can see that is generated is the plist. I tried opening up all the permissions but nothing seems to change. The OSX utilities console shows errors which are on lines beyond what there are numbers for in the code. I don't think the JavaScript/XHTML/CSS is the problem as it

Changing a checkbox's state programmatically in dashcode

倾然丶 夕夏残阳落幕 提交于 2019-12-04 21:34:32
问题 Okay, so I'm trying to change a checkbox's state programmatically in dashcode. I've tried: var checkbox = document.getElementById("checkbox"); // I have tried all the following methods. checkbox.checked = false; checkbox.selected = false; checkbox.value = false; 回答1: Dashboard Widgets just run on WebKit technologies, so code valid for Safari should also be valid in Dashcode. Either of the following should work: checkbox.checked = true; checkbox.setAttribute("checked", "true"); The fact that