9 Replies Latest reply on Oct 10, 2010 3:12 PM by DFBurns

    please a simple exemple




      I'm very new in LUA / SDK


      I create a plugin, but i have a problem with variable...


      I have created a selection dialog


      f:group_box { -- the buttons in this container make a set
                                  title = "Choix de destination",
                                  fill_horizontal = 1,
                                  spacing = f:control_spacing(),
                                  f:radio_button {
                                  title = "destination 1",
                                  value = bind 'ego_dest', -- all of the buttons bound to the same key
                                  checked_value = 'c:/Ego1/',
                                  destination = 'c:/Ego1/',
                                  f:radio_button {
                                  title = "destination 2",
                                  value = bind 'ego_dest',
                                  checked_value = 'c:/Ego2/',
                                  destination = 'c:/Ego2/',
                                  f:radio_button {
                                  title = "destination 3",
                                  value = bind 'ego_dest',
                                  checked_value = 'c:/Ego3/',
                                  destination =  'c:/Ego3/',
                                  f:static_text {
                                  fill_horizontal = 1,
                                  title = bind 'ego_dest',

                          dest = bind 'ego_dest',



      But if I use the result for choose my path

      ( filenamedisk =  dest .. filename)

      the error is

      ExportServiceProvider.lua"]:516: attempt to index global 'data1' (a nil value)


      Why ? normaly variable is global and des contain a response ?


      I dont understand



        • 1. Re: please a simple exemple
          cadret Level 1

          Hy have test with


              propertyTable:addObserver( 'chemin'),
                                      propertyTable.chemin = dest


          but same result, I read, and read the doc, and explore the code form plugin exemple, but....

          • 2. Re: please a simple exemple
            areohbee Level 6

            Hi cadret,


            I'd suggest studying Lua, plugin API, SDK guide, some more samples/examples...


            It seems like you are still missing some fundamental concepts.


            There are samples in the SDK, and all of the plugins on my website provide source-code.




            Lua documentation at www.lua.org



            • 3. Re: please a simple exemple
              cadret Level 1

              Thanks for the link Rob, I go to school...  :-)

              • 4. Re: please a simple exemple
                SeanMcCormack Adobe Community Professional

                Hi Rob,

                Can I make a suggestion to you? You spend so much time posting here for what seems to be into the ether at times, why not consider devoting some of that time to blogging and building a body for reference work for would be developers? God knows the SDK lacks a lot of sample code and is downright awkward at times.


                • 5. Re: please a simple exemple
                  DFBurns Level 1

                  Sean -


                  I've wondered the same thing. It has occurred to me that, at the risk of competing with any online doc from Adobe, it may be helpful to take a lot of stuff from this forum and put it in different form.


                  Rob -


                  What would you think of setting up a space on a service like Assembla.com? They're one of the top services that does hosting of wiki, version control, ticketing, etc. I use them for professional work but they offer their service for free to open-source projects. You/we could set up a space there, use the Wiki to host FAQs, describe techniques, etc. You can store demo code in version control, etc. Not sure if you want to take it on. I'd be willing to help.


                  If you want to know more, ask here or feel free to contact me offline. (I don't shill for them - just a satisfied customer.)



                  1 person found this helpful
                  • 6. Re: please a simple exemple
                    areohbee Level 6

                    Thanks Sean/DFBurns - let me cogitate on those ideas a bit...



                    1 person found this helpful
                    • 7. Re: please a simple exemple
                      areohbee Level 6

                      Question for Sean and DB and anybody else listening:


                      "How much participation are people besides me willing to offer as far as adding content - source code, tips & tricks, in-depth documentation and design ideas, FAQ..." ???


                      I mean if its gonna be 100% me I'm not sure I want the job. If its gonna take off like wikipedia and become a really cool and growing online Lr plugin development reference and resource with 100s of contributors (or even dozens...), then it would be more appealing...


                      It does seem like a good idea to organize our collective body of accumulating plugin development knowlege in a more referencable form than the forum. I'm just not sure how it'll work out in practice. I suppose we could try and if it falls flat just tear it down...



                      • 8. Re: please a simple exemple
                        SeanMcCormack Adobe Community Professional

                        I'm happy to add web related code, which is what I know well.

                        • 9. Re: please a simple exemple
                          DFBurns Level 1

                          Rob - Very much want to keep this idea alive but I've been out of the country on vacation and will be back on the 18th.


                          My take, short version: definitely not 100% you although, given that you are one of the most active here, you are likely to be a major contributor. I think if the 'infrastructure' is there, people will be likely to help build it but no way to know without taking the plunge and trying. I'm willing to own it and get things started. Time will tell.