IDCS5 Win Obtaining dynamic widgetid

Hi all:
   I have a requirement to build some controls at runtime.  I figured out how to actually do what I need to do, but I don't know how to dynamically calculate a widgetid.  The best I know how to do (and it feels clumsy and inelegant) is to set aside a block of widgetids for this procecss and then just use them as I need  them.I looked for some SDK function that would be able to provide me a widgetid at runtime, but came up blank.
   I don't like this solution.  Is there a better one?
R,
John

There is no need to assign unique widget IDs. Instead, use the indexed methods of panelcontroldata, and store your ID in a separate interface. The tree view does exactly that - see NodeID / NodeIDData.
Dirk

Similar Messages

  • "timed out obtaining dynamic link server connection" in After Effects

    Hi!
    I can't use the warp stabilizer or the Track Camera function, it stops after a while and produces the "timed out obtaining dynamic link server connection" error. Regardless of footage, and I have disabled all firewall software.

    Hi, i have the same issue in After Effects CC, i have tried the "run as administrator" solution above and it is still saying "timed out obtaining dynamic link server connection". i have windows 8 64bit

  • After Effects, Track camera unable to obtain dynamic link server connection

    This has been hit and miss. I am now consistenly getting a dynamic link server connection trying to use Track camera in After Effects.
    64GB RAN
    Windows 7 proffesional
    i7 processor
    NVIDIA GEFORCE TITAN
    I have enabled all the recommended programs through my firewall. I see the dynamiclink server is running in my task manager, I have closed all other programs, no antivirus, I have restarted my computer, no luck with this.
    Also to add additional information:
    It seems that when I try to do replace with After Effects composition in Premiere Pro I am getting error: The importer reported a generic error
    and also when I first launch After effects I am getting a failure to load a few plugins from CineForm including importer

    cokkio wrote:
    Hi guys,
    I have the same problem but my system is:
    Os X 10.9.5 - Macbook Pro Retina - NVIDIA GeForce GT 650M 1024 MB
    After Effect 13.1.1.3
    No antivirus or firewall running.
    Any suggestion or the only way is to unistall, run adobe CC cleaner and reinstall? I'm in the middle of a project, quite in a hurry, and I prefer to avoid it if possible.
    While I normally don't suggest too many changes in the middle of a project, have you considered updating to the latest version of AE? 13.2 released a couple of days ago. If the update messes you up, you were going to need to uninstall, run the CC Cleaner, and reinstall anyway...

  • IDCS5 Win IPrintData message

    Hello everyone:
       In my code I have these lines:
          //  PrintInfo is an  IPrintData object...this line compiles without a problem.
      PrintInfo -> SetPSLangLevel(IPrintData::kPSLangLevel_3); 
      PrintInfo -> Validate();
    When I execute the latter line I get this message in the Debug version of CS5 Win:
    Print:  Invalid PostScript level string!/PrintDeviceInfo.cpp (1134)
    Does anyone know what this is all about?
    R,
    John

    Hello everyone:
       In my code I have these lines:
          //  PrintInfo is an  IPrintData object...this line compiles without a problem.
      PrintInfo -> SetPSLangLevel(IPrintData::kPSLangLevel_3); 
      PrintInfo -> Validate();
    When I execute the latter line I get this message in the Debug version of CS5 Win:
    Print:  Invalid PostScript level string!/PrintDeviceInfo.cpp (1134)
    Does anyone know what this is all about?
    R,
    John

  • IDCS5 Win:StaticTextWidget

    I needed to use a StaticTextWidget but a Windows search of the SDK provided me with no examples from which to copy, so I turned to Widgets.fh to see how it is made.  According to the Widgets.fh file, StaticTextWidget consists of these components in this order:
    CControlView
    StaticTextAttributes
    CTextControlData
    AssociatedWidgetAttributes
    Further research provided me with this information:
    CControlData requires these fields:
        longint;        // fWidgetId
        PMRsrcID;        // fRsrcId, fRsrcPlugin
        integer;        // fFrameBinding
        Frame;            // fFrame
        integer;        // fVisible
        integer;        // fEnabled
    StaticTextAttributes requires these fields:
        integer;        // fAlignment
        integer;        // ellipsize style -- where to ellipsize the string if the size is larger than its frame
        integer;        // fConvertAmpersandsToUnderline                   
        integer = kFalse;        // underline text
    CTextControlData requires this field:
        PlatformPMString;        // control label
    and finally, AssociatedWidgetAttributes required these two fields:
        longint;        // WidgetId for associated control for shortcut focus
        longint = 0;    // ActionId for associated action w
    When I put them all together I got this:
        longint;        // fWidgetId
        PMRsrcID;        // fRsrcId, fRsrcPlugin
        integer;        // fFrameBinding
        Frame;            // fFrame
        integer;        // fVisible
        integer;        // fEnabled
        integer;        // fAlignment
        integer;        // ellipsize style -- where to ellipsize the string if the size is larger than its frame
        integer;        // fConvertAmpersandsToUnderline                   
        integer = kFalse;        // underline text                   
        PlatformPMString;        // control label
        longint;        // WidgetId for associated control for shortcut focus
        longint = 0;    // ActionId for associated action w
    but when I used this specification and attempted to compile the FR file, I got an error.  After about an hour of experimentation, I came up with this for the actual fields I need to use (note the three fields that are commented out.
          StaticTextWidget
             kIEUI01WidgetID,                                   // WidgetId
             kSysStaticTextPMRsrcId,                            // RsrcId
             kBindNone,                                         // Frame binding
             Frame(30,10,300, 30 ),                             // Frame (l,t,r,b)
             kTrue,                                             // Visible
             kTrue,                                             // Enabled
             kAlignRight,                                       // Alignment
             kDontEllipsize,                                    // don't add any ellipses
             kFalse,
             kIEUISomeTextKey,                                  //  The text.
             //kTrue,        
             //kTrue,        
             //kInvalidWidgetID,                                 // WidgetID for associated shortcut ctrl
             0,
    Where did I go wrong in interpreting Widgets.fh?
    R,
    John

    John--
    Fields with assignment in their type declarations (like "integer = kFalse") are constant and can't be set when used. So those fields (2 in this case, underline and actionID) would not have entries in your StaticTextWidget. I'm not sure where the two kTrues came from after the control label field, but really there should only be a widgetID after the widget's label, like:
             kDontEllipsize,                                      // don't add any ellipses
             kFalse,                                                 // convert ampersands
             kIEUISomeTextKey,                              //  The text.
             kInvalidWidgetID,                                  // WidgetID for associated shortcut ctrl
    There are many uses of StaticTextWidget in the SDK. See sdksamples/framelabelui/FrmLblUI.fr for a few.
    HTH,
    Chris Roueche / Freelance Developer

  • IDCS5-win. Error while running a script from indesign(not via estk)

    Hi all,
    After running the script from indesign, I get following error
    ASSERT '(engine->getDebugFlags() & ScScript::kExtendedErrors) == ScScript::kExtendedErrors' in ..\..\..\source\components\script\javascript\JavaScriptRunner.cpp at line 412 failed.
    ..\..\..\source\components\script\javascript\JavaScriptRunner.cpp (412)
    any idea about this?
    The script runs fine when run from ES tool kit.
    Thanks

    Hi,
    My colleague found the problem. We were using extendables library and we still haven't figured out what was actually happening, but removing it solved the problem.

  • IDCS5 Win: Flowing text, revisited...

    I have found that my problem is that the code I am using to import tagged text is importing the text into a textbox that it creates rather than the pre-existing text box. Additionally, almost every example I have seen that comes with the SDK either deals with graphics or shows me how to load text into a textbox created by the load process (as opposed to a pre-existing textbox).
    Does anyone have a suggestion as to how I might load the tagged text into a text box that already exists?   There is a kPlaceItemInGraphicFrameCmdBoss.  Is there a text equivalent in the SDK?

    Hi John
    IStaticTextAttributes you can use to set the underline attribute (and other attributes) outside of your StaticTextView implementation.
    When you set that, then inside of your Draw method you can read what was set (GetDrawUnderline()) and apply that value in PMDrawStringRGB.
    So, you should respect assigned values to IStaticTextAttributes
    void CYOURTextWidgetView::Draw(IViewPort* vp, SysRgn sr)
         InterfacePtr<IStaticTextAttributes> ista(this, UseDefaultIID());
         int16 alignment = ista->GetAlignment();
         bool16 underline = ista->GetDrawUnderLine();
         PMDrawStringRGB(gc, bbox, alignment, str, fi, color, catu, cv, underline);
    Regards
    Bartek

  • IDCS5 Win: Panel Tree View sort order

    Hello everyone:
    I have a panel tree view that is displaying document names in a backward sort order.   When I say that I mean that the sort order is as so:
    5
    4
    3
    2
    1
    as opposed to
    1
    2
    3
    4
    5
    I have stepped through the code and in the Adapter, they are geting placed into the string list in the latter order i.e. 1,2,3,4,5).  What could be causing this reverse sort order?
    R,
    John

    Yes, if the Track Number field is empty in the File Info dialog, for all files in the Files panel, then Audition will revert to "Recent Access" sorting.
    There is no relationship between this File Info: Track Number, and the track number you see in the CD View.
    I understand your confusion. However, note that it is possible to add the same file (from the Files panel) to the CD View track list. So imagine you have "My Song.wav" in the Files panel. And then added it to the CD view track list at track positions 1, 3, and 5. If we were to sort the Files panel by track number as they appear in the CD View, then which track would be associated with "My Song.wav"? Track 1, 3, or 5?
    This feature was added primarily as an enhancement to the typical CD ripping (File > Extract Audio From CD) workflow. After ripping audio tracks, the resulting files that appear in your Files panel will be tagged with a Track Number. It is usually handy to sort by this CD track title rather than by filename or other sorting option.

  • IDCS5 Win Linking problem

    I would like to try submitting this again to the forum.
    I have a problem linking a UI plugin.  It's a Win32 plugin but I am getting this error at link time:
    ..\objD\NuTest\NuTActionComponent.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
    I encountered this problem:
    1.)  On a plugin I am trying to convert from CS4 to CS5,
    2.)  On freshly created plugin code created by DollyXS with no changes whatsoever made to the code or project, and,
    3.)  When I attempted to compile one of the sample plugins.
    This suggests a setting in Visual Studio that needs to be correctly set, but I am at a loss to figure out what it is.  does anyone have any ideas where to look?
    TIA!
    John
    P.S.  This is what the online help has to say about this error:
    The object files specified as input were compiled for different machine  types.
    For example, if you try to link an object file compiled with /clr and  an object file compiled with /clr:pure (machine type CEE), the linker  will generate LNK1112.
    Similarly, if you create one module with the x64 compiler and another module  with the x86 compiler, and try to link them, the linker will generate  LNK1112.

    I have found an answer though I am not sure it is the best answer, but it is an answer that works.  I downloaded a trial version of VS 2008 Professional (I was originally using Standard).  After cleaning all test projects and recompiling/relinking, this error went away.
    Was there anyone out there who was successfully using VS 2008 Standard?  At this point, I am more curious than anything else.
    R,
    John

  • IDCS5 Win - Printing a PDF

    I am writing a plugin that will print individual pages to their own PDF files.  I actually have that code down pretty well.
    What I am facing is the requirement to place a small certification logo on the pasteboard (approx.  36 points by 72 points) right above the left-most corner of the page.  I have placed the logo without a problem, but when I print the page, the logo is not printed.
    1.)  I know if I increase bleed when printing to a PostScript file I can capture objects laying on the pasteboard, but I can see no way to do that using the IPDFExportPrefs interface.
    2.)  I tried using the IPDFExportPrefs::SetIncludeSlug() call, but it didn't help.
    Does anyone know how to get an object on the pasteboard to print to a PDF file?
    TIA
    John

    You need to set the slug box offsets.
    Use IPageSetupPrefs::SetSlugBoxPref().

  • IDCS5 Win:PanellTreeView problems...

    I have built a dialog that includes a paneltreeview.  When the dialog first appears the listbox looks just fine, with all three expected records showing up.  If, however, I click the dialog closed, and then reopen it on the same record (or for that matter, any other record), I get the following error:
    Node("Override NodeID::GetDescription() to provide useful information here") passed to NodeAdded() does not return a valid index when calling GetChildIndex( Node("Override NodeID::GetDescription() to provide useful information here"), Node("Override NodeID::GetDescription() to provide useful information here") ) on it's parent
    This is a two-level paneltreeview: the Root level and the next level where all the page numbers are listed.  The page numbers have no children.
    Stepping through the code, I find that the first execution of the dialog takes the program through the hierarchy adapter. The second execution of the dialog, however, does not.  Instead it goes through this code:
    bool16 IEUIEditNameDialogController::FillTreeView()
       MAKE_DB_POINTER;
       RowManager *Rows = RowManager::GetRowManager();
       //Rows->Reporter();
       PMString    DataPt;
       do
          InterfacePtr<IPanelControlData> PanelData(this, UseDefaultIID());
          IControlView *TreeView = PanelData -> FindWidget(kIEUIEditNamePageListboxWidgetID);
           InterfacePtr<ITreeViewMgr> TreeMgr(TreeView,   UseDefaultIID());
          TreeMgr ->  ClearTree(kTrue);
          TreeMgr -> ChangeRoot();
          InterfacePtr<IStringListData> ListData(TreeView, IID_ISTRINGLISTDATA);
          K2Vector<PMString> lists = ListData -> GetStringList();
          int ListSize = lists.size();
          if(ListSize > 0)
             while(ListSize > 0)
                PMString Data = lists.back();
                TreeMgr -> BeforeNodeDeleted(IEUIEditNameCmpNodeID::Create(Data));
                lists.pop_back();
                ListSize--;
          //  Provides me with a list of page numbers looking like this:  1, 3, 5
          PMString ThePages = CurrentNameRecord->second.GetPageList();
          //  Something is wrong if this happens.
          if(ThePages.empty())
             break;
          int RowCount = 0;
          while(1)
             //  Chop off a page.
             int CharIndex = ThePages.IndexOfCharacter(',');
             if(CharIndex == -1 && !ThePages.empty())
                DataPt = ThePages;
                ThePages.clear();
                //break;
             else
                PMString *p = ThePages.Substring(0, CharIndex);
                DataPt = *p;
                delete p;
                ThePages.Remove(0, CharIndex + 1);
             //  The design manager required the listbox to be "banded" (i.e. alternate gray & white background for the rows)
             //  This facilitates that.
             DataPt += "^^";
             DataPt.AppendNumber(RowCount++);
             K2Vector<PMString>::const_iterator iter = std::find(lists.begin(), lists.end(), DataPt);
             if(iter == lists.end())
                  lists.insert(lists.begin(), DataPt);
                //  This also helps manage the banding effect.
                Rows ->     Add();
                Rows -> Refresh();
                  //make sure that the node added has been processed
                NodeID node = IEUIEditNameCmpNodeID::Create(DataPt);
                //  This is where I get the errlr.
                TreeMgr -> NodeAdded(node);
             if(ThePages.empty())
                break;
          ListData -> SetStringList(lists);
          TreeMgr  ->         ChangeRoot();
       } while(kFalse);
       return kTrue;
    I have done a search of all my code and cannot find an implementation of "GetChildIndex" anywhere.
    I've been working on this bug for two days now.  Does anyone see where I might be going wrong?
    R,
    John

    Dirk:
       I apologize for not being clearer on what my troubles are.  I have no problem initializing the PanelTreeView the first time through.  What happens is that if I call up the dialog, then dismiss the dialog, then leave the plugin then come back into the plugin and recall the dialog, the data from the previous run still populates the listbox, despite the fact that the data has changed.  I even call ChangeRoot() but it does little.  Putting a breakpoint in the HierarchyAdapter confirms that the list is not refreshed through it.
       I finally wrote code that simply deletes all records in the list box, adds the new records and then calls ChangeRoot().  That seems to work.  If there is no other more elegant way, then so be it.
       Thanks nevertheless for your input.  Take care.
    John

  • IDCS5 Win - changing mouse cursor

    At times I have code that processes a lot of data in ways that are not amenable to progress bars (for example, saving a single, large file to disk).  During those times I would like to change the cursor from its standard arrow to another standard such as an hourglass.  I see lots of general documentation on changing cursors that are specially made, but nothing that describes the process for changing from one standard cursor shape to another.  Nor is there any sample code/snippets that demonstrate the procedure, as far as I could find.  Does anyone have a suggestion where to look or what boss to use to change a mouse cursor from one icon to another?
    TIA!
    John

    I took a quick look at the header file and it all seems waay too simple.  Are you sure you're talking InDesign here? (grin).
    Thanks Dirk.  This is what I was looking for.
    R,
    John

  • IDCS5 Win:More PanellTreeView problems...

    Hello Fellow Coders:
       The PanelTreeView widget is probably one of the most complex widgets in the SDK.   It has a lot of opportunities to trip up the unwary programmer.
       For example, I have a plugin that uses several simple PanelTreeViews (PTV) as listboxes.  When the dialog is created the PTV uses the HierarchyAdapater to create the node list. If the data changes during the life of the plugin, it is my responsibility to change the node list; the hierarchy adapter is not called.  However, if I dismiss the plugin, delete the data, and then call the plugin back, the PTV is not recreated; the HierarchyAdapter is not recalled to rebuild the node list.  The PTV uses the node list from the last instance of the plugin being called.
       This is of course, a problem.  It means that either I am going to have to empty the PTV before leaving the plugin, or I am going to have to include code to empty and then recreate the node list if the plugin is recalled.
       Is there a more elegant solution?
    R,
    John

    Dirk:
       I apologize for not being clearer on what my troubles are.  I have no problem initializing the PanelTreeView the first time through.  What happens is that if I call up the dialog, then dismiss the dialog, then leave the plugin then come back into the plugin and recall the dialog, the data from the previous run still populates the listbox, despite the fact that the data has changed.  I even call ChangeRoot() but it does little.  Putting a breakpoint in the HierarchyAdapter confirms that the list is not refreshed through it.
       I finally wrote code that simply deletes all records in the list box, adds the new records and then calls ChangeRoot().  That seems to work.  If there is no other more elegant way, then so be it.
       Thanks nevertheless for your input.  Take care.
    John

  • IDCS5 Win K2Vector IPMFont::FontProtection question

    I have this code several places in my project:
            K2Vector<IPMFont::FontProtection>* ProtectionList = Font -> GetProtection();
            K2Vector<IPMFont::FontProtection>::iterator iter;
            for(iter = ProtectionList -> begin(); iter != ProtectionList -> end(); ++iter)
    //         do some stuff...
           delete ProtectionList;
    This code is modeled after the sample code found in the SnpInspectFontMgr.cpp sample snippet:
                    K2Vector<IPMFont::FontProtection> *fontProtection = font->GetProtection();
                    K2Vector<IPMFont::FontProtection>::iterator iter;
                    bool16 dumpInfo = !(fontProtection->size() == 1 && fontProtection->front() ==IPMFont::kNormal) ;
                    for (iter = fontProtection->begin(); iter != fontProtection->end(); ++iter)
    //                  do some stuff...
                    delete fontProtection;
    The problem is that when I include the "delete ProtectionList" line of code I get a linker error, to wit:
    error LNK2019: unresolved external symbol "public: void __thiscall K2Internals::K2VectorBase<enum IPMFont::FontProtection,class K2Allocator<enum IPMFont::FontProtection> >::DoCleanup(void)"
    If I leave out the "delete FontProtection" line of code the plugin compiles and links without errors, but I get a large number of leaks when I run it, and after several hours of careful, step-by-step, line-by-line debugging, I have definitely isolated the leaks to the missing delete call.
    Does anyone know what I am doing wrong here?
    TIA!
    John

    I found the problem.
    For those of you who are required to use K2Vector, please be advised that there is a K2Vector.tpp file that you probably should include in your code.  It has a handful of additional member functions that K2Vector may call.  I suspect that when ProtectionList calls its destructor, there is a call to one of those functions.
    I added this line to my code:
    #include              "K2Vector.tpp"
    and the linker error disappeared.
    For the record, a quick search of the SDK documentation and the K2Vector.h header makes no mention of this additional file.  I discovered that I needed it when I made a close inspection of the snippet and discovered its inclusion at that time.

  • IDCS5 Win cryptic error messages followed by crash

    I am closing down a dialog (see my earlier post) and after I step out of the Observer code but before I return to the calling code, I get these two cryptic messages, one right afer the other, followed by a crash:
    Database::CreateInstance(): Can't get classID from UID 2793 (in Database 0x4e2e308 file: InDesign SavedData)
    Database::CreateInstance(): Instantiation from UID 2793 failed.  Requested IID was IID_ISUBJECT
    What I have done so far to locate the problem:
    I reviewed all instances where my program is using "ISubmit" to ensure that so doing makes sense, both syntactically and logically.
    I reviewed the .FR file to ensure all needed defs were there.
    I removed the InDesign SavedData from its current folder to see if it would fix the problem (it did not).
    If anyone has some fresh ideas as to what I might try next I would be most pleased to hear them.
    Thanks.
    R,
    John

    Pull out your RAM sticks one at a time, try each stick in each slot, for the four possible combinations. See if that makes things better/worse/the same.
    The 1.25 ghz'r is nortoriously finnicky about memory. I went through nine sticks on mine before I got two that worked together with zero problems.
    Joe

Maybe you are looking for