Property List Question
I have a (nested) Property List set up (with lists within it)
and I'm wanting to know if I can substitute one of the names a sub
list with a property behaviou variable. I'm wanting to return the
names from the list and put these into a text field - the list will
be huge so I don't want to write a separate behaviour for each time
I reference the list to find a name and would like to do it via a
bahaviour.
For example the main list using dot syntax could be
referenced like this
gControlList.sectionHeading.subSection1.getPropAt(1) -- to
find the first property of the subSection list
And what I'm wanting to do is update or swap this so that I
can check the 'subSection' property with a variable sent from a
behaviour (from a getPropertyDescription thing) For example:
set x = subSection2 (this would be set via the behaviour so I
can get the values/names from the Property List)
gControlList.sectionHeading.x.getPropAt(1)
So is it possible to get the 'x' into the list so its
actually referencing SubSection2? I'm wanting to return the names
from the list and put these into a text field - the list will be
huge so I don't want to write a separate bahaviour for each time I
reference the list to find a name and would like to do it via a
bahaviour
I can't find a way to do this - any help would be appreciated
- Thanks
You might find some inspiration in the List Handlers script
that you can find
here.
Similar Messages
-
Etrecheck results and damaged Property List Data
In the past couple of weeks I have discovered several problems with my (mid-2010) iMac (System: OS X 10.9.4). First of all, Safari does not automatically open when I boot my computer. Although the computer appears to work alright otherwise, I then suddenly began having problems with it failing to scan documents from my HP L7780. Having a large project requiring the scanning of hundreds of documents, I’m at a standstill until I solve this problem.
Setup:
1. 120GB Internal SSD with OS X (10.9.4) used as main disk with frequently used applications and documents.
2. 1TB Internal Hard Disk with seldom used applications and documents.
3. 1TB External Hard Disk with two partitions:
A) Backup for 120GB Internal SSD,
B) Backup for 1TB internal Hard Disk. (The 1TB internal Hard Disk has only 124GB. Obviously, a much better setup would be to have just one 250GB internal SSD and one external backup for that drive.)
The problem appears to be with the software on the SSD and not the software on the internal hard drive.
Procedures taken:
1. Backed up SSD and reinstalled a fresh copy of OS X 10.9.4 via the Recovery partition using ⌘-R.
2. Attempted to Repair Disk Permissions on SSD again from the Recovery partition. Printout is extremely long.
3. Ran all the tests on TechTool Pro from the external backup. No problems found.
4. Ran all the tests on DiskWarrior from the DiskWarrior disk on both the internal Hard Disk and the internal SSD.
When I scanned the internal Hard Disk with DiskWarrior for files and folders for damage and potential compatibility, no problems were found.
Concerning the internal SSD, using DiskWarrior I had to rebuild the directory several times to (supposedly) completely repair the disk. When I scanned the internal SSD for files and folders for damage and potential compatibility I FOUND A LONG LIST OF PROBLEMS. I’m listing only two (of dozens) below:
******************** BEGINNING OF DISKWARRIOR REPORT ********************
DiskWarrior scanned the disk named "SSD" checking all files and folders for damage and potential compatibility
problems.!
Disk: "SSD"!
The Property List data was checked in 4,846 files.!
The Resource Data was checked in 4,623 files.!
The maximum Folder Depth on this disk is 20. This does not exceed the maximum recommended depth.!
Location: "Desktop"!
File: "._browserExtentionVersion.plist"!
Detected that Property List data is damaged and cannot be repaired.!
Unexpected character ! at line 1!
Location: "SSD/Users/danielbollhoefer/Library/Application Support/iSkysoft iTube Studio/ResourceForFree/5_0/
__MACOSX/50003/BrowserExtentsions/"!
File: "._Extensions.plist"!
Detected that Property List data is damaged and cannot be repaired.!
Unexpected character ! at line 1!
Location: "SSD/Users/danielbollhoefer/Library/Application Support/iSkysoft iTube Studio/ResourceForFree/5_0/
__MACOSX/50003/BrowserExtentsions/Safari/"!
******************** END OF ABBREVIATED DISKWARRIOR REPORT ********************
I realize that some of these files are invisible, however I do have InVisible 1.2.1. In checking out some invisible folders I find that they have a white minus sign on a red circle on the bottom right corner of the folder icon which means that (apparently) I do not have Sharing & Permissions for this folder.
QUESTION: So, how can I delete a damaged plist in this situation?
In addition, I ran an EtreCheck. Below is a copy of the report:
******************** BEGINNING OF ETRECHECK REPORT ********************
EtreCheck version: 1.9.13 (49)
Report generated August 13, 2014 at 11:39:27 AM EDT
Hardware Information: ?
iMac (27-inch, Mid 2010) (Verified)
iMac - model: iMac11,3
1 3.2 GHz Intel Core i3 CPU: 2 cores
16 GB RAM
Video Information: ?
ATI Radeon HD 5670 - VRAM: 512 MB
iMac 2560 x 1440
System Software: ?
OS X 10.9.4 (13E28) - Uptime: 0 days 0:13:33
Disk Information: ?
WDC WD10EARX-00PASB0 disk1 : (1 TB)
S.M.A.R.T. Status: Verified
EFI (disk1s1) <not mounted>: 209.7 MB
Hard Disk (disk1s2) /Volumes/Hard Disk: 999.86 GB (875.11 GB free)
Samsung SSD 840 Series disk0 : (120.03 GB)
S.M.A.R.T. Status: Verified
EFI (disk0s1) <not mounted>: 209.7 MB
SSD (disk0s2) / [Startup]: 119.04 GB (54.41 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
USB Information: ?
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Internal Memory Card Reader
DYMO DYMO LabelWriter 450
Apple Computer, Inc. IR Receiver
Apple Inc. Built-in iSight
Gatekeeper: ?
Mac App Store and identified developers
Kernel Extensions: ?
[not loaded] com.dymo.usbprinterclassdriver.kext (1.1 - SDK 10.5) Support
Launch Daemons: ?
[loaded] com.adobe.fpsaud.plist Support
[loaded] com.bombich.ccc.plist Support
[running] com.dymo.pnpd.plist Support
[running] com.micromat.TechToolProDaemon.plist Support
Launch Agents: ?
[running] com.micromat.TechToolProAgent.plist Support
User Launch Agents: ?
[loaded] com.adobe.ARM.[...].plist Support
[failed] com.google.keystone.agent.plist Support
User Login Items: ?
iTunesHelper
SpeechSynthesisServer
Mail
Safari
xScan
xScan
AdobeResourceSynchronizer
Internet Plug-ins: ?
FlashPlayer-10.6: Version: 14.0.0.145 - SDK 10.6 Support
Default Browser: Version: 537 - SDK 10.9
AdobePDFViewerNPAPI: Version: 11.0.07 - SDK 10.6 Support
AdobePDFViewer: Version: 11.0.07 - SDK 10.6 Support
DYMO NPAPI Addin: Version: 1.0 - SDK 10.6 Support
Flash Player: Version: 14.0.0.145 - SDK 10.6 Outdated! Update
QuickTime Plugin: Version: 7.7.3
DYMO Safari Addin: Version: (null) - SDK 10.5 Support
Safari Extensions: ?
iTube Studio (Disabled)
AdBlock-2 (Disabled)
Awesome Screenshot-2 (Disabled)
MapTricks
Audio Plug-ins: ?
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins: ?
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
3rd Party Preference Panes: ?
Flash Player Support
TechTool Protection Support
Time Machine: ?
Time Machine not configured!
Top Processes by CPU: ?
2% WindowServer
2% xScan
1% fontd
0% coreservicesd
0% hidd
Top Processes by Memory: ?
197 MB com.apple.IconServicesAgent
115 MB TextEdit
66 MB xScan
66 MB mds_stores
66 MB Safari
Virtual Memory Information: ?
13.34 GB Free RAM
1.27 GB Active RAM
225 MB Inactive RAM
1.17 GB Wired RAM
305 MB Page-ins
0 B Page-outs
******************** END OF ETRECHECK REPORT ********************
When attempting to repair permissions in Disk First Aid, there are hundreds (thousands?) of entries stating that they have been repaired. However, when immediately repeating the test, I get the same report.
Any assistance will be greatly appreciated.colimotl wrote:
1. 120GB Internal SSD with OS X (10.9.4) used as main disk with frequently used applications and documents.
2. 1TB Internal Hard Disk with seldom used applications and documents.
I don't think it is related to your problem, but just so you know, you should only run applications from the Applications folder. There are some low-level interactions between the system and software that may be broken if applications are installed elsewhere. I know this is true for help. It could be true about other things as well. If you need to, you can use the Applications folder in your home directory instead.
File: "._browserExtentionVersion.plist"!
Detected that Property List data is damaged and cannot be repaired.!
Unexpected character ! at line 1!
Location: "SSD/Users/danielbollhoefer/Library/Application Support/iSkysoft iTube Studio/ResourceForFree/5_0/
__MACOSX/50003/BrowserExtentsions/"!
File: "._Extensions.plist"!
Detected that Property List data is damaged and cannot be repaired.!
Unexpected character ! at line 1!
Location: "SSD/Users/danielbollhoefer/Library/Application Support/iSkysoft iTube Studio/ResourceForFree/5_0/
__MACOSX/50003/BrowserExtentsions/Safari/"!
******************** END OF ABBREVIATED DISKWARRIOR REPORT ********************
I realize that some of these files are invisible, however I do have InVisible 1.2.1. In checking out some invisible folders I find that they have a white minus sign on a red circle on the bottom right corner of the folder icon which means that (apparently) I do not have Sharing & Permissions for this folder.
QUESTION: So, how can I delete a damaged plist in this situation?
Those files are not damaged. Nor are the plist files. They are AppleDouble files meant for cross platform use on a non-Apple server or inside a zip file. They should never exist in this form on a Mac.
User Login Items: ?
iTunesHelper
SpeechSynthesisServer
Mail
Safari
xScan
xScan
AdobeResourceSynchronizer
Why do you have two xScans here? Try removing everything from Mail down and see if things work better.
When attempting to repair permissions in Disk First Aid, there are hundreds (thousands?) of entries stating that they have been repaired. However, when immediately repeating the test, I get the same report.
Don't worry about those: Mac OS X: Disk Utility's Repair Disk Permissions messages that you can safely ignore -
Creating a Dynamic Property LIst
Hi everyone,
How to make a dynamic Property list in lingo
Actually the problem is I am fetching a list of Columns from
the databse which may vary so I want to make a dynamic PropertyList
in which I can Set the property and the values based on the number
of colums in a Database
For Example: In the DB, I have a Table which contains
follwing columns
FName, LName,CompName, Age, Address1, Address2, Email,
website
Now I will select specific colums based on some condition. So
I will be storing the result which would come in a property list.
So this List needs to be Dynamic i.e it should be getting created
based on the colums returned from the query.
Suppose for a specific condition i get Fname, Lname, Email as
a result so my List should look some thing like This
objRecord = objResult.rows[1] --Row Returned from the
Database
listQueryResult = [#FirstName : objRecord[1], #LastName :
objRecord[2], #Email : objRecord[3] ]
The Above List shoud be based on nos of colums returned from
the Query
Is there any way by which i can create such a Dynamic
Property List.
I hope the Question is Clear
Hope to get the answer at the earliest
-Thanks and Regards
-Atul SaxenaYou can create a new empty property list like this:
listQueryResult = [:]
To add a property/value pair, you can use:
listQueryResult[
<propertyName>
] =
<value>
or:
listQueryResult.setaProp(
<propertyName>
<value>
The above two commands will add the property if it doesn't
exist, or update a value if the property name is already present in
the list.
You may not be aware that you can use strings as property
names instead of symbols if you like, which you might find easier.
Couple of examples following your example:
listQueryResult = [:]
objRecord = objResult.rows[1] --Row Returned from the
Database
listQueryResult["FName"] = objRecord[1]
listQueryResult["LName"] = objRecord[2]
(etc)
Or, if you also have a list of the fieldnames returned from
the db:
listQueryResult = [:]
fieldNames = objResult.fieldNames --Field names for records
returned from Database
objRecord = objResult.rows[1] --Row Returned from the
Database
repeat with n=1 to fieldNames.count
thisFieldName = fieldNames[n]
thisFieldValue = objRecord[n]
listQueryResult[thisFieldName] = thisFieldValue
end repeat
hope this helps!
- Ben -
Help with how to setup property list correctly
I am developing an iPhone application and I need a database to store data.
Since it's small amount of data I'll go for Property List.
But I have zero experience with it. I was hoping you could help me set it up.
It's an app based on karate techniques required for each belt.
Firstly I need the top category to be the belt. and a subcategory for EACH belt to be Requirements, Stances, Blocks, Hand Techniques, Foot Techniques, Kata and Kumite.
How do I do that?<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Rows</key>
<array>
<dict>
<key>Title</key>
<string>Belt 1</string>
<key>Children</key>
<array>
<dict>
<key>Title</key>
<string>B1 Requirements</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Stances</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Blocks</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Hand Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Foot Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Kata</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Kumite</string>
</dict>
</array>
</dict>
<dict>
<key>Title</key>
<string>Belt 2</string>
<key>Children</key>
<array>
<dict>
<key>Title</key>
<string>B2 Requirements</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Stances</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Blocks</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Hand Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Foot Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Kata</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Kumite</string>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
Use Xcode to copy/paste more belts. Rename belts as needed.
This is only the plist structure for drilling down and does not include details for each category beyond the items shown.
You can't be doing any of this if you have zero experience - you'll have questions for every tiny step and unless someone builds your app for you, you'll go ahead very, very slowly.
It is up to anyone with zero experience to spend time going thru the most basic hello world tutorials, as an example, and learn enough to be able to gain some traction on their own...this is not trivial stuff that you can just install a few tools and make what you want the next day, sorry.
See this post for beginner resources:
http://discussions.apple.com/thread.jspa?threadID=2218661
- come back when you've exhausted those and need specific help untangling something or if you get confused as you progress on your own...not just in over your head at the very beginning. -
Misplaced thumbnails - duplicate tinyCacheIndex in property list
I'm one of the users who's been frustrated lately with the wrong thumbnail showing up at times (with Aperture 2.1 at present, but I saw this frequently with 2.0). I've tracked down what I think is the immediate source of the issue, though I haven't had the time to verify this in detail yet.
I have two images which share the same thumbnail. If I rebuild the thumbnail for one of them, it will show up on both.
Looking at the "Version-1.apversion" property list file in the Aperture library for these two images, they both have the same value for the tinyCacheIndex property:
<key>tinyCacheIndex</key>
<integer>155</integer>
I'm assuming that this is an index into the AP.Tinies file, and that sharing the index is a Bad Thing.
My guess, though I haven't verified it yet, is that this can happen when moving a photo between projects. (Or perhaps it could happen, in 1.x or 2.0, if the problem has now been fixed.)
Rebuilding the library (command-option at startup) does not seem to detect/fix this problem.
I haven't yet been brave (foolish?) enough to manually change the index value.
Perhaps this will help out one of the engineers at Apple address this issue.Praveen,
There are two issues here.
“Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly” issue is normally due to the deployment issues. This more often occurs when you have same schema with multiple
version and this issue is due to the sequence/order in which these two schemas are deployed. If you run the following SQL query in your BizTalk management db replacing it with your target namespace of the schema deployed
SELECT *
FROM bt_XMLShare
WHERE target_namespace like N'http://YourTaggetNameSpace'
You shall see two version of the same schema listed and both of them should have Activate flag set to 1. If any of the schemas is set to 0, then you will have the above mentioned issues. This is due to the way the different versions of the schemas are deployed.
You can undeply both the version, deploy them together or deploy the older version first and the later version later.
And for another issue of custom property not updating the MessageType property, debug the pipeline component code. This issue has no direct impact to the above issue. If you you’re your Message Type to be updated and if it’s not getting changed, then debug
the code and check why its not been updated.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
Adjusting system.log with Property List Editor
Hi,
I had my system.log set up to rotate every seven days by using the Property List Editor with my older 2.0GHz Mac Mini OS X.5.8. I have upgraded to a faster Mini OS X.6.4 and now the system.log renews every day. Can someone tell me which plist I need to edit to get my system.log to go back to renewing every seven days? I am getting tired of having to change the permissions every day to view the log, and I want a longer time span in each log.
Thanks,
Paul4paul3 wrote:
Thank you Charlie that worked great. One thing I should point out is this has to be done from your Admin account in 10.6 and you have to type:
sudo edit /etc/newsyslog.conf
Actually, that sudo shouldn't be necessary: TextWrangler should ask you first if you want to unlock the file to make changes. When you want to save it should ask you to authenticate, and then it can save the file. But you're probably right about being in your admin account.
Now, please accept my apology for not getting to this sooner but I had a medical thing scheduled and I have not been qualified to do Terminal commands or type coherently for quite some time. I’ve only recently had a clear head so I’m getting to this now. Thank you again this is wonderful.
You're welcome. I'm glad to hear you're feeling better.
I do have one question though. For future reference for anyone wanting to do this if I want the log to rotate every two weeks instead of every week and save the last seven logs what would be the entries that I would make in the TextWrangler document?
In that case, I think you'd make the "when" field just a number of hours. In this case, 336 (168 hours per week times 2 weeks):
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/var/log/system.log 640 7 * 168 J
I haven't tested the two week interval, though, since it's kind of a long time...
Or, if I wanted to have the log rotate after it reaches 2MB and save the last seven logs what would be the commands to use in the TextWrangler document?
Just change the "when" field to an asterisk, the "count" field 7, and "size" 2048:
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/var/log/system.log 640 7 2048 * J
Thank you again for your input it is greatly appreciated!!
You're welcome. Let me know if any of this doesn't make sense...
charlie -
Okay, I know that you can use the sort() function to
automatically sort a
property list - damn handy at that. The trick is, this
function sorts the
list in order of the properties. So i fI want a list of
records sorted by
Name, then Date, then Amount, I simply have to make sure that
the properties
for each record are declared in that order. Here's the
kicker: Say I want
the user to be able to change the sort-order on the fly. Give
them buttons
to change it to sorting by Date first or Amount first. Or
make it possible
to have the list sort in reverse order. Are there any easy
ways of doing
that? (Short of going through each record and rebuilding them
from scratch
in a different order each time - that would probably work,
but it'd be slow
as dirt on a large data set.) This sort of feature is built
into the OS
(both Win and Mac), and even a feature used in Director's own
Cast window in
List mode, so one would think it'd be available to scripters,
but I can't
seem to find a way to do it.> What do you do with it once it's sorted? Can you just
display the data in
> the sorted order but leave it as is in the list?
Yes, as a matter of fact, the original list must remain
unsorted. (Entries
must stay in the order they're added for cross-referencing
purposes.) What
I've been doing is copying the master-list to a new list for
sort-and-display purposes. The display list also has a
variety of filtering
options to only display some of the master-list items by
type. But my
method for generating the display list copies entire records
as a whole,
rather than building each record item by item, so I have
little say over
which order the properties end up in. (Copying the records
item by item
takes about 5 times as long, processor-wise, I've found.
While there's a
slight delay when generating and sorting the filtered lists,
it's still
within the acceptable range. The delay caused by trying to do
them item by
item is far too long to be acceptable. I'm not sure if
interfacing with a
database would be better or not, but it sounds like that's
just getting
overly complex for this purpose. I may have to look into DB
management for
other reasons, though, so it's not out of the question. I'm
just surprised
that there isn't an option within the program to do something
like this,
like:
propList.sort(#name)
That would be a really elegant way to handle it - if only, if
only... Oh
well. -
AppleScript 10.9.0 System Events -10006 Update property list file item
Have AppleScript that runs without error on Mountain Lion 10.8.5, but errors out on Mavericks 10.9.0.
At end of script, property list items need to be updated and this is when error occurs.
Put together a subset of the script, see below) that get the error
Statement reads "set value of property list item "ArrayList001" to ArrayList001"
Text of error:
error "System Events got an error: 'xxx.plist' is not a property list file."
number -10006 from contents of property list file "xxx05.plist"
=============================================================================
property myPListFile : "cbmck05.plist"
property myPListFilePath : ""
property constPreviousRunDay : "PreviousRunDay"
on run
set today to "Date01" as string
set List001 to {}
set List002 to {}
set myPListFilePath to ""
repeat with i from 1 to 8
set end of List001 to (i * 2) as string
end repeat
set myPListFilePath to path to desktop folder from user domain as string
set fileMyPList to (myPListFilePath & myPListFile) as string
clear_file(fileMyPList)
-- First time! need to initalize
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
-- create new property list file using the empty dictionary list item as contents
set new_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:fileMyPList}
make new property list item at end of property list items of contents of new_plistfile ¬
with properties {kind:string, name:constPreviousRunDay, value:today}
make new property list item at end of property list items of contents of new_plistfile ¬
with properties {kind:list, name:"ArrayList001"}
make new property list item at end of property list items of contents of new_plistfile ¬
with properties {kind:list, name:"ArrayList002"}
end tell
set previousRunDate to today
set xxList to (repopulate_lists())
set ArrayList001 to List001
set ArrayList002 to List002
-- save info in the plist file
tell application "System Events"
tell property list file fileMyPList
tell contents
set value of property list item constPreviousRunDay to previousRunDate
set value of property list item "ArrayList001" to ArrayList001 -- <<< ------- error caused by the statement
set value of property list item "ArrayList002" to ArrayList002
end tell
end tell
end tell
end run
-- ==========================================
on repopulate_lists()
set newList to {}
set List002 to {}
repeat with i from 1 to 8
set end of newList to i as string
end repeat
set List001 to newList
return List001
end repopulate_lists
-- ==========================================
-- Does the file exist?
on fileExists(f)
try
f as string as alias
return true
on error errMsg number errNum
return false
end try
end fileExists
-- Delete the files if exist
on clear_file(aFile)
if fileExists(aFile) then
tell application "Finder"
set resultObject to delete aFile
end tell
end if
end clear_fileHere's an AppleScript handler that partially works around this bug (warning: it turns each list item into a string).
on plistWrite(plistPath, plistItemName, plistItemValue)
-- version 1.1, Daniel A. Shockley
-- 1.1 - rough work-around for Mavericks bug where using a list for property list item value wipes out data
if class of plistItemValue is class of {"a", "b"} and AppleScript version of (system info) as number ≥ 2.3 then
-- Convert each list item into a string and escape it for the shell command:
-- This will fail for any data types that AppleScript cannot coerce directly into a string.
set plistItemValue_forShell to ""
repeat with oneItem in plistItemValue
set plistItemValue_forShell to plistItemValue_forShell & space & quoted form of (oneItem as string)
end repeat
set shellCommand to "defaults write " & quoted form of POSIX path of plistPath & space & plistItemName & space & "-array" & space & plistItemValue_forShell
do shell script shellCommand
return true
else -- handle normally, since we aren't dealing with Mavericks list bug:
tell application "System Events"
-- create an empty property list dictionary item
set the parent_dictionary to make new property list item with properties {kind:record}
try
set plistFile to property list file plistPath
on error errMsg number errNum
if errNum is -1728 then
set plistFile to make new property list file with properties {contents:parent_dictionary, name:plistPath}
else
error errMsg number errNum
end if
end try
tell plistFile
try
tell property list item plistItemName
set value to plistItemValue
end tell
on error errMsg number errNum
if errNum is -10006 then
make new property list item at ¬
end of property list items of contents of plistFile ¬
with properties ¬
{kind:class of plistItemValue, name:plistItemName, value:plistItemValue}
else
error errMsg number errNum
end if
end try
end tell
return true
end tell
end if
end plistWrite -
Hi,
I have a MBP 13' Late 2011 and Yosemite 10.10.2 (14C1514).
Until yesterday, I was using Garmin ConnectIQ SDK and all was working fine.
Yesterday, I've updated my system with latest security updates and Xcode updates too (Version 6.2 (6C131e)).
Since, I can't launch the ConnectIQ simulator app, I have this message in console :
8/04/2015 15:19:04,103 mds[38]: There was an error parsing the Info.plist for the bundle at URL Info.plist -- file:///Volumes/Leto/connectiq-sdk-mac-1.1.0_2/ios/ConnectIQ.bundle/
The data couldn’t be read because it isn’t in the correct format.
<CFBasicHash 0x7fa64f44e9a0 [0x7fff7dfc7cf0]>{type = immutable dict, count = 2,
entries =>
0 : <CFString 0x7fff7df92580 [0x7fff7dfc7cf0]>{contents = "NSDebugDescription"} = <CFString 0x7fa64f44f0a0 [0x7fff7dfc7cf0]>{contents = "Unexpected character b at line 1"}
1 : <CFString 0x7fff7df9f5e0 [0x7fff7dfc7cf0]>{contents = "kCFPropertyListOldStyleParsingError"} = Error Domain=NSCocoaErrorDomain Code=3840 "The data couldn’t be read because it isn’t in the correct format." (Conversion of string failed.) UserInfo=0x7fa64f44eda0 {NSDebugDescription=Conversion of string failed.}
I have looked at this file and it looks like a binary plist
bplist00ß^P^V^A^B^C^D^E^F^G^H
^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^^^_ !"$%&'()'+,^[\CFBundleNameWDTXcodeYDTSDKName_^P^XNSHumanReadableCopyrightZDTSDKBuild_^P^YCFBundleDevelopmentRegion_^P^OCFBundleVersi on_^P^SBuildMachineOSBuild^DTPlatformName_^P^SCFBundlePackageType_^P^ZCFBundleShortVersionString_^P^ZCFBundleSupportedPlatforms_^P^]CFBundleInfoDictionaryVersion_^P^RCFBundleE xecutableZDTCompiler_^P^PMinimumOSVersion_^P^RCFBundleIdentifier^UIDeviceFamily_^P^QDTPlatformVersion\DTXcodeBuild_^P^QCFBundleSignature_^P^ODTPlatformBuildYConnectIQT0611[iph oneos8.1o^P-^@C^@o^@p^@y^@r^@i^@g^@h^@t^@ ^@©^@ ^@2^@0^@1^@5^@ ^@G^@a^@r^@m^@i^@n^@.^@ ^@A^@l^@l^@ ^@r^@i^@g^@h^@t^@s^@ ^@r^@e^@s^@e^@r^@v^@e^@d^@.V12B411RenQ1V14C109Xiphoneos TBNDLS1.0¡#XiPhoneOSS6.0YConnectIQ_^P"com.apple.compilers.llvm.clang.1_0S8.1_^P^Tcom.garmin.ConnectIQ¡*^P^AW6A2008aT????^@^H^@7^@D^@L^@V^@q^@|^@<98>^@ª^@À^@Ï^@å^A^B^A^_^A?^AT^ A_^Ar^A<87>^A<96>^Aª^A·^AË^AÝ^Aç^Aì^Aø^BU^B\^B_^Ba^Bh^Bq^Bv^Bz^B|^B<85>^B<89>^B<93>^B¸^B¼^BÓ^BÕ^B×^Bß^@^@^@^@^@^@^B^A^@^@^@^@^@^@^@-^@^@^@^@^@^@^@^@^@^@^@^@^@^@^Bä
I guess it is a normal format but my system seems to be unable to read binary plist ?
I tried some stuff with plutil
plutil -lint Info.plist
Info.plist: Unexpected character b at line 1
Same for convert
plutil -convert xml1 Info.plist
Info.plist: Property List error: Unexpected character b at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
I also try to download a fresh version of the connectIQ SDK and no changes.
Any idea ?
ThanksStep by step, how did you arrive at seeing this agreement?
-
Property Lists: How to insert a variable as a property?
Hi.
I am trying to insert a variable in place of a newly defined
property to be added to a poroperty list.
This would normally add a new a new property to a poroperty
list :
Database [#needtogetvariablehere] = typedPassword
-- 'Database' is the property list, 'needtogetvariablehere'
is the new poperty and 'typedPassword' is the new property's value
- thisall works fine.
I'd like to generate new property names dynamically using an
editable text box. How do I replace the new property name '
nedtogetvariablehere' with a variable?
I'm sure I've got to put some rounded brackets in somewhere
but everything I try spits out a syntax error.
eg:
myVariable = "blablabla"
Database [#(myVariable)] = typedPassword
Any ideas?
Thanks.I don't know of a way, despite the responses so far, to
convert a variable
name to a symbol then to use it as a property. You must hard
code it as you
have seen in the responses.
Craig
Craig Wollman
Word of Mouth Productions
phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com
"dbohea" <[email protected]> wrote in
message
news:e7e3p7$mb2$[email protected]..
> Hi.
>
> I am trying to insert a variable in place of a newly
defined property to
> be
> added to a poroperty list.
>
> This would normally add a new a new property to a
poroperty list :
>
> Database [#needtogetvariablehere] = typedPassword
>
> -- 'Database' is the property list,
'needtogetvariablehere' is the new
> poperty
> and 'typedPassword' is the new property's value -
thisall works fine.
>
> I'd like to generate new property names dynamically
using an editable text
> box. How do I replace the new property name '
nedtogetvariablehere' with
> a
> variable?
>
> I'm sure I've got to put some rounded brackets in
somewhere but everything
> I
> try spits out a syntax error.
>
> eg:
>
> myVariable = "blablabla"
>
> Database [#(myVariable)] = typedPassword
>
>
> Any ideas?
>
> Thanks.
> -
Clearing Network Identification Property List
How do I go about clearing the network identification property list?
/Library/Preferences/SystemConfiguration/com.apple.network.identification.plist
I have tried deleting it, but it always regenerates with the same data. I want the property list to just show my current network information and not previous connections.
Thank you.What exactly are you trying to clear out? If you are referring to wireless networks that you previously joined then go into System Preferences/Network/AirPort/Advanced/AirPort and delete unwanted network info from the 'Preferred Networks' pane
-
What I'd like to do is to start with a baseline property list for an application, let users add some entries, and then save that new property list as the new baseline plist.
What I've tried is creating the plist in Xcode, opening that plist as an NSDictionary when initializing the app, converting that dict to an NSMutableDictionary, and then manipulating the mutable dict here and there (with appropriate plist classes), and then (trying) replace the previous plist with the plist written using the mutable dictionary.
Well, this has not worked out well.
During debugging when I read the plist as a NSDictionary, immediately converted it to a mutable dictionary, and then tried writing it back, the return value is NO indicating the file was not written because all the objects are not property list objects (but I started with a valid plist?!?)
Any tips or direction would be appreciated (code snippets below), or is this a completely bizarre way to do it? Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>2008-09-16</key>
<dict>
<key>isImportant</key>
<integer>1</integer>
<key>amount</key>
<integer>3</integer>
</dict>
<key>2008-09-17</key>
<dict>
<key>amount</key>
<integer>1</integer>
</dict>
<key>2008-09-18</key>
<dict>
<key>amount</key>
<integer>2</integer>
</dict>
</dict>
</plist>
// read the data from the plist
NSString *thePath = [[NSBundle mainBundle] pathForResource:@"Events" ofType:@"plist"];
dictEvents = [[NSDictionary alloc] initWithDictionary:[NSDictionary dictionaryWithContentsOfFile:thePath]];
// convert to mutable
mutableEventsDict = [[NSMutableDictionary dictionaryWithCapacity:dictEvents.count] retain];
[mutableEventsDict addEntriesFromDictionary:dictEvents];
// now try writing back the same plist
BOOL didWrite = [mutableEventsDict writeToFile:thePath atomically:YES];
// BOOL is NO!You definitely can NOT write to the resources directory. The app's Document directory is the correct place to write your file.
But also look at the info on the 'writeToFile' method in NSDictionary. There are very specific rules about what kind of objects can be used for keys and values. If a single key or value is the wrong type in the entire dictionary, nothing will be written out. -
After using DiskWarrior to check files and folders, DW says that the Property List is damaged and cannnot be repaired. This is in ~Library/cookies/apple.appstore.plist. Something about the character "c" at line 1.
Should I delete/trash the "apple.appstore.plist" preference file?
Thanks for helping
RonRon....
Unless you are having problems accessing or using the App Store, leave the .plist file where it is. Otherwise, it's safe to delete that file as your Mac will generate a new .plist file for you the next time you launch the App Store. -
DiskWarrior is telling me Property List data is damaged
DiskWarrior is telling me that "Property List data is damaged" in four .plist files in the Aperture Library.aplibrary/Database/History/Changes folder. Three say "unexpected EOF" and one says "Value missing for key inside <dict> at line 181". Is there anything I can/should do about this? Should I delete the files? Thanks.
-Ted GocalJust as a test I took one of my libraries that I do this sort of thing to and removed the Changes folder and ran Aperture on the library. Aperture worked fine. The library behaved just as expected.
I've never paid much attention to this folder before and it's not clear just what 'changes' they are referring to but I wouldn;t get to worked up about it. Just make sure you have good working backups (as you should have anyway) and remember the next time you run DiskWarrior you'll probably see these errors.
regards -
ADF SelectOneChoice List Question
I posted the following message in the Toplink forum and they have suggested I try over here:
Toplink Essentials List Question
==================
I am new to Toplink Essentials. I am using Toplink Essentials inside of JDeveloper 11g, against Oracle Express and ADF/Trinidad and have used JDeveloper's "Entities from Tables" wizard to reverse engineer my database into Toplink pojo objects. After this I used JDeveloper's wizard to create a JavaServiceFacade and then generate a Data Control.
After expanding the DataControl (which is mapped to the JavaServiceFacade) I have a method queryEntityFindAll(). Under this method I have serval attributes and then a list which represents a "many-side" of this entitie's relationship with another entity. How do I create a selectOneChoice using this list?
I've tried expanding queryEntityFindAll() and then dragging the list to a jspx page, setting the Base Data Source to "JavaServiceFacade.queryEntityFindAll.listName and then setting the List Data Source to "ListName : JavaServiceFacade.queryRelatedEntityFindAll". However, when I run the page the only thing that appears on the page is the selectOneChoice label... no drop down component appears on the page... no errors are generated to give any clue as to what my problem may be...
Although I'm working in JDeveloper, I really believe this is a Toplink Essentials question...
Please help!Thanks for the quick response!
Using the department / employee example... I'm trying to create a form that allows a user to create a new department. I have dragged the "Department" object (located under queryDepartmentFindAll()) over to my jspx form. A form with corresponding fields is created.
I notice that no field was created for employeeId. I expand the "Department" object (again, under queryDepartmentFindAll()) and observe that "Employee" is present, as a list (expanding Employee provides access to employee object attributes along with another list entitled departmentList).
I know that it's unlikely that only one employee would be selected in the creation of a department... but I'm sticking to the example...
So, I drag the "Employee" (again, under queryDepartmentFindAll()) object over to the newly created form and from the pop-up menu I choose selectOneChoice as the desired component. I run the jspx page, Internet Explorer 7 browser pops up and all labels display on the page, all fields but no selectOneChoice component appears on the screen... the space is there for it but it appears to be invisible. I have checked the Employee table and there is data to be displayed... it's just that I must be missing something...
Maybe you are looking for
-
Acces dynamic configuration variable (e.g. filename) in ABAP mapping class
Hi experts I am searching for a possibility to acces a dynamic configuration variable (DCV) in an ABAP mapping class. Since I could not find a solution in SDN and other sources, I hope somebody in this forum can help me. What I already found is the f
-
Currency conversion not working in web templates after migration to 7.0
Hi Gurus, I am experiencing an interesting issue in BI7. I have my web-template reports build on one or two queries. When I execute the queries from RSRT I have all the amounts properly converted to USD (there is a bex variable defined on the query l
-
I am having an issue with launching a PackageMaker file (Installer File built with PackageMaker). When I launch it, other PackageMaker installers also appear that I did not double-click. This has happened before, and I rebuilt the PackageMaker file.
-
Adopt requisition price in purchase order in ME51N
Dear experts I am not able to get field BPUEB(Adopt requisition price in purchase order) in ME51N item details screen,in Valuation tab , what is setting required to bring the filed to my valuation tab ? Gopi
-
I am new to Flex, and I have (so far) only developed two other applications using Flex. I am having a really difficult time with this issue. I've tried everything (except for creating a class) that I can think of to resolve this issue, and I'm runnin