Jump to content


Photo
* * * * * 1 votes

Add a preferences category


  • Please log in to reply
25 replies to this topic

#21 crelf

crelf

    I'm a LAVA, not a fighter.

  • V I Engineering, Inc.
  • 5,773 posts
  • Version:LabVIEW 2013
  • Since:1993

Posted 27 August 2010 - 02:14 AM

Regardless of which method you choose to store the data in the app (class, globals, cluster), persisting the data is fairly easy:

My version of the preferences dialog uses the OpenG panel to disk VIs, and they work great. I'll try to post an example tomorrow, if someone reminds me with a PM...

crelf

 

 

Copyright 2004-2014 Christopher G. Relf. Some Rights Reserved.  This posting is licensed under a Creative Commons Attribution 2.5 License.


#22 Aristos Queue

Aristos Queue

    LV R&D: I write C++/# so you don't have to.

  • Members
  • PipPipPipPipPipPip
  • 2,782 posts
  • Location:Austin, TX
  • Version:LabVIEW 2011
  • Since:2000

Posted 27 August 2010 - 03:08 AM

Is this a good Idea - or are there reasons not to do this?

Making it a symbolic path would encourage you users to link against it. If you thought we were cavalier about changing VIs in vi.lib that aren't in the palettes, that's nothing compared to what we feel free to do to the Resources directory. ;-)

#23 jgcode

jgcode

    LabVIEW Renegade

  • OpenG
  • PipPipPipPipPipPip
  • 2,406 posts
  • Location:Australia
  • Version:LabVIEW 2009
  • Since:2005

Posted 27 August 2010 - 03:23 AM

Making it a symbolic path would encourage you users to link against it. If you thought we were cavalier about changing VIs in vi.lib that aren't in the palettes, that's nothing compared to what we feel free to do to the Resources directory. ;-)



lol

#24 Christian_L

Christian_L

    Very Active

  • NI
  • 67 posts
  • Location:Austin, TX
  • Version:LabVIEW 2010
  • Since:1993

Posted 27 August 2010 - 10:45 PM

I posted a new version of the code on NI Community including a VI package.

Changes in the code:
  • Reverted version number from 1.0 to 0.2
  • Added VI package distribution
  • Moved all dialog subVIs from LV resource folder into package
  • Added support to show/hide Help button and specify dialog help file
  • Moved API and framework into LV project library
  • VIs install to ..\user.lib\ODF
  • Added subpalette to User Libraries in Function Palette
http://decibel.ni.co.../docs/DOC-13146
  • imfirefly likes this

Christian Loew, CLA


Principal Systems Engineer - Embedded Systems and Industrial Applications - National Instruments


#25 imfirefly

imfirefly

    I've come back for more.

  • Members
  • 2 posts
  • Version:LabVIEW 2011
  • Since:2011

Posted 02 September 2013 - 02:07 AM

I picked up this discussion on a thread over at NI Community and wanted to provide some input.

Reusing the LabVIEW options (preferences) dialog framework to create your own custom dialog for your application, along the lines of crelf's use case, is fairly simple and I will post a couple of VIs and an example in a day or two that provide a wrapper around PreferencesDialog.vi and a slightly updated template to build your own options pages.

Note: I prefer the term options to preferences so in general I will use that name.

Adding you own pages into the LabVIEW options dialog alongside the existing options pages is a bit more involved as stated in this thread. If you add your own pages and want to load/save your settings (which obviously you do) you need to explicitly add code in your options page VIs to do this. The framework will not handle that for you. The framework uses the TagSet/PropertyBag refnum for this purpose, but you will not be able to piggyback on this, at least not now.

We are discussing ways to allow LV add-on developers to add their own entries in the LabVIEW options dialog in the future, so stay tuned.

Excellent Work! But I can't replace some text prompt or labels on the dialog for localization. At present, we can only custom the "OK" button label.

 

Here it is:

 2013-09-02_095110.jpg

 

Below lies the NI option dialog in Chinese.

2013-09-02_095150.jpg



#26 Aristos Queue

Aristos Queue

    LV R&D: I write C++/# so you don't have to.

  • Members
  • PipPipPipPipPipPip
  • 2,782 posts
  • Location:Austin, TX
  • Version:LabVIEW 2011
  • Since:2000

Posted 03 September 2013 - 11:32 AM

imfirefly: Can you describe your localization process? I might be able to get one of our localization engineers to compare yours against ours and see if he/she can highlight some difference.