Setting global variable that are static but I want them to change

I'm trying to set a global variable so I can let the user change the state in the Plugin Manager.  I've created a checkbox (in PluginManager.lua)
f:checkbox {
     title = 'Show HTTP response',
     value = _G.showHttpResponse,
that references the global variable (in PluginInit.lua)
_G.showHttpResponse = true
The state of the checkbox accurately reflects the initial value as set.  Everything seems fine but after unchecking the checkbox, the value is always true in my plugin.  I expected _G.showHttpResponse to change to reflect the setting in the checkbox.
What have I overlooked?  Is this only for setting static globals?
Abe

Reading the Lightroom SDK manual seemed to indicate that using globals would be the way to go.  I'm thinking that it is only appropriate for static text.
I've taken both your suggestions and have used the plugin preferences.  I didn't think you could get and set them in the Plugin Manager but they work just fine.  Now I set my debug flags in the plugin manager screen and they are available to the plugin and are persisted as well.
Thanks for the suggestion.  Everything is working.

Similar Messages

  • Hi I'm looking for some keyboard shortcut that are Mac but I want PC. Here they are:

    Hi I'm looking for some keyboard shortcut that are Mac but I want PC. Here they are:
    ATL + shift + l
    ATL + q
    ATL + a
    ATL + shift + e
    ATL + z
    ATL + x
    ALT + SHIFT + g
    ALT + SHIFT + f
    they are for mac I them would like for pc... Thank you

    Ah, thanks. Goes to show how carefully I look at keyboards these days...
    So Opt(alt) on the Mac should map to Alt on PC.
    It would actually be helpful if the OP told us waht the shortcuts were meant to do...
    And there's always the help files. A complete list of default shortcusts is at http://helpx.adobe.com/indesign/using/default-keyboard-shortcuts.html

  • Can I read/write global variables that are in other PC?

    I attach the vis and the executables.
    My problem is that when I run( continuosly, because in other way, I read the default value of the variable) getvalue.vi and setvalue.vi, I don´t have any problem, I can read/write the global variables, the two vis is running in the same PC.
    But when I do the exe and I run them continuosly , it doesn´t work.
    Any solution?
    Thanks in advanced!
    Graci
    Attachments:
    Get_Value.vi ‏30 KB
    Set_Value.vi ‏30 KB
    Exe.zip ‏272 KB

    Hello Bichillo,
    By running the vis continuously you are running into race conditions. If you cannot control when you are writing to or reading from a global variable, you cannot know whether the value writen/read is the right one or not.
    In your case the global variable value that is read is sometimes the last value writen and sometimes an empty string.
    To make the global variable behave as desired, that is, keeping its last value, the global variable must be in memory when you access it using VI Server. If it is not in memory, the returned value is an empty string. That´s why you sometimes get a non-empty string: when you access the global variable to read its value, it happens to be in memory because you´ve just writen to it.
    To ensure that the global
    variable is always in memory and it keeps its last value, you must include the global variable into your block diagram. I am attaching modified vis that implement this.
    Hope it helps.
    César Verdejo
    Training and Certification | National Instruments
    Attachments:
    Get-_Set_Value.llb ‏48 KB

  • I have images that are embedded, but I want to link to an exernal image instead - how can I do this?

    I have an illustrator CS5 document, and somehow a few images were embedded, rather than linked to. I need them to be linked and not embedded. How can I change them?

    Option1 (You have files for the umbedded imaegs you can link to)
    In links panel select the embedded image that has an embedded icon.
    Click on relink button on bottom left of palette. Make sure link is checked before you choose place.
    This will hold scaling & positioning so you need not manually size and positon each one.
    Option 2 (Image embedded no original file)
    CS6 cloud has an unembed command you can use. Otherwise copy and paste this into Photoshop, (try to guess the resolution eg: 300dpi) save a file, and then use the method above. This will hold your scaling and position.
    Obviouslty the first method is upreferred. With the second method you will have to look at the image in Phothsop at 100% for softness, to determine if the orignal embedded image was atleast 300dpi.

  • Any way to set global variables except EAS console?

    Hi pros,
    I am searching for a way to set global variables (used by business rules) automatically.
    I got several variables which should change each month. I know the rule to set them.
    However, I cannot find any way to set them through scripting or something else.
    I tried to research EAS repository. The one that I found relevant is HBRVariables table.
    I cannot find any tool can help this.
    Any one knows how?
    Appreciated......
    Casp Huang

    Yes you can use substitution variables in business rules and they are widely used, it is relatively easy to automate the changing of values for subtitution values.
    You can also put a sub var into the default value for a global variable in business rules.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • I would like to set up an older iPad with a new messages account so it can be used by my kids.  I don't, however, want to lose the apps or music that are on the iPad. Can I change only the Messages "account"?

    I would like to set up an older iPad with a new messages account so it can be used by my kids.  I don't, however, want to lose the apps or music that are on the iPad. Can I change only the Messages "account"?

    Thanks. I had tried that, but was still having problems. Then I realized that I was using three addresses on both devices.  Once I changed it to only one email on one iPad and a different email on the other, it worked great. Your message encouraged me to dig deeper and think differently. It worked. Thanks again!

  • HT1473 I imported songs onto itunes AND my ipad but i cant get it on my ipad and that is where i really want them. how do i find and get them on my Ipad? i tried the support area but that didnt help at all.

    I imported songs onto itunes AND my ipad but i cant get it on my ipad and that is where i really want them. how do i find and get them on my Ipad? i tried the support area but that didnt help at all.

    Did you purchase them on your iPad with the same Apple ID that you are using for iTunes on your iPhone and that iTunes on your Mac is sign into?

  • My iphoto pictures are there but doesnot show them.  I see them on the above line but the each individual picture is a blank

    my iphoto pictures are there but doesnot show them.  I see them on the above line but the each individual picture is a blank

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • How do I stop pop up that asks me, Do you want to save changes to doc... before closing? I have made no changes only printed the file. Using Adobe Reader DC, Windows 7 64 bit.

    How do I stop pop up that asks me, Do you want to save changes to doc... before closing? I have made no changes only printed the file. Using Adobe Reader DC, Windows 7 64 bit.
    This is very annoying and we need this stopped as we have made no changes to any of the adobe files. Please advise how to do this.
    Customer Service DCC

    I first tried the version without the deflated stream (so everything uncompressed) against the online repair tool to check/analyse it @ https://www.pdf-tools.com/osa/repair.aspx
    And it says no error found, but the reader still want to save it when closing so i still had no clue at this point.
    Fortunately, i finally found what was wrong with my generated PDF.
    In my xref table, each object reference was not end by a full EOL, i only did put a newline char.
    Now i have "carriage return" "newline" which is the full EOL and the reader is happy and close the file silently.
    As suspected i did not follow correctly the specs on xref table
    Now i'll go and figure what i did wrong with the deflate filter
    Thanks for your help.

  • HT204053 My children both have ipad minis - I want to be able to purchase them items using my applie id but I want them to have their own apple id for imessage etc...is this possible?

    My children both have ipad minis - I want to be able to purchase them items using my applie id but I want them to have their own apple id for imessage etc...is this possible?

    Your Apple ID can be associated with up to 10 devices, including iOS devices, computers and Apple TV(s).  If you will still be within this limit, you can continue to share the ID across all your devices.  A caution about sharing your iCloud account, however: when you share an account any data you sync with the account is merged and the merged data appears on all devices sharing the account.  You may, for example, end up with each other's contacts and calendar events on your devices if you do this. 
    It's usually recommended that you share your iTunes account, but maintain separate iCloud accounts, as well as use different IDs for iMessage and FaceTime (to avoid getting each other's text messages and FaceTime calls).  Note: the ID you use for iTunes purchasing does not need to be the same as the ID you use for other services such as iCloud, iMessage or FaceTime.  This article may be of interest in this regard: http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/.

  • How do I merge two different libraries, linked to one account? They're on two different computers but I want them to be on one

    How do I merge two different libraries, linked to one account? They're on two different computers but I want them to be on one

    This should do the trick
    Home Sharing Learn More
    http://support.apple.com/kb/HT201976
    Best of Luck

  • I just upgraded to Mavarick.  I can no longer find my mailboxes in my e-mail.  I read to go to 'finder'/ go go to folder the type in ~/Library which I did and I eventually found all my mailboxes.  But I want them to be available from my e-mail.  How ?

    I just upgraded to Mavarick.  I can no longer find my mailboxes in my e-mail.  I went to 'finder', under 'go'> go to folder / mail and eventually I found all my missing mailboxes.  But I want them to show up as they used to, in my e-mail.  How do I get them back?

    .........and just wasted more time clicking on the 'chat online' link which of course does nothing.
    I'll be spending time searching for an alternative ISP instead. Absolutely sick of this.

  • Setting global variable to be used in a SQL task

    I am trying to create a simple SSIS package to be used in the SQL Task
    The SQLStatement is
    Update dbo.Users
    set FirstName = ?
    where UserID = 2
    Added a parameter mapping for User::strDataString
    From the data manager dynamic script, I included following code to prompt for the value and set to the global variable and then call the excecute SQL task.
    PROMPT(TEXT,%strData%,"Enter value",,"")
    GLOBAL(@[User::strDataString],%strData%)
    TASK(Execute SQL Task,,)
    When the check the database, the table is getting updated only with the default value of the strDataString but not with the value entered in BPC.
    Am I missing any link?
    Thanks
    Omkar
    Edited by: yomkar on Mar 17, 2010 1:13 PM

    Hello,
    on which version of BPC are you running ?
    Can you try to make all your SSIS variables upper case, it helped me on earlier versions of BPC.
    Be aware too that if you have an instruction like GLOBAL(STR,some_value), BPC will do a string replacement within the MODIFYSCRIPT variable  : "STR" -> "some_value".
    for example :
    GLOBAL(STR,some_value)
    TASK(STR TSK,....) will be replaced by TASK(some_value, ....).
    Vladimir.

  • How do I set global variables for use by ALL form1.#subform[0] items?

    Hi All,
    I know how to code javascript but am new to Adobe LiveCycle.  When I open script editor, I have the following code (all code is in un-bolded):
    ----- form1.#subform[0]::initialize: - (FormCalc, client) ------------------------------------------
    // BEGIN: SET GLOBAL PRICES //
    var Cityscope_Sydney_CostUser1 = 60.39;
    var Cityscope_Sydney_CostUsers2to5 = 3.02;
    var Cityscope_Sydney_CostUsers6to20 = 1.21;
    var Cityscope_Sydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_Sydney_CostHardCopyWithoutOnline = 54.67;
    var Cityscope_Sydney_CostHardCopyAdditional = 14.59;
    var Cityscope_NorthSydney_CostUser1 = 48.40;
    var Cityscope_NorthSydney_CostUsers2to5 = 2.42;
    var Cityscope_NorthSydney_CostUsers6to20 = 0.97;
    var Cityscope_NorthSydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_NorthSydney_CostHardCopyWithoutOnline = 43.54;
    var Cityscope_NorthSydney_CostHardCopyAdditional = 14.59;
    // END: SET GLOBAL PRICES //
    ----- form1.#subform[0]::enter: - (FormCalc, client) -----------------------------------------------
    ----- form1.#subform[0]::exit: - (FormCalc, client) ------------------------------------------------
    ----- form1.#subform[0]::calculate: - (FormCalc, client) -------------------------------------------
    ----- form1.#subform[0]::validate: - (FormCalc, client) --------------------------------------------
    ----- form1.#subform[0]::preSave - (FormCalc, client) ----------------------------------------------
    <<======= etc etc etc =======>>
    ----- form1.#subform[0].Item1Cost::initialize: - (JavaScript, client) ------------------------------
    ----- form1.#subform[0].Item1Cost::enter: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Cost::exit: - (FormCalc, client) --------------------------------------
    ----- form1.#subform[0].Item1Cost::calculate: - (JavaScript, client) -------------------------------
    //Store form values in user-friendly names.
    var AreaSelected = Item1Area.rawValue;
    var NumberOfUsersSelected = Item1Users.rawValue;
    //Declare other vars.
    var Users1Calculation;
    var Users2to5Calculation;
    var Users6to20Calculation;
    //Calculate individual User Cost "components" based on number of users selected for the area.
    switch(true)
    case (NumberOfUsersSelected < 2):
      Users1Calculation = NumberOfUsersSelected * Cityscope_Sydney_CostUser1;
      Users2to5Calculation = 0.00;
      Users6to20Calculation = 0.00;
      break;
    case (NumberOfUsersSelected > 1 && NumberOfUsersSelected < 6):
      Users1Calculation = Cityscope_Sydney_CostUser1;
      Users2to5Calculation = (NumberOfUsersSelected - 1) * Cityscope_Sydney_CostUsers2to5;
      Users6to20Calculation = 0.00;
      break;
    case (NumberOfUsersSelected > 5):
      Users1Calculation = Cityscope_Sydney_CostUser1;
      Users2to5Calculation = 4 * Cityscope_Sydney_CostUsers2to5;
      Users6to20Calculation = (NumberOfUsersSelected - 5) * Cityscope_Sydney_CostUsers6to20;
      break;
    default:
      alert("BROKEN: Calculate individual User Cost components based on number of users selected for the area.");
    //apply total cost for this item
    Item1Cost.rawValue = Users1Calculation + Users2to5Calculation + Users6to20Calculation;
    ----- form1.#subform[0].Item1Cost::validate: - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Cost::mouseEnter: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Cost::mouseExit: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::change: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Cost::full: - (FormCalc, client) --------------------------------------
    ----- form1.#subform[0].Item1Cost::mouseUp: - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::mouseDown: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::click: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Cost::preSave - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Cost::postSave - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::prePrint - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::postPrint - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Cost::preSubmit:form - (FormCalc, client) -----------------------------
    ----- form1.#subform[0].Item1Cost::docReady - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::docClose - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::ready:form - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::ready:layout - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::initialize: - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::enter: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Users::exit: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Users::calculate: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::validate: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Users::mouseEnter: - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::mouseExit: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::change: - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Users::full: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Users::mouseUp: - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::mouseDown: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::click: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Users::preSave - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Users::postSave - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::prePrint - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::postPrint - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Users::preSubmit:form - (FormCalc, client) ----------------------------
    ----- form1.#subform[0].Item1Users::docReady - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::docClose - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::ready:form - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::ready:layout - (FormCalc, client) ------------------------------
    ...and so on and so forth....
    In short, I want the code within:
    ----- form1.#subform[0].Item1Cost::calculate: - (JavaScript, client) -------------------------------
    ...to be able to access the variables I have created in:
    ----- form1.#subform[0]::initialize: - (FormCalc, client) ------------------------------------------
    (I have assumed that this is where I would store Global variables)
    At this stage, the global variables cannot be accessed with the configuration above.  The only was I can get this to work is to cut and paste the global vairables into each form1.#subform[0] item, which of course defeats the purpose of global variables!  I plan to have many more items so would not want to duplicate the global variables for all of them!
    Can somebody show me how to do this?
    Any help is very much appreciated!
    Thanks
    Stanbridge
    Message was edited by: stanbridgej - colors and or fonts won't save.  Have bolded my question to make code (non-bolded) easier to read (I hope).

    Hi MorisTM,
    Thanks for the reply!
    Yes, I saw that option (I should have mentioned I already knew about it), but was wondering if there is a way I can do this via code.
    There are two reason I want to be able to do it via code (only one of which may be valid):
    1) I can automatically generate my pricing code form another inhouse app.
    2) I am hoping that later on once I get this working I will be able take it a step further and get the data directly from a MySQL database!
    Cheers though!
    Any other suggestions?
    Regards,
    Stanbridge

  • Using a Meter control in LV Touch Panel, and using shared variables that are custom controls.

    I Just started using LV touch Panel module with an NI TPC-2106.
    I have two differenct problems:
    1) I was planning on using the "Meter" control quite a bit. I can set up the meter exactly how I like on the host PC, but on the touch Panel computer it seems to ignore my adjustments, mainly the start and end of the scale - i.e. I would like control to run from 0 to 360 with 0 straight up, using the entire circle. However, on the Touch panel computer it always puts 0 at about 7 o'clock and 360 at about 5 o'clock. I have also tried adding markers to no avail.
    2) I am communicating with a compact fieldpoint controller. I can creat a shared variable that is a simple double with no problems. However, I have some shared variables that use a custom control for the variable type - bascially a cluster with a couble doubles, a time stamp, and an enumeration. It lets me drag the shared variable into my diagram, but it seems to ignore it when I run it.

    Ipshita_C,
    - I am using LV 8.6.1f1and LV Touch Panel 8.6.1.
    - I have attached a simplified VI that shows how I want to use the meter. Notice that the placement of the endpoitns does not work correctly on the touch panel, and that it ignores the arbitrary markers that I placed.
    - I also have included an XY graph control that displays on the TPC with margins around the graph area that I removed from the graph control.
    - For the shared variable, it appears to be an issue related to the touch panel, not fieldpoint. I found another thread in this forum that mentioned that clusters containing Enumerations do not work in shared variables on the touch panel. I changed the enumeration to an integer and it now works fine.
    In general, there seem to be a disappointing number of limitations in the touch panel implementation. My biggest concern is that I have not found any documentation from NI that lists these limitations. I seem to have to try things out and see what works and what does not work. Can you point me to a comprehensive list of touch panel modules limitations?
    Attachments:
    test 2.vi ‏10 KB

