[CS2/CS3] - TreeView observer attaching

Hello,     I modified a sample called WLBCmp to create a list of checkboxes, but now I want to be able to observer this checkboxes selections throught my MakeNewDialogObserver which is used to observe my entire dialog. Now I added to resources:  Class {      kBaseTreeNodeWidgetBoss,      kTreeNodeWidgetBoss,      {           IID_IOBSERVER, kMakeNewDialogObserverImpl,      } },  It't working fain, but it's creating for each checkbox in my treeview extra instance of this MakeNewDialogObserver. I need to use one observer like for all other widgets on my dialog. Please does anybody know how to attach TreeView to widget to be able to observe checkboxes changes in the TreeView ?  Thanks, marxin

You could do either:
the keyword "static" allows to share data across all instances of your class. That would be bad programming style though.
Create a new Interface, add that to the tree view widget, and use IWidgetParent from within the observers to find the interface.
It is a typical beginner error to stuff all functionality into the observer. In short, if you have "state" in the observer you're wrong.
Keep the observers lean, limit functionality to
attach/detach/receiving
in Update, decoding: cast from void* into something meaningful
dispatch into functions with speaking name e.g. handleCheckboxToggled() and there
find the responsible boss, then interface
invoke the actual functionality in that interface
Dirk

Similar Messages

  • [CS2/CS3] - TreeView - display style

    Hi, I'm trying to use TreeViewWidget to use it for isnerting rows witch CheckBoxWidget + StaticTextWidget and the problem is that the default look of TreeView is with points and numbers like you can see from screenshot bellow. Please could you help me how to change this default behaviour?
    Thanks, marxin

    Thank you for your post, it was helpfull advice, now I am able to insert into TreeView CheckBoxes.I redefined TreeViewWidgetMgr and also TreeViewHierarchyAdapter, but now I'm not familiar with adding and removing nodes, there is 10 nodes if I start Plug-In ?
    Is possible to add frame to TreeView ? My last question is about observer, how to realize which checkboxes are selected, how to save this information ?
    Thank you very much, marxin

  • [CS2/CS3] - TreeView frame & ScrollBar roller

    Hello, please could anyone advise me with 2 following probles:
    1) Is it possible to insert black frame list f.e. ListBox ?
    2) Is it possible to change size of "scroller" of my own ScrollBar for which I use methods SetMaximum() to scroll my panel ?
    Thank you for your advices, marxin

    When I see resource file, there is definition of StringListData to storing names of clubs( which is in sample), should I replace it with IID_IBOOLLISTDATA to store vector of checkboxes:
    Class
            kWLBCmpListBoxWidgetBoss,
            kTreeViewWidgetBoss,
                /** Furnishes application framework with widgets as needed */
                IID_ITREEVIEWWIDGETMGR,  kWLBCmpTVWidgetMgrImpl,
                /** Adapts our data model to the needs of the application framework */
                IID_ITREEVIEWHIERARCHYADAPTER,  kWLBCmpTVHierarchyAdapterImpl,
                /** Hold names of the list item */
                IID_ISTRINGLISTDATA,        kStringListDataImpl,
                /** Adding for saving checkboxes states ? */
                IID_ISTRINGLISTDATA,        kBoolListDataImp,
                /** Display selection message */  
                  IID_IOBSERVER,    kWLBCmpListBoxObserverImpl,
    In WLBCmp sample TreeViewAdapter get strings (names) from IStringListData, but I don't know how to save the state from CBoxes and store it to this BoolListData ?
    I hope you'll have some time to help me
    Thank you, marxin

  • Manage multiple versions(ID CS,CS2,CS3,CS4) of INDD files Indesign proxy for PC

    Dear scripters,
    I have multiple version of ID installed in my system. I have ID CS,CS2,CS3 and CS4. While I am opening (double click) the ID CS file, automatically the file opening in CS4. For solving this problem I have searched in the forums I found there is a program called INDESIGN PROXY for MAC OSX. It manages the problems well.
    Now I am in the process of developing the application same like that for windows using VB. Here is my observation about Indesign proxy.
    1. While user double clicks the Indesign file the argument is not passing to the Indesign.exe, but the argument passes to the Indesign proxy. Something like this
    "C:\Program Files\Adobe\Adobe InDesign CS4\InDesign.exe" "%1"
    to this
    "C:\Program Files\IDproxy\proxy.exe" "%1"
    2. The proxy exe lists all the version of IDs in a dialog box. If user selects CS2, the proxy exe passes the command argument something like this
    "C:\Program Files\Adobe\Adobe InDesign CS2\InDesign.exe" "%1"
    3. Now the file will open in correct version.
    I am comfort with VB forums and coding but I am struck getting the file path while user double click's the file. I short need to get the file path of "%1" argument.
    I think I am detailed.
    Kindly advice me how can I proceed more?
    Thanks
    regards
    a r u l
    vpublish.net

    I don't think it's a mistake.
    "InDesign CS4 (3.0)"
    means: this is the OM for InDesign 3.0 (i.e., InDesign CS) that is contained in InDesign CS4.
    Wait -- do you mean there might be a difference between "the OM for InDesign 4.0 (i.e., InDesign CS2) that is contained in InDesign CS4" and, say, "OM for InDesign 4.0 (i.e., InDesign CS2) that is contained in InDesign CS5" ?
    Why on earth would anyone need that? I imagine it's not because even with versioning the 'older' scripts may not behave the same -- there must be dozens of mails about versioning not working ... I mean, if Adobe knows what causes older scripts to stop working (because, if I understand you correctly, they retroactively change it in the documentation for older versions), wouldn't it be yet easier to not cause those changes?

  • I bought the photoshop cs2 cs3 cs5 and lightroom and lightroom 4. i can't install on may new macbookpro 13inch?

    i bought the photoshop cs2 cs3 cs5 and lightroom and lightroom 4. i can't install on may new macbookpro 13inch?

    On which operating system are you trying to install these Adobe apps?
    Please specify the operating system name and version.
    If you have purchased new Macbook Pro, then you should have atleast Mac OSX 10.9 or later. However, i doubt you will be able to install most of these apps on it as they are pretty old apps except CS5 & Lr4.
    Still you can give it a shot and check.
    What happens when you try to install them?
    Do you get any error message? An error screenshot or full text of the error, should be helpful.
    ~ Arpit

  • CS2/CS3/CS4: Cannot get file path in Unicode of the current document on Windows

    Hi All,
    In my automation plugin I need to have full absolute path of the opened document with any possible non-English letters. Using SDK examples Listener and Getter that come with Photoshop SDK the full absolute path which I obtain is in the default ANSI code page (CP_ACP) and I can convert it to Unicode using MultiByteToWideChar() API. However this works well when I have corresponding to document name language set in the "Control Panel -> Regional and Language Options -> Advanced -> Select a language to match the language version of the non-Unicode programs you want to use." For example if name of the document has Russian letters and chosen language in "Regional and Language Options" is also Russian the described conversion works well. If I change "Regional and Language Options" to English for example, full path returned by Photoshop SDK API (AliasToFullPath in PIUFile.cpp) for the document with Russian letters will contain "????????.psd" symbols.
    So I need to have an ability to get absolute file path in Unicode. Is it possible in Photoshop CS2/CS3/CS4 for Windows? I have searched forum and SDK but could not find info on it.
    Is it possible to have native HANDLE of the opened file to get file info using Windows API?
    Please advice.
    Below given slightly modified code from Photoshop CS3 which I use to get absolute file pat of the opened document.
    Thanks and regards,
    Sergey
    std::string outFilePath;
    int32 theID = 0;
    SPErr error = kSPNoError;
    error = PIUGetInfo(classDocument, keyDocumentID, &theID, NULL);
    if (error == kSPNoError)
    Handle theFileHandle = NULL;
    error = PIUGetInfoByID(theID, classDocument, keyFileReference, &theFileHandle, NULL);
    if (error == kSPNoError)
    int32 length = sPSHandle->GetSize(theFileHandle);
    Boolean oldLock = FALSE;
    Ptr pointer = NULL;
    sPSHandle->SetLock(theFileHandle, true, &pointer, &oldLock);
    if (pointer != NULL)
    outFilePath = (char*)pointer;
    sPSHandle->SetLock(theFileHandle, oldLock, &pointer, &oldLock);

    Hi All,
    Does anybody know, whether it is possible to get Unicode file path of the current document in Photoshop via Photoshop SDK API or without them?
    Thanks,
    Serhiy

  • Need to Uninstall CS, CS2, CS3, CS4 - Uninstall Tool Missing

    We've been with Adobe for a long time.
    We're upgrading computers and Mac OS on all to Mavericks.
    Would like to clean up in the process.
    Would like to thoroughly UNINSTALL all CS, CS2, CS3, and CS4 products on all computers.
    We are currently using CS5.  And, after installing Mavericks, will install CS6 Design Standard.
    Most threads point to using the UNINSTALL TOOL ... but no one seems to have a link to where to get it?
    It is not in the folders that everyone says it should be.  I do not have it.
    I hesitate to just DRAG the folders to the trash.  I'd prefer a tool that will UNINSTALL proper plists, etc. ... not just trash the AP folder.
    Anyone?

    I have already been there.
    1.  In my Adobe Installers folder, there are only alias' folders for "Add or Remove Adobe Creative Suite 3 Design Premium", for "Adobe Creative Suite 4 Design Premium", for "Adobe Creative Suite 5 Design Premium" and for "Adobe ExtendScript Toolkit 2.1".  When I "Show Original" and go there and try to OPEN the folder to run the uninstaller ... nothing opens.  When I search for "Adobe Uninstaller", nothing is found.
    2. I have downloaded and run the Cleaner Tool for CS3 and 4 ... but it was very very fast (didn't see a progress bar while it was working as expected) and CS3 and 4 are still in my applications folder.  There was a message on one of them something about "support file missing".
    So, this doesn't seem to have worked ... again.
    In our office, we used to "trickle down" computers.  The person with the oldest computer gets the new on and his goes to someone else.  The problem with this has been that the person giving away the computer has been required to "clean it up" before passing it on and people haven't known HOW to do this.  Thus, the missing uninstallers, etc.
    So ... I want to delete (thoroughly) CS, CS2, CS3 and CS4, including Bridge, Device Central, Extension Manager, Drive, Fireworks, Flash, Media Encoder, Stock Photos, Version Cue, SupportAdvisor ap.
    Can I simply "drag to trash"?  I suspect not.  But unistallers don't seem to be present and cleaner tool doesn't seem to work.
    Are the instructions for "manual" removal of all files?
    Thank you.

  • CS, CS2 & CS3 place problem

    Hi,
    I was just wondering if someone could help me with the following problem:
    All l'm doing is placing a text file into a text frame - sounds easy - test code below:
    ======
    set boxContent to "HDPropane:textfile.txt"
    tell application "Adobe InDesign CS2"
        activate
        set MyDocument to active document
        try
            set myframe to (text frame 1 of MyDocument whose label is "testbox")
            «event K2  plac» (boxContent) with «class rtfo» without «class imot» given «class insh»:myframe
        on error emg
            display dialog emg
        end try
    end tell
    ========
    This works OK and will overwrite the contents each time... the problem is when you link the text frame to another text frame.... it still works fine if you run the script without having any contents in your text frames but as soon as you have some contents you get an error 'import failed'  I get the same problem in CS, CS2 & CS3
    I've even tried after the 'set myframe' adding set myframe contents to "" - adding this line was a little hit and miss  sometimes it worked sometimes l got the same import failed message.
    Regards, Gary.

    Change this:
            set myframe to (text frame 1 of MyDocument whose label is "testbox")
            «event K2  plac» (boxContent) with «class rtfo» without «class imot» given «class insh»:myframe
    to something like this:
            set myframe to (text frame 1 of MyDocument whose label is "testbox")
            set contents of parent story of myFrame to ""
            place file boxContent on myframe without showing options
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

  • All copies illustrator crash, cs2 cs3 cs4 Leopard 10.5.8 powermac 1.8 dual

    I crashes every time i open it. it suddenly started happening. i could get just past  the opening pane at first allowing me to choose what kind of document to open print rgb etc, the it stopped doing that. i get the opening pane the it crashes, it aslo happens in past copies cs2 cs3 cs4 non of my illustrator copies will open

    It could be an issue with your font caches.  Go get fontnuke and try deleting all your system and application font caches.
    It doesn't sound like a preference issue if it's affecting all the other versions.  Do you have the suite installed?  Is Photoshop working properly?

  • Problem batch processing in CS2, CS3 and CS4e

    I have all the above named programs and have tried unsuccessfully to get the batch process to work.  I currently run it in CS with no problems. We want to upgrade to CS5e and actually be able to use it to process our web gifs without constantly going back to the old version.
    I have an action set up with the following steps:
    Start Record
    Open File
    Save for Web - Set Width to 150 pixels - Apply - Save (I select a folder called 150)
    I repeat process for a 300 pixel image.
    Close the file
    Stop record.
    Go to batch process:
    Choose Action
    Select Source Folder
    Override Action "Open" Command is checked
    Choose Destination Folder (150 from above)
    I select OK.
    This runs fine in PS CS and no matter how many files I have in the source I end of with the same number in both the 150 and 300 folder I have created, named correctly and in the correct 150 or 300 pixel width I need as gif files.
    I repeat the same procedure in CS2, CS3 or CS4e and all I get is a folder with one image in it when done.  the batch runs and you can see it opening files but it just constantly overwrites the original file.
    I have tried to check other boxes such as the Override Action Save As Command and other things I have found on these forums but nothing is working.
    I even called Adobe and was on the phone for 99 minutes and let them view my desktop while I ran the procedure in both PS CS and PS CS4e and they were stumped.  I was told they would pass it on to supervisors and someone would call me back.  I called back after a week since I had not heard from anyone and was told my call was recorded as a mis-dircted call and they had no record.
    If someone could please help I would really appreciate it.  I have spent the last three evenings combing websites and watching videos to no avail.
    Thanks in advance.

    Thanks, but I have checked all those and am using the same settings from program to program without success.  It always work
    s in PS CS.

  • Identify the Application Version Cs/Cs2/Cs3???

    Hi All,
    I need to identify the Application Version [Cs/Cs2/Cs3].
    Is there any way to identify using javascript???
    Regards,
    Ramkumar .P

    It's not the endianness inside single bytes (thank the Silicon Gods for that!).[*] It's when you are working with values that require more than a single byte -- i.e., everything above 255 (which is the highest value that can be expressed -- normally -- with a single byte).
    Everyone can see that 4589 is less than 9341, even though it has the same number of digits, because, well, the first one's rightmost digit is '9' and the second one's is '1' but that doesn't make sense, because it's the leftmost digit that counts most.
    You're thinking, "Sure, but what about that endianness thingy?"
    It's the same thing. Suppose you get two 2-byte values:
    (a) 123 and 85
    (b) 86 and 100
    Which 2-byte value is the largest? Well, obviously it's the first one, as the most significant part (123) is clearly larger than that of the other (86). Now suppose you have to design a computer chip, and you have to decide in which order to store 2-byte values. It's quite obvious to you, me, and, for example, Motorola engineers, how you would do that: most significant byte first, then least significant.
    Unfortunately, the designers of the most prevalent microchip to date, Intel, decided to do it ... the other way around. (Insert appropriate smiley/sad face/horror here). For some reason, they reckoned it useful to store the least significant part first. Remember, back in "the day" when this was decided, using two bytes to store a number was ... well, how golly big numbers do you computer techies want to process!? Two bytes, that's up in the thousands! Imagine!
    So I imagine there must have been a highly technical reason for it.
    The term "endianness", by the way, comes from Gulliver's Travels -- which, I'm sure, most of you read. Remember the Civil Wars on which end to start eating an egg?
    Applying this to the (a) and (b) numbers, when you are asked "what is the bigger two-byte number?", then you ask "Is it Most Significant Byte first, or Least Significant first?" Is it the former, then it's (a); for the latter, it's (b).
    [*] Above-criticized engineers had no problem in deciding that in
      10010001
    the highest bit value (128) is always on the left, and the lowest (1) is always on the right.

  • CS2- CS3 Observer questions.

    Hello.
    Im porting a plugin from CS2 to CS3 on MAC and have run into a problem with the observer structure.
    In the CS2 plugin we simply used the default values available, IID_IUNKOWN & IID_IOBSERVER...
    i IsAttached (IObserver *observer, const PMIID &interestedIn=IID_IUNKNOWN, const PMIID &asObserver=IID_IOBSERVER)=0
    Called simply like this... mySubject->AttachObserver(this);
    As of CS3 however this no longer possible for the "intrestedin" parameter to be left undeffined, instead the specific IID you want to monitor is required. If I understand things correctly.
    i AttachObserver (IObserver *observer, const PMIID &interestedIn, const PMIID &asObserver=IID_IOBSERVER)=0
    Where can I find information on what IID is connected to what action? My main interest is in guide movements and switching documents both of which my plugin have to react to.
    What IID should be used to notify the plugin of movement of a guide?
    What IID should be used to notify the plugin of switching of the current document?
    Is there any documentation anywhere on what IIDs should be used to monitor what actions?
    Grateful for any help.
    Carl Johan Rydberg.

    Thanks Dirk, the observer finally observed.<br /><br />But how can I make sure it is a guide that is being moved? In the old code theChange was sent by kMoveGuideAbsoluteCmdBoss so it was available immediately. Also since it was the IID_IDYNAMICUPDATE that was the protocol used it was possible to check what state it was in before executing our function.<br /><br />if (theChange == kMoveGuideAbsoluteCmdBoss )<br />   ICommand* cmd = (ICommand*)changedBy;<br />   InterfacePtr<IDynamicUpdate> update(cmd, IID_IDYNAMICUPDATE);<br />   IDynamicUpdate::DynamicState state = update->GetDynamicState();<br />   if (state == IDynamicUpdate::kEndDynamic)<br />   {<br />      mystuff->UserMovedGuides(kTrue);<br />   }<br />}<br /><br />Where do I find the kMoveGuideAbsoluteCmdBoss you mentioned and how do I access it to check if it was a guide movement that was signaled?<br /><br />Carl Johan Rydberg

  • Double-click/Drag-&-drop Photoshop files opens application but not file or I get a message saying that some files in Application Support are missing and I have to reinstall. (Photoshop CS/CS2/CS3)

    This is most commonly due to installing Photoshop CS/CS2 <i>before</i> doing an archive and install of Mac OS10.3 or OS10.4.<br /><br />One solution is to reinstall Photoshop 7/CS/CS3 after you have installed Mac OS10.3 or OS 10.4.<br /><br />If you have Photoshop 7 and 8(CS), the easiest way to reinstall Photoshop (without disturbing the original installation) is to install to your desktop. After the install is done just trash the Photoshop folder on the desktop.<br />Note: This will only work with Photoshop 7 and 8(CS) but not with 9 (CS2).<br /><br />Photoshop CS2 you must delete the Photoshop CS2 folder. If you have any 3rd party Plugins or presets remove them from the folder before deleting. Just placing the folder in the trash will not work it must be deleted. After reinstalling CS2 you can now put all 3rd party Plugins and presets back in the new folder.<br /><br />---------------------------<br />Another solution courtesy Anne Shelbourne<br /><br />Open your Previous System folder. <br />Find "Adobe Unit Types". <br />Copy it into: <Your current system Hard Drive>/Library/ScriptingAdditions/<br />Then reboot your Mac.<br /><br />---------------------------<br />However, if you happen to be running a non-English version, like Photoshop CS CE or Photoshop CS ME, it appears the missing file does not get installed. You would need to install and delete the international English version first.

    The problem you got into is a known problem after updating to Tiger. It is a small 4K file that gets trashed with the update. It is called the Adobe Unit Types. Both Photoshop and Photoshop Elements need this file to function.
    One way to get it back is to reinstall Photoshop, the other is to add this file again.
    You can get the file from here http://www.dd.se/Tips/bildbehandling/downloads/AdobeUnitTypes.zip
    It is only 3,7 KB big.
    You put the file you download here:
    [hard disk] /Library/ScriptingAdditions. If you don't have a Scripting Additions folder, you create it.
    As you trashed Photoshop, you need to completely deinstall it to be able to reinstall it.

  • Adobe photoshop cs2-cs3 cheap!!!!!!

    I am student in UK
    I am enjoying new macbook
    What i need now is adobe photoshop cs2 or cs3 as cheap as possible
    Do you no anyplace where i can get this program as very cheap legally
    Thanks for any answers

    How about Adobe UK site
    http://www.adobe.com/uk/education/

  • CS1, CS2, CS3 Animated Gif Creation Error.

    Example: http://img365.imageshack.us/img365/5665/walksz2.gif
    Whenever I made an animated gif with a transparent background, the above happens. It doesn't hide the previous frame when drawing the next one. However, when I give it a non-transparent background, it is still fine - http://img59.imageshack.us/img59/8080/walklk4.gif
    How can I fix this? This happens in Photoshop CS1, CS2, and CS3.
    Thanks,
    Dave.

    Read up on "frame disposal method."
    Here's a link to the online PS CS3 live documentation about the subject. This info applies to all the versions you mentioned:
    http://livedocs.adobe.com/en_US/Photoshop/10.0/help.html?content=WSC40F7DA7-6F3C-40d7-8BCD -98A3B1FE7ED0.html

Maybe you are looking for