7 Replies Latest reply on Mar 7, 2016 12:35 AM by Toto RoToTO

    dialog implemented as control bar?

    Rick E Johnson Level 1

      Would it be practical to implement a dialog as a control bar for a purpose such as a more elegant About box than the SDK provides or for a user registration/licensing dialog? It might be easier than creating Xcode/Cocoa windows to integrate into the Illustrator API and it would automatically pick up the UI theme color.

       

      I've seen panels used for this purpose and would rather avoid that.

       

      I sure miss ADM!

        • 1. Re: dialog implemented as control bar?
          Toto RoToTO Level 3

          Hi,

          you could use Qt or an other third party library to do that. (Qt is running on Windows and Mac).

           

          But I would rather use HTML extension to complete such a task.

          Simplest and quickest.

           

          Thomas.

          • 2. Re: dialog implemented as control bar?
            Rick E Johnson Level 1

            Thanks, Thomas,

             

            I hadn't heard anything for a while and figured Control Bar dialogs must be a pretty weird approach.

             

            I've looked at Flex, Qt, and HTML, but they all seem very cryptic and poorly documented, at least as far as creating controls for AI. I'm an illustrator by trade (AI is my main tool, and the reason I write plugins) and have no exposure to any of these tools or anybody who uses them. As much as I'd prefer a cross-platform solution (ADM rocked), I've not been able to find a tutorial on using any of these for AI plugins. So far I've been successful with panels and dialogs with Xcode (although dialogs may not so easily adapt to users' dark UI themes), and will try Visual Studio's resource editor I'm starting (again) with CS6, so I expect that the rules for recent or future CC releases could change everything.

             

            I once wrote a tutorial on the web to do cross-platform AI plugin development with CodeWarrior, and hope someone will do the same for their post-ADM AI plugin peers...

             

            Rick

            • 3. Re: dialog implemented as control bar?
              Rick E Johnson Level 1

              I see the TwirlFilter sample project (CS6) has a dialog and apparently doesn't use a 3rd party UI (there's a UI folder, but it's empty).

               

              I'd like to study it as a model to create my own dialogs, but can't get it to build with Xcode 7 under El Capitan.The fatal error seems to be that "illustratorSDK.h" can't find the header file <carbon.h> even though I include in the header search paths the entire path to carbon.h deep inside of the Xcode.app contents. That worked with the EmptyPanel sample. Have others had success running the TwirlFilter sample plugin with Xcode 7?

              • 4. Re: dialog implemented as control bar?
                Toto RoToTO Level 3

                Hi,

                If you want to build CS6 plugin with Xcode 6 (or later) you will have to take a look at this:

                https://github.com/devernay/xcodelegacy

                 

                In the latest revision of Xcode, many components had been removed. Those were useful to build CS6 plugin.

                Follow the instructions described in that link. This will add those components.

                Then you should be able to compile CS5 - CS6 plugins.

                 

                CS5 - CS6: Extensions are made using Adobe Flex,

                CC: Extensions are made using HTML/JavaScript.

                 

                Thomas.

                • 5. Re: dialog implemented as control bar?
                  LeoTaro Level 4

                  Try replacing

                   

                  #ifdef MAC_ENV

                    #include <Carbon.h>

                  #endif

                   

                  with

                   

                  #ifdef MAC_ENV

                      #include <CoreFoundation/CoreFoundation.h>

                  #endif

                   

                  (This is from the IllustratorSDK.h in the CC version of the SDK)

                  • 6. Re: dialog implemented as control bar?
                    Rick E Johnson Level 1

                    Thanks, Thomas and Leo,

                     

                    I had installed XcodeLegacy and set the project to use the OS X 10.6 SDK and compiler that the project originally called for. Carbon.h was indeed located here:

                     

                    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX 10.6.sdk/Developer/Headers/FlatCarbon/

                     

                    ...but even if I add that to the header search paths, it still complains that it can't find it.

                     

                    I tried #include <CoreFoundation/CoreFoundation.h> and it solved the missing Carbon.h problem, but when building the TwirlFilter sample I now get:

                     

                         Command /Applications/Xcode.app/Contents/Developer/usr/bin/Rez failed with exit code 2

                     

                    Perhaps my best bet is to just wipe the hard drive of my 2008 MacBook Pro and reinstall Leopard to work there. I'd sure miss the speed and screen size of the iMac, but I may have to accept that I've been away from plugin development too many years and too much has changed in every aspect of it (hardware, OS, API, compiler, etc.).

                     

                    Anyway, this thread is going off on tangents, but my doubt about using ControlBars as dialogs is confirmed.

                     

                    Maybe someday someone will write a tutorial of what they've figured out about HTML5 for Illustrator, similar to the one I wrote on CodeWarrior:

                     

                    Cross-platform development with CodeWarrior on Mac OS X