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.
>

Similar Messages

  • How to insert String variables in Execute Immediate Statement

    Hi,
    I have query
    dept varchar2(10);
    dept :='electronics'
    l_dyn_sql_input600_cbs := 'select EmployeeName,AGE,' || dept ||' from Employee'
    EXECUTE immediate l_dyn_sql_input600_cbs;
    when i run the query it says "electonics" Invalid identifier.
    Can anyone help to rectify the query

    What are you actually trying to do here:
    - Select employee name, age and the string literal 'electronics' from the employee table?
    - Select employee name, age and the dept field from the employee table?
    - Select employee name, age and dept from the employee table where dept = 'electronics'?
    - Something else...?
    Doesn't seem to make much sense as it is right now...
    cheers,
    Anthony

  • Messages/insert system variable in message

    Hello ,
    I am writing short report , and after i delet e some lines from db i would like to have message with text 
    e.g. ' 25 lines deleted '. I created text symbol 002 containing  text   " lines deleted" but i do not know how to
    insert system variable sy-dbcnt in front of it . Please have  a look at source code below .
    Thank you
    source code
    REPORT  ZMM4R82  message-id sy                                        .
    data gv_date type sy-datum.
    data gv_no_days type n length 3 .
    selection-screen begin of block A1 with frame  TITLE text-001.
    parameters pdays like gv_no_days default '60' .
    selection-screen end of block A1.
    at selection-screen.
    gv_no_days = pdays .
      pdays = '60'.
    gv_date = sy-datum - gv_no_days.
    delete  from zdocktostock where ddate < gv_date.
    Message text-002 type 'S' .

    After
    delete from zdocktostock where ddate < gv_date.
    You have to use
    Concatenate TEXT-002 SY-DBCNT into V_string separated by Space.
    Message V_STRING type 'S'.

  • 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_file

    Here'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

  • How to insert a space-bar in the Muse CC master slide page property metadata

    I'm using the latest version of Muse CC and need to know how to insert a space-bar in the master slide page property metadata page title suffix area

    I found it.  If anyone else has this problem press the shift and \ at the same time on a standard windows keyboard.

  • How can i insert the variable value in MS ACCES Query

    i am creating one Query (query1) in MS ACCESS ( like we creaate Tables, Forms and Reports in MS ACCESS ) in this Query i have given 2 constent value in BETWEEN CLAUSE , after that i Created a CROSS QUERY which is based on the privious Query (query1).
    Now i want to insert the variable value using JSP and HTML in to Query(query1).
    Doing this i want to execute the Query (query1) with variable perameters and
    wants to get the risponce form CROSS QUERY.
    In this matter how can i insert the value in Query(query1) using JDBC and JSP.

    The query is
    Select ZMSGMAP.GROUP_CODE as 'group', ZMSDSTATE.STATE_DESC as 'state', ZMSTRN.YRMON, sum(ZMSTRN.CMAQTY) as 'qty' from ZMSDSTATE,ZMSGMAP,ZMSTRN Where ZMSTRN.STATE=ZMSDSTATE.STATE and ZMSTRN.PLANT=ZMSGMAP.PLANT_CODE and ZMSTRN.YRMON between "+p1+" and "+p2+" Group by ZMDGMAP.GROUP_CODE, ZMSDSTATE.STSTE_DESC, ZMSTRN.YRMONUsing this query i m trying to display the risult but the YRMON is displaying in a single column, i want to display it ia seperat columns. here p1 and p2 is YRMON(it is the yer month like 200102), for this solution i have created Cross table Query which is based on uper Query (query1) and design it column wise Display, it is givng the right display, but the problem is this i m not getting the technique throw which i can insert the variable values in to the query1 (which is designed in MS ACCESS).
    u can contact me on [email protected] for more details.

  • How to insert a table with variable rows in smart form

    Hi all,
    How to insert a table with variable rows in smart form?
    Any help would be appreciated.
    Regards,
    Mahesh.

    Hi,
    Right click the mouse->create->table
    If you want 5 columns, you need to declare 5 cells in one line type of the table
    Click on Table -> Details, then do the following
    Line Type 1 2 3 4 5
    L1 2mm 3mm etc
    Here specify the width of the columns as many as you want..
    then in the header/main area of the table, click create Table Line, Rowtype is L1, automatically 5 cells will come,In each cell create a text element, display the variable to be printed there.

  • 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.

  • How to Insert Data in Database using BCS with out External List

    Hi,
    How to Insert,Update and Delete User Interface  data using business connectivity service with out External List.Please suggest me solution.
    Regards,
    khadar

    Once you've configured the external content type, you can interact with it using the BDC Object Models available to you.  You can use server side or client side and interact with the database without an external list.
    Check these links:
    Server side:
    http://msdn.microsoft.com/en-us/library/office/ff464357(v=office.14).aspx#sectionSection3
    Client Side: http://msdn.microsoft.com/library/jj164116.aspx
    Brandon Atkinson
    Blog: http://sharepointbrandon.com

  • How to insert list or library documents to custom db

    Hi All,
    I have small requirement how to insert the list or library documents to Custom Database using server object model.
    Thank,
    Raj

    Hi,
    According to your description, my understanding is that you want to insert some list items to a custom database using Server Object Model.
    I suggest you can read some list field value you want using SPList and
    SPListItem Object, then you can use SqlConnection and
    SqlCommand object insert value to your custom database.
    Here are some detailed code demos for your reference:
    How to: Read the Value of a Field in a List Item
    Beginners guide to accessing SQL Server through C#
    Thanks
    Best Regards,
    Jerry Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to insert, as an input variable within formula, the total time window on scope?

    How to insert, as an input variable within formula, the total time window on scope (i.e. 20ms/div x 10 div = 200ms)?
    BELOW IS AN EXAMPLE OF ISSUE:
    FORMULA FOR ACTION INTEGRAL:
    STATISTICS:
    Input variable: DPO4034(CH1);
    Check Box: number of samples.
    FORMULA
    Input variable 0: DPO4034(CH1); alias: x0
    Input variable 1: "Total Time Window on Scope???"; alias: x1
    Input variable 2: Number of Samples (CH1); alias: x2
    Under Operation Setup: Formula
    Y= (x0^2)*(x1/x2)
    Output: Processed Data 1 (CH1)
    THEN USING STATISTICS:
    Input signal: Processed Data 1 (CH1)
    Check Box: SUM
    Output: CH1 Action Integral [A^2s]
    Solved!
    Go to Solution.

    Hi again Catherine,
    I have now added another TekScope (TDS3032B) along with the DPO4034 and run the same work-around on the TDS3032B using CH1 as the "real" signal channel and CH2 as the "burst width" channel. However, the value returned for CH2 is nominally 99E+36 (min 99E+36, max 99E+36) with very few retrievals of correct burst width (~200ms). Seems the SignalExpress program is unable to consistently retrieve from TDS3032B the actual burst width (scope's time scale/window) and defaults to 99E+36 value. Any ideas on what is occurring and how to make it work? Attached are some screen captures to help guide discussion.
    Regards,
    Michael
    Attachments:
    TDS3032B - incorrect burst width.png ‏301 KB
    TDS3032B - correct burst width.png ‏287 KB
    DPO4034 - always correct burst width.png ‏302 KB

  • How to insert data to the specified row column of the multi column list box

    Hi All
    How do i insert data into the specified column of the multi cplumn list box?
    I have a table that containsall station nos and name.Then another table contains the data the various stations having at  for 24 hrs.That is 12 am to 11 pm.
    And i want to display each stations details as follows using a multi column list box/table
    My stationinfo table
    stnno   stnname......................
    s1           stn1
    s2            stn2
    s3             stn3
    The other table
    stnno      sysdatetime       data
    s1             12am                   1
    s2              12am                   4
    s1               1  am                 2
    So the station s1,s2.... will have data for 24 hrs.
    And i want to display it as follows using a multicolumn listbox
    stnname        12am   1 am ......................................11pm
    s1                   ...................
    s2                 ........................
    What i have in my  mind is to get all station nos
    and in a for loop get the station's data from 12 am to 11 pm
    or
    select every statios data for each hor.But in this case i have to query the database 24 times.So i dont think its a good way.
    Or any other better query available?
    Can anybody suggest me a good idea?
    One more thing...how to insert data into the specified field row or column of a multi column list box?
    Thanks in advance

    hi
    i want to know,,can u say ur need clearly...and i attached two image u see that one
    Indrajit
    | [email protected] | [email protected] .
    Attachments:
    station.JPG ‏35 KB
    station2.JPG ‏79 KB

  • How can I create a property list inside a property list?

    How can I create a property list inside a property list?
    I have a string(that I pulled from a text member). the string
    is actually a propert list.
    the property list has another property list inside it..
    how can I use this list ? how can I conert the text to a list
    that director will understand?
    thanks.

    Not sure if this is what you're wanting, but to make a list
    from a text
    member you could do something like ...
    myList= []
    -- Fill myList with values --
    repeat with i = 1 to member("YourTextMember").line.count
    add myList, (member("YourTextMember").line.i)
    end repeat
    Haven't checked it, but it should work.
    -Matt

  • How do I build a dynamic property list?

    It has been a long time and all my old Authorware stuff is in the shed somewhere. I want to dynamically build a property list statement in Authorware 7
    I figured it was something like property_list[1]["#"^variable_text]
    but this doesn't seem to be working so I just wanted to check I was using the correct syntax?

    Found some old code.
    I think you need to do
    property_text = "#"^variable_text
    then you can do the following
    property_list[1][property_text]
    That seemed to work.

  • How do you create a searchable property list?

    I am trying to create a searchable database of historic military figures. It will be a permanent list of people that will not change. I need to be able to search the list by first and/or last name and create a selectable list. Once a search list is created you can click on a name to display all the data on that person. Also there should be an option to browse the entire list. The original 1000 name list is provided in an excel document. I am having a brain freeze on this. Any examples would be helpful. Thank you!

    The simplest option might be to use a genuine database instead of a property list. For example, there's a free xtra from Valentin Schmidt for this (SQLite xtra)
    Otherwise, you might create a list of property lists, with named properties being keys to search on, something like:
    lData = []
    lPerson = ["firstname": "Stonewall", "lastname": "Jackson", "data": "Some data you wish to record against this person's name"]
    lData.append(lPerson)
    lPerson = ["firstname": "Robert", "lastname": "Lee", "data": "Some data you wish to record against this person's name"]
    lData.append(lPerson)
    -- etc…

Maybe you are looking for

  • SQL Report Region

    Hi, I am using apex 4.0.1 and I have a page with several SQL Report regions. The user can edit the data in the report regions by clicking a column that uses a href link to open a DML page in a modal window. The user can then amend some data in the mo

  • Category for service category S046 does not exist

    Dear Experts, This is regarding the Bdoc error "Category for service category S046 does not exist". ECC service materials are trying to replicate from ECC to CRM. In our scenario we doesn't required ECC service material in CRM. I have not downloaded

  • No longer able to use previous method for adding tracks and orginizing my library :(

    I use to add a few mp3's to my library then sort the library by date added to see the just added tracks at the top [most recent] of that view, well that don't always work since itunes 11. Can anyone explain please? or even offer an alternate method?

  • Disk still wakes up with laptop-mode-tools

    Hi all, I have a Thinkpad x61 and I'm trying to manage power use with laptop-mode-tools, but I'm having trouble with the harddrive waking up too much. I have it configured so that lm-tools activates when the power is disconnected, and sure enough, a

  • How can I change dates to new sequence with jumbled slides?

    I've been scanning thousands of old slides and negatives. Some of the slides have several boxes mixed together, and they have got scanned in the wrong order. I have used albums to try to sort them into the right order. I've been trying to use the Ape