How do I save preferences for automatically filled in text box?

G'day
I've got a popup button that lists all the external disks on my computer, and when a user picks a particular file on one of them, the path is displayed in a text field.
If I edit the field, it's saved automatically, but how do I save/update the preference bindings without editing please?
Regards
Santa

it's OK, I figured it out. For posterity...
First define the property...
property NSUserDefaults : class "NSUserDefaults"
then to read...
tell standardUserDefaults() of NSUserDefaults
set tempDiskPath to objectForKey_("DiskPath")
set tempDayReportDisplay to objectForKey_("DayReportDisplay")
set thetempYears1 to objectForKey_("theYearsStrings")
set tempYear to objectForKey_("tempYear")
set theDayYears1 to objectForKey_("theDayYearsStrings")
set tempdayYear to objectForKey_("tempdayYear")
end tell
the to write...
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
set tempDiskPath to DiskPath's stringValue() as text
set tempDayReportDisplay to DayReportDisplay's stringValue() as text
set thetempYears1 to (theYear's itemTitles()) as list
set tempYear to theYear's titleOfSelectedItem() as text
set theDayYears1 to (DayReportYear's itemTitles()) as list
set tempdayYear to DayReportYear's titleOfSelectedItem() as text
tell standardUserDefaults() of NSUserDefaults
setObjectforKey(tempDiskPath, "DiskPath")
setObjectforKey(tempDayReportDisplay, "DayReportDisplay")
setObjectforKey(thetempYears1, "theYearsStrings")
setObjectforKey(tempYear, "tempYear")
setObjectforKey(theDayYears1, "theDayYearsStrings")
setObjectforKey(tempdayYear, "tempdayYear")
end tell
return true -- current application's NSTerminateNow
end applicationShouldTerminate_

Similar Messages

  • How do I save preferences/values using javascript in dashboard widget?

    How do I save preferences/values using javascript in dashboard widget? I apologize if this is a stupid question but I simply cant seem to find a way. For example, if on teh back side of the widget teh user chooses the color of the widget, where or how do I save that value so it is retained the next time the user goes to the dashboard. Also, once saved, how do I read the value?
    Thanks a mil....

    Please look into
    /Developer/Examples/Dashboard/Goodbye World/3-Saving Preferences directory for a comple example.
    Otherwise, wait until the following book is published :-))
    http://www.apress.com/book/bookDisplay.html?bID=10173
    Mihalis.

  • How can I save passwords for URL's

    How can I save passwords for URL's? I just installed 10.6.7 Snow Leopard. I also had to format my HD drive and reinstall my software.

    Hi,
    From the Safari menu bar click Safari / Preferences then select the Autofill tab. Select the box next to:
    User names and passwords.
    Navigate to a site you normally log into with the user name and password. Click Yes when prompted. That will save that information to a new keychain for you.
    Passwords are actually stored in your Keychain Access application. (Applications/Utilities)
    Carolyn

  • I am new to Firefox; how do I set up for auto fill for the various forms that need the same info time and time again; thanks.

    I am new to Firefox; how do I set up for auto fill for the various forms that need the same info time and time again; thanks.

    Make sure that you do not run Firefox in permanent Private Browsing mode.
    *https://support.mozilla.org/kb/Private+Browsing
    *Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    *Deselect: [ ] "Always use private browsing mode"
    *Select : [X] "Remember search and form history"
    See also:
    *https://support.mozilla.org/kb/Form+autocomplete
    <i>[locking thread due to the age]</i>
    If you have further questions then please start a new thread.
    *[[/questions/new start a new thread]]

  • How do I save passwords for my apps

    How can I save passwords for apps

    You either write them down somewhere or you check the "remember me" (or something similar) button while in the app.  There is no universal way to save them.  It's up to the writer of the app whether or not to save credentials.

  • How to change printer preferences for HP envy 4500 using Google Chromebook HP pavilion 14

    I want to know how to change printer preferences for HP envy 4500 using Google Chromebook HP pavilion 14?
    This question was solved.
    View Solution.

     Hi chefcorbin,
    Welcome to the HP Support forums.  I understand that you would like to learn how to change the printer preferences using your Chromebook.
    I have included a link to Google support on printing a page with Chrome and it lists the print settings that you can adjust.
    Google Chrome Help - Print a Page
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?

    Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?
    I use the Tools > Annotate > Add Text feature, and when I click away after adding text, it automatically changes the text box size such that the last letter -- or last word -- gets bumped off into an invisible line below it, forcing me to manually adjust every single text box. It is highly annoying when trying to complete PDF forms (e.g. job applications).
    It appears to be a glitch, quite honestly, an error resulting from Apple's product design. Has it been fixed in the new operating system (for which they want $30)?
    I would very much appreciate any help you can provide! Thank you for your time.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • I upgraded pages.  Now when I begin a new document I automatically have a text box.  How do I get rid of the text box so that it does not automatically appear.  What settings do I need to change?

    I upgraded pages.  Now when I begin a new document I automatically have a text box.  How do I get rid of the text box so that it does not automatically appear.  What settings do I need to change?

    Perhaps you are loading a template that has a text block already on it.
    You might try the blank template option and set that as your go to template in your preferences

  • How do i save a ringtone i recieved via text message?

    how do i save a ringtone i recieved via text message?

    You can - though on a Droid it might work differently.  If you can get to an Options screen (long press the message, or a soft key to bring up an Options menu) one of the choices should be to save the attachment; and you can save it as a ringtone, or in a ringtones folder... I think.  Someone who has your same phone can answer better than I.

  • In InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to

    This may be a basic question... but in InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to determine what word count we can fit in, and c) how to do it in a table? Thanks!

    Set your ruler increments to pixels Preferences>Units & Increments. You can fill the text box with placeholder text Type>Fill with Placeholder text and get a word count from the Info panel with Show Options turned on from the flyout.
    From the Transform panel you can set a text box's width and height

  • How to link one scroll bar with two dynamic text boxes.

    How to link one scroll bar with two dynamic text boxes.
    If i move scroll bar in one text box,automatically text will
    be moved in another text box.But scroll bar is not visible.
    Can you please help me.
    Thanks in advance.

    See the following article:
    JavaScript - setFocus Method for tabbing to next form field
    And see if iOS can even handle the sample form.
    iOS and android devices are not a powerful as your desktop of laptop computer and have limited support for JavaScript within PDF forms. This limitation for specific apps ranges from none to quite a bit but not all JavaScript.

  • How to increase the width size between PROMPT and TEXT BOX?

    Hi Gurus,
    my page having MessageTextInputs. Normally page runs displays the Prompt name and one text box will displayed.
    my requirement is
    1) how to increase the width size between PROMPT and TEXT BOX?
    2)prompt name displays like
    elephant
    xxxxxant
    xxxxRose
    here xxxxx indicates SPACE
    but my client requirement is don't displays the SPACES in left side.
    so our requirement is in page PROMPT displays like
    elephant
    ant
    rose
    How to achieve this plz help me
    its very urgent
    Thanks

    Hi,
    Create a table layout region and under that use 'messageStyledText' for displaying the prompt and use 'messageTextInput' for text field without giving any prompt to that.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                           

  • Why Does my text disappear when filling a text box?

    I am trying to fill a text box a little larger than a sheet of paper (8.5x11). I have typed my statement and copied and pasted it end to end so that my text box will be filled with a repeating statement. When the text box gets about 1/5th full I get a little red plus sign in the lower right corner to indicate overflow. THIS IS NOT THE CASE. The box is only 1/5th full and should not be rendering an over flow. Even if it was an over flow the text in the box should remain visible. Hyphenation is on. Dragging the corners to resize the box is not helpful.
    I have drawn many text boxes and used various size fonts and leading, nothing seems to help.
    Illustrator CS3
    Macintosh dual-Intel

    Something is definitely corrupt here. Not only does the text extend beyond the displayed bounding box, but double-clicking on the Characters line in the Appearance panel shows "No Selection," even though the bounding box still shows, and the text vanishes. Attempts to edit the text on the artboard also cause it to vanish.
    When I create a new type object in your document and follow your described procedure, the result is the normal, expected behavior. Have you tried to repeat this in a new document? After restarting Illustrator? After rebooting your computer? After deleting the preferences?
    Peter

  • How do I stop Firefox from auto-focusing on text boxes?

    How do I stop Firefox from auto-focusing on text boxes? Sometimes as a page is loading, I scroll down the page...only to have the page jump back to where there is a text box, with a blinking cursor, after the page is finished loading. It is an annoying feature and I want to turn it off.

    Some pages use an onload event to set the focus to a text area or search field.
    You can try NoScript to see if that blocks it.
    *NoScript: https://addons.mozilla.org/firefox/addon/noscript/

Maybe you are looking for