Maybe you are looking for

  • My cat sat on my keyboard and now my desktop display looks like it is in night vision with color. How do I get it back to it's original display?

    My cat sat on my keyboard and changed the display. Now the coloration and brightness looks like it is in night vision with a bit of color. It is similar to one of the photo booth effect options. How do I get it back to normal?

  • How to include NI-SPY in the Deployment system

    Hello, I would like to include the NiSpy in the deployment system I'm making. I included all the files in the 'C:\Program Files\National Instruments\NI Spy' directory and the 'nispylog.dll' located in the 'c:\winNT\system32\' directory. The program i

  • IDoc (Control Record) RCVPOR

    Hi, I'm posting an IDoc from XI to R/3 and field RCVPOR is coming out blank. In the documentation, it says that it should be populated from the Port value in the receiver IDoc adapter. Any Idea why it's blank? It is there in the receiver IDoc adapter

  • Colour filters for RGB separation?

    I want to colour-separate an image to create false-colour - start with a UV-only photo matched with an RGB photo, then separate the B & G of the RGB so I can map UV to B, B to G and G to R as insects see things. The images are film, not digital raw.

  • Location of Autoextend.sql

    Hi , We have completed a R12 installation. As part of the post-installation steps, I have come across the following " autoextend-sql This must be run after database installation is complete or later. The script ensures that that the files can expand