[JS CS3] Trouble with getElements().length

The "ScriptLabel.jsx" tutorial script has this code fragment:
var myPageItems = myPage.pageItems.item("myScriptLabel");
if(myPageItems.getElements().length != 0){
alert("Found " + myPageItems.getElements().length + " page items with the label.");
The script works fine as long as the page contains at least one pageItem with the label "myScriptLabel". However, if there are no labeled pageItems, the script fails because myPageItems.getElements().length is invalid.
I can't figure out how to test for the condition of no pageItems having the label "myScriptLabel" to avoid this error. What am I missing?
Thanks to anyone who can enlighten me!

Wow! It's a long time since I've looked at this, but it appears that you have to do something like this:
myPage = app.documents[0].pages[0];
myPIs = myPage.pageItems.item("myScriptLabel")
if (myPIs != null) {
  myPIs = myPIs.getElements();
} else {
  alert("Tough luck, there aren't any");
If there are no such items on the page you get null rather than an empty array. If there is just one this still works, but notice I had to use getElements() to get the separate items into an array.
You can use the .item(Name) construction to directly work on all the objects that match, such as:
myPage.textFrames.item("HitMe").contents = "Consider yourself hit.";
Dave

Similar Messages

  • [JS CS3] Trouble with changeGrep() array

    This is strange, or else I'm totally missing something simple:
    My script does a GREP search for a text string in a table, and assigns a paragraph style to the string. Next, for each string that was found, I want to merge the cell that contains the string with the two cells directly to the right of the cell. The line
    var myFound = mySelection.changeGrep();
    does the changing of the text string.
    I understand that changeGrep() returns an array, in this case, of insertion points. When I run the script on a table that contains 5 instances of the string that the Grep search is looking for, myFound returns an array of 5 insertion points like I'd expect. Except that if I pause the script and examine the contents of the array, this is what I get:
    myFound[0].parent.contents displays the correct (first) text string that was changed
    myFound[1].parent.contents isn't correct. It displays the contents of the cell directly to the left of he text string that was changed.
    myFound[2] through myFound[4] are also incorrect.
    Again, this is examining the array before I do anything to the table such as merging cells, etc.
    So, why doesn't the array return the correct insertion points?
    Here is the full script function:
    function myProcessTable(mySelection) {
    // Specify the column width
    mySelection.columns.item(0).width = 68;
    mySelection.columns.item(1).width = 103.5;
    mySelection.columns.item(2).width = 24;
    mySelection.columns.item(3).width = 16;
    mySelection.columns.item(4).width = 16;
    mySelection.columns.item(5).width = 16;
    // Find every occurance of ddd.dd/d in the current table, and apply the Table body, cond, center paragraph style,
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.findWhat = "\\d.\\d\\d/\\d";
    app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyles.itemByID(locateParagraphStyle("Table body, cond, center"));
    var myFound = mySelection.changeGrep();
    alert ("Search is completed. " + myFound.length + " replacement(s) made.")
    // merge the cell with the two cells to the right
    for (i=myFound.length-1; i>=0; i--) { // iterate through each found occurance
    var myCell = myFound[i].parent;
    var myTable = myCell.parent;
    var myRow = myCell.parentRow.index;
    var myColumn = myCell.parentColumn.index;
    myCell.merge(myTable.rows[myRow].cells[myColumn+2]);

    Keith,
    changeGrep()'s arrays can't be used for anything, so that's where your script runs into trouble -- it's nothing to do with tables. To work around that, use findGrep()'s array.Immediately before this line:
    for (i=myFound.length-1; i>=0; i--) { // iterate through each found occurance
    add this one:
    var myFound = mySelection.findGrep();
    Peter

  • CS3-Trouble with Transferred Trimmed Project

    Hello...
    New problem; have not been able to find answer.
    I need to cut a 20 minute SD video down to 10 minutes to share at a retreat for documentary filmmakers. The last interation of the video was on my editor's machine. Saved a trimmed project without previews to an external drive and then transferred the project to my computer.
    The problem is that when I do changes, the renders are glacial. I timed one...2.5 minutes for 50 frames...and there was nothing fancy going on. When I save the project and reopen it, it shows rendering is needed again...some areas required rendering which were not changed.
    Premiere seems to handle other projects ok. Crazy making...there is obviously something I do not understand about working with trimmed projects. My editor has a much newer and more powerful computer, but is running CS3 as well. (Running Win7.)
    The computer is long in the tooth...but has always been fine in the past...and is fine with other projects. What's up? I know I need a new computer but this one should be able to handle this.
    Thanks in advance!

    Thank you for that info. Sounds like things should work just fine.
    The "lost Renders" often happens when one is using an external HDD to edit to/from, or a networked drive, but this does not seem to be your issue.
    When I archive a Project (usually TO and external HDD), I will test that Project, prior to moving on. I have yet to encounter any issues, so long as my Assets are in the Project's folder hierarchy. I have run into issues, with Assets not being gathered, when the Assets are spread about. I encountered this with some SmartSound files, that were in a separate folder, since they were being used in about 22 separate Projects for that client. I learned to Copy those into the Project's folder structure, into Music sub-folders, even if that meant having 22 Copies on my system. That has been the ONLY issue, that I have had with archived Projects, using Project Manager, but do have to admit that other than my initial test, I have not revisited many over the years. Do not have any idea why the Render files are causing an issue, and also why the Projects are slowing down, as they are.
    Hope that others will see what I am missing, and will have tips for you.
    Good luck,
    Hunt

  • HELP. 3 years ago I purchased cs3. I had troubles with registering the serial number and used my university's suite instead, and (stupidly) did not sort it out. I am now wanting to subscribe to the online creative cloud with my cs3 discount. Is there any

    HELP. 3 years ago I purchased cs3. I had troubles with registering the serial number and used my university's suite instead, and (stupidly) did not sort it out. I am now wanting to subscribe to the online creative cloud with my cs3 discount. Is there any way to find / prove that I had purchased cs3 and locate a serial number? On my Adobe account it does not show my purchase of cs3 (I am guessing because of the trouble with registering my serial number). I have moved house 3 times since the purchase and am unable to locate the packaging or disk. Is there any way to prove my purchase without any serial number or showing under my Adobe account? Please help! Thanks

    The CS3 discount offer is only for retail online product, it does not include education or volume license purchases. Refer to Terms and Conditions | Adobe
    To check whether you had retail CS3 purchase, we need proof of purchase as well as serial number, without which the issue can not be resolved.
    Regards
    Rajshree

  • Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hello Sue,
    I have an iPad 3, iPad Mini and iPhone 5S and they are all sluggish on capitalisation using shift keys. I hope that Apple will solve the problem because it is driving me crazy.
    I find using a Microsoft Surface and Windows 8 phone, which I also have, work as well as all the ios devices before the ios 7 upgrade.
    It has something to do with the length of time that you need to hold the shift key down. The shift key needs to be held longer than the letter key for the capitalisation to work. For some reason, this is a major change in the way we have learnt to touch type on computers. I am having to relearn how to type!
    Michael

  • Trouble with "body" images lining up at the top

    Hi, I am having troubles with the #body style in my web page. I have inserted a table into the #body area and the the body editable region will not line up on the top with the sideBar editable region when I add text and apply my css to it. Can you look at the code and let me know what I am doing wrong? Thanks!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Ram Restaurant &amp; Brewery</title>
    <!-- TemplateEndEditable -->
    <meta name="keywords" content="Ram Restaurant, The Ram restaurant, Ram Restaurant and brewpub, Ram Restaurant Group, Ram International" />
    <meta name="description" content="Welcome to The Ram!  Your stomach wants food.  Your tastebuds want beer.  Satisfy them both at the Ram Restaurant & Brewery." />
    <style type="text/css">
    <!--
    body {
    background-color: #333;
    margin: 0 auto;
    padding: 0px;
    margin-left: 0px;
    margin-right: 0px;
    .navbar_center {
    text-align: center;
    -->
    </style>
    <link href="/RamWebsite_NEW/cssstyles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    color: #F00;
    margin: 0px;
    padding: 0px;
    a:link {
    color: #666;
    text-decoration: none;
    h1 {
    font-size: 36px;
    color: #000;
    h2 {
    font-size: 24px;
    color: #000;
    h3 {
    font-size: 18px;
    color: #000;
    h4 {
    font-size: 12px;
    color: #000;
    a:visited {
    text-decoration: none;
    color: #000;
    a:hover {
    text-decoration: underline;
    a:active {
    text-decoration: none;
    -->
    </style>
    <!--[if lte IE 8]>
    <style type="text/css">
    ul.MenuBarHorizontalul  li ul li ul li.MenuBarHorizontal, ul.MenuBarHorizontal li ul li.MenuBarHorizontal {
    width:100px;
    height:23px;
    </style>
    <![endif]-->
    <script src="/RamWebsite_NEW/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <link href="/RamWebsite_NEW/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    </head>
    <body link="#000000" topmargin="0" onload="MM_preloadImages('/RamWebsite_NEW/images/Menu_rollover.jpg','/RamWebsite_NEW/imag es/EventsLink2_rollover.jpg','/RamWebsite_NEW/images/GiftCards_rollover.jpg','/RamWebsite_ NEW/images/BeerLink2_rollover.jpg')">
    <div id="wrapper">
    <div id="header">
        <table width="900" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <th width="200" height="36" rowspan="2" align="center" valign="middle" scope="col"><a href="http://www.theram.com"><img src="/RamWebsite_NEW/images/Ram-Logo-red.gif" alt="Ram Restaurant &amp; Brewery Logo" width="175" height="69" border="0" /></a></th>
            <th width="350" height="50" align="center" valign="middle" scope="col"> </th>
            <th width="200" align="center" valign="middle" scope="col"> </th>
            <th width="150" align="right" valign="middle" scope="col"><a href="http://www.facebook.com/home.php?#!/theramrestaurant?ref=ts"><img src="/RamWebsite_NEW/images/FacebookBox.gif" alt="Becoma a Facebook Fan!" width="40" height="40" border="0" /></a><a href="http://www.twitter.com/theram"><img src="/RamWebsite_NEW/images/TwitterBox.gif" alt="Follow Us on Twitter" width="40" height="40" hspace="30" border="0" /></a></th>
          </tr>
          <tr>
            <th colspan="3" align="right" scope="col"><ul id="MenuBar1" class="MenuBarHorizontal">
              <li><a class="MenuBarItemSubmenu" href="#">MENU</a>
                <ul>
                  <li><a href="#" class="MenuBarItemSubmenu">Idaho</a>
                    <ul>
                      <li><a href="/menus/idaho/boise.shtml">Boise</a></li>
                      <li><a href="/menus/idaho/meridian.shtml">Meridian</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Illinois</a>
                    <ul>
                      <li><a href="/menus/illinois/rosemont.shtml">Rosemont</a></li>
                      <li><a href="/menus/illinois/schaumburg.shtml">Schaumburg</a></li>
                      <li><a href="/menus/illinois/wheeling.shtml">Wheeling</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Indiana</a>
                    <ul>
                      <li><a href="/menus/indiana/fishers.shtml">Fishers</a></li>
                      <li><a href="/menus/indiana/indianapolis.shtml">Indianapolis</a></li>
    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Oregon</a>
                    <ul>
                      <li><a href="/menus/oregon/clackamas.shtml">Clackamas</a></li>
                      <li><a href="/menus/oregon/salem.shtml">Salem</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Washington</a>
                    <ul>
                      <li><a href="/menus/washington/kent.shtml">Kent</a></li>
                      <li><a href="/menus/washington/lacey.shtml">Lacey</a></li>
                      <li><a href="/menus/washington/lakewood.shtml">Lakewood</a></li>
                      <li><a href="/menus/washington/puyallup.shtml">Puyallup South Hill Mall</a></li>
                      <li><a href="/menus/washington/puyallup2.shtml">Puyallup Sunrise Village</a></li>
                      <li><a href="/menus/washington/northgate.shtml">Seattle Northgate</a></li>
                      <li><a href="/menus/washington/seattle.shtml">Seattle University Village</a></li>
                      <li><a href="/menus/washington/tacoma.shtml">Tacoma</a></li>
                    </ul>
                  </li>
                </ul>
              </li>
              <li><a href="#" class="MenuBarItemSubmenu">LOCATIONS</a>
                <ul>
                  <li><a href="#" class="MenuBarItemSubmenu">Idaho</a>
                    <ul>
                      <li><a href="/idaho/boiseNew.html">Boise</a></li>
                      <li><a href="/idaho/meridianNew.html">Meridian</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Illinois</a>
                    <ul>
                      <li><a href="/illinois/rosemontNew.html">Rosemont</a></li>
                      <li><a href="/illinois/schaumburgNew.html">Schaumburg</a></li>
                      <li><a href="/illinois/wheelingNew.html">Wheeling</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Indiana</a>
                    <ul>
                      <li><a href="/indiana/fishersNew.html">Fishers</a></li>
                      <li><a href="/indiana/indianapolisNew.html">Indianapolis</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Oregon</a>
                    <ul>
                      <li><a href="/oregon/clackamasNew.html">Clackamas</a></li>
                      <li><a href="/oregon/salemNew.html">Salem</a></li>
                    </ul>
                  </li>
                  <li><a href="#" class="MenuBarItemSubmenu">Washington</a>
                    <ul>
                      <li><a href="/washington/kentNew.html">Kent</a></li>
                      <li><a href="/washington/laceyNew.html">Lacey</a></li>
                      <li><a href="/washington/lakewoodNew.html">Lakewood</a></li>
                      <li><a href="/washington/puyallup-southHill-NEW.html">Puyallup South Hill Mall</a></li>
                      <li><a href="/washington/puyallup-Sunrise-New.html">Puyallup Sunrise Village</a></li>
                      <li><a href="/washington/northgateNew.html">Seattle Northgate</a></li>
                      <li><a href="/washington/seattleNew.html">Seattle University Village</a></li>
                      <li><a href="/washington/tacomaNew.html">Tacoma</a></li>
                    </ul>
                  </li>
                </ul>
              </li>
              <li><a class="MenuBarItemSubmenu" href="#">PROMOS</a>
                <ul>
                  <li><a href="/drink_specials.shtml">Drink Promos</a>              </li>
                  <li><a href="/food_specials.shtml">Food Promos</a></li>
    </ul>
              </li>
              <li><a href="/news.shtml">RAM NEWS</a></li>
              <li><a href="/about.shtml">ABOUT US</a></li>
              <li><a href="#" class="MenuBarItemSubmenu">CONTACT US</a>
                <ul>
                  <li><a href="/contact.shtml">General Info</a></li>
                  <li><a href="/employment.shtml">Careers</a></li>
                  <li><a href="/comments.shtml">Comments</a></li>
                </ul>
              </li>
              <li><a href="/banquets.shtml" class="MenuBarItemSubmenu">BANQUETS</a>
                <ul>
                  <li><a href="/banquets.shtml">Banquets</a></li>
                  <li><a href="/banquets-catering.shtml">Off-Site Catering</a></li>
                </ul>
              </li>
            </ul></th>
          </tr>
          <tr>
            <th colspan="4" align="center" valign="middle" scope="col"><img src="/RamWebsite_NEW/images/redbar.gif" width="900" height="11" /></th>
          </tr>
        </table>
    </div>
    <div id="body">
      <table width="900" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <th height="300" valign="top" scope="col"><table width="900" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <th width="225" align="center" valign="top" bgcolor="#000000" scope="col"><!-- TemplateBeginEditable name="sideBar" -->adfadsfds<!-- TemplateEndEditable --></th>
              <th width="675" align="left" valign="top" bgcolor="#FFFFFF" scope="col"><!-- TemplateBeginEditable name="body" -->
                <p><img src="/images/aboutus2.jpg" width="675" height="300" /></p>
                <p class="foodNameDesc">adfadslkj</p>
              <!-- TemplateEndEditable --></th>
            </tr>
          </table></th>
        </tr>
      </table>
    </div>
    <div id="bottomMenuSubPg">
      <table width="900" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Menu','','/RamWebsite_NEW/images/Menu_rollover.jpg',1)"><img src="/RamWebsite_NEW/images/Menu.jpg" alt="Menu" name="Menu" width="212" height="125" hspace="6" border="0" id="Menu" /></a></th>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Big Horn Beer','','/RamWebsite_NEW/images/BeerLink2_rollover.jpg',1)"><img src="/RamWebsite_NEW/images/BeerLink2.jpg" alt="Big Horn Beer" name="Big Horn Beer" width="212" height="125" hspace="6" border="0" id="Big Horn Beer" /></a></th>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Events','','/RamWebsite_NEW/images/EventsLink2_rollover.jpg',1 )"><img src="/RamWebsite_NEW/images/EventsLink2.jpg" alt="Events at the Ram" name="Events" width="212" height="125" hspace="6" border="0" id="Events" /></a></th>
          <th width="200" align="center" scope="col"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Gift Cards','','/RamWebsite_NEW/images/GiftCards_rollover.jpg',1)"><img src="/RamWebsite_NEW/images/GiftCards.jpg" alt="Gift Cards" name="Gift Cards" width="212" height="125" hspace="6" border="0" id="Gift Cards" /></a></th>
        </tr>
      </table>
    </div>
    <div id="bottommenu2"></div>
    <map name="Map" id="Map">
      <area shape="poly" coords="16,103" href="#" />
      <area shape="poly" coords="49,71,102,58,158,73,191,113,180,141,151,161,109,169,65,162,31,141,18,112" href="http://theram.fbmta.com/members/UpdateProfile.aspx?Action=Subscribe&amp;InputSource=W" target="_blank" />
    </map>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"/RamWebsite_NEW/SpryAssets/SpryMenuBarDownHover.gif", imgRight:"/RamWebsite_NEW/SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </div>
    </body>
    </html>

    You have your image in the 'body editable region' wrapped in <p></p> tags (paragraph tags). <p> tags have padding and margin set on them by default.
    <p><img src="/images/aboutus2.jpg" width="675" height="300" /></p>
    You can either just remove the <p></p> tags or you can zero out the padding and margin:
    p {
    padding: 0;
    margin: 0;
    Unfortuanately the above will target every paragraph on your page which might not be desirable so I would just remove the <p> tags as it is not necessary to wrap an image in them.
    If you do want to keep the <p> tags then use some inline css to specifically remove the padding and margin on that particular one:
    <p style="padding: 0; margin: 0;"><img src="/images/aboutus2.jpg" width="675" height="300" /></p>

  • I am really in trouble with AP Div-How do I fix it on the web?

    Hi,
    I am really in trouble with my website. I have added some pictures and text on top of Fireworks Image and have published it on the website.
    But the concern is, when I zoom in & zoom out, I can see the previous text on the screen and also the picture and texts I have added using Ap Div  tag are scattered moving all to the left when I zoom out. Can someone help me how to fix this in one particular place so that it doesn't move when I zoom in or zoom out!!! I am using Adobe Dreamweaver CS3, if this will help.
    Appreciate your sincere help on this.
    Thanks in advance.

    Frankly, there's a lot that is wrong with that page:
    1. Most of your content is in the images - this means that you will get very poor search engine ranking
    2. Your extensive use of absolute positioning for layout - this means that when you enlarge the text size in the browser, you will have overflow problems on the page (for example, the terrible problems at the bottom of the page)
    3. You have used tables for layout - this is because of your use of Fireworks to create the HTML
    Each of these problems is solvable but none of them are solvable easily without a redesign of the page. A web page should be built from the top down, stacking content containers (i.e., <div>, <section>, <article>, <aside>, etc.) vertically or floating them horizontally or both. These containers would be loaded with the text content of the page, and images would be used only for cosmetic appearance. Using CSS to style/locate the content will allow you to completely move away from tables for layout. Most typical pages can be created without the use of absolute positioning which should be used only for special purposes, not for layout of the page elements.

  • Having trouble with image processor...help please!

    HI there...First off I just bought a new iMac and haven't a clue what I'm doing so my problem could be related to that.  While I'm waiting for Adobe to transfer over my platform I downloaded the trial of CS5 Extended to get me started.  I'm having trouble with the image processor...I choose file/scripts/image processor...the dialog box comes up and I choose use open files and then try and choose the folder I want to save them in.  I choose my folder and hit run and it keeps telling me specify folder destination.  I can't for the life of me figure this out...what am I doing wrong?  It always worked fine for me on my PC and CS3.  I can't handle saving each image individually in the new folder...
    Thanks!!

    I haven't renamed anything as far as I know.  I made a new folder when I hit Folder option and it's highlighted as well as the path shows up in the processor box.  Just when I choose run it tells me to specify a folder.  The only thing I can think of is that maybe something messed up b/c I'm copied the files and folders over from my PC but it let me save as on the mac.  Also the folder I'm choosing to put them in is on the Mac harddrive.  IDK...

  • I'm having trouble with installing a 8g kit in my late 2009 mac mini. when the parts are installed all i get is a beeping sound, is there any way to get around this?

    i'm having trouble with installing a 8g kit in my late 2009 mac mini. when the parts are installed all i get is a beeping sound, is there any way to get around this?

    What is the source & link to this 8 GB kit please?
    Can you count the beeps or flashes?
    1 beep = no RAM installed
    2 beeps = incompatible RAM types
    3 beeps = no good banks
    4 beeps = no good boot images in the boot ROM (and/or bad sys config block)
    5 beeps = processor is not usable
    In addition to the beeps, on some computers the power LED will flash a corresponding number of times plus one. The LED will repeat the sequence after approximately a 5-second pause. The tones are only played once.
    Note: In this case, a flash is considered to be 1/4 second or 250 ms or greater in length.
    http://support.apple.com/kb/HT1547

  • Trouble with class

    I am unable to figure out what I am having trouble with this, here is the code
    public class Tools3
        protected long item_number;
        protected String product_name;
        protected long units_in_stock;
        protected double price_of_each_unit;
        protected static double total_price_of_inventory;
    public Tools3( long pitem_number, String pproduct_name, long punits_in_stock, double pprice_of_each_unit)
       item_number = pitem_number;
       product_name = pproduct_name;
       units_in_stock = punits_in_stock;
       price_of_each_unit = pprice_of_each_unit;
       total_price_of_inventory = punits_in_stock * pprice_of_each_unit;
    // Overloaded constructor for empty balance
    public Tools3()
       item_number = 0;
    public void set_item_number( long pitem_number )
       item_number = pitem_number;
    public void set_product_name( String pproduct_name )
       product_name = pproduct_name.toString();
    public void set_units_in_stock( long punits_in_stock )
       units_in_stock = punits_in_stock;
    public void set_price_of_each_unit( double pprice_of_each_unit )
       price_of_each_unit = pprice_of_each_unit;
    public long get_item_number()
       return item_number;
    public String get_product_name()
       return product_name;
    public long get_units_in_stock()
       return units_in_stock;
    public double get_price_of_each_unit()
       return price_of_each_unit;
    public double calculate_total_price()
       return units_in_stock * price_of_each_unit;
    public double calculate_total_price_of_inventory(Tools3[] mytools)
       double rettotal = 0;
       for (int i = 0; i < mytools.length; i++)
        rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_each_unit());
       return rettotal;
      public void sort_by_names(Tools3[] mytools)
      int a,b;
      int sortTheStrings = mytools.length - 1;
      String tempproduct_name;
      long tempitem_number;
      long tempunits_in_stock;
      double tempprice_of_each_unit;
        //need to implement a bubble sort here
        for (a = 0; a < sortTheStrings; ++a)
      for (b = 0; b < sortTheStrings; ++b)
      if(mytools.product_name.compareTo(mytools[b + 1].product_name) >0)
        //move name
        tempproduct_name = mytools.product_name;
        mytools.product_name = mytools[b+1].product_name;
        mytools[b+1].product_name = tempproduct_name;
        //move item_number
        tempitem_number = mytools.item_number;
        mytools.item_number = mytools[b+1].item_number;
        mytools[b+1].item_number = tempitem_number;
        //move units_in_stock
        tempunits_in_stock = mytools.units_in_stock;
        mytools.units_in_stock = mytools[b+1].units_in_stock;
        mytools[b+1].units_in_stock = tempunits_in_stock;
        //move price_of_each_unit
        tempprice_of_each_unit = mytools.price_of_each_unit;
        mytools.price_of_each_unit = mytools[b+1].price_of_each_unit;
        mytools[b+1].price_of_each_unit = tempprice_of_each_unit;
    //end of tools3.java class

    Results from javac
    C:\Java>javac Tools3.java
    Tools3.java:77: cannot find symbol
    symbol  : method get_units_in_stock()
    location: class Tools3[]
        rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_e
    ach_unit());
                                      ^
    Tools3.java:77: cannot find symbol
    symbol  : method get_price_of_each_unit()
    location: class Tools3[]
        rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_e
    ach_unit());
                                                                     ^
    Tools3.java:94: cannot find symbol
    symbol  : variable product_name
    location: class Tools3[]
      if(mytools.product_name.compareTo(mytools[b + 1].product_name) >0)
                ^
    Tools3.java:97: cannot find symbol
    symbol  : variable product_name
    location: class Tools3[]
        tempproduct_name = mytools.product_name;
                                  ^
    Tools3.java:98: cannot find symbol
    symbol  : variable product_name
    location: class Tools3[]
        mytools.product_name = mytools[b+1].product_name;
               ^
    Tools3.java:101: cannot find symbol
    symbol  : variable item_number
    location: class Tools3[]
        tempitem_number = mytools.item_number;
                                 ^
    Tools3.java:102: cannot find symbol
    symbol  : variable item_number
    location: class Tools3[]
        mytools.item_number = mytools[b+1].item_number;
               ^
    Tools3.java:105: cannot find symbol
    symbol  : variable units_in_stock
    location: class Tools3[]
        tempunits_in_stock = mytools.units_in_stock;
                                    ^
    Tools3.java:106: cannot find symbol
    symbol  : variable units_in_stock
    location: class Tools3[]
        mytools.units_in_stock = mytools[b+1].units_in_stock;
               ^
    Tools3.java:109: cannot find symbol
    symbol  : variable price_of_each_unit
    location: class Tools3[]
        tempprice_of_each_unit = mytools.price_of_each_unit;
                                        ^
    Tools3.java:110: cannot find symbol
    symbol  : variable price_of_each_unit
    location: class Tools3[]
        mytools.price_of_each_unit = mytools[b+1].price_of_each_unit;
               ^
    11 errors

  • I am postin a message but no one seems to answer it . Plse I am having trouble with adobe 5 and I wr

    I am hjaving trouble with adobe 5 not compatable with my computer so how do I get rid of it and up grade  to a newer verson, hopfully a free one

    There is no application named Adobe 5, so you might have to provide the correct name for the application.  If it happens to be Creative Suite 5 (CS5) there is a good chance it is compatible with your computer but you might have to install it in a compatibility mode.  If you want to remove it you should first deactivate it. YOu might also do well to use the Creative Suite Cleaner Tool...
    Adobe Creative Suite Cleaner Tool
    helps resolve installation problems for CS3 thru CS6 and for Creative Cloud
    http://www.adobe.com/support/contact/cscleanertool.html
    As far as I know there are no free upgrades, especially if the reason would be lack of compatibility.  It might be true if you were to have purchased one version when the next version was just about to be released, but CS5 is well beyond being considered for that.  Software is not freely upgraded to match newer machines - that's part of life.
    Just in case... if the lack of compatibility is due to your machine not meeting the tech specs of CS5, then it will most likely be true that your machine does not meet the tech specs of anything newer than that.

  • Having trouble with creating objects from instances created with ClassLoade

    Hi.
    I'm having a bit of trouble with casting an instance of an object from a custom ClassLoader. Don't worry - the code isn't for anything sinister - it's for one of those life simulation thingies, but I want to make it modular so people can write their own 'viruses' which compete for survival. You know the score.
    Anyway. I've got the beginnings of my main class, which seems to load the class data for all 'virus' classes in a folder called 'strains'. There is a abstract class called AbstractVirus which declares the method calls for how the viruses should behave and to get textual descriptions, etc. AbstractVirus is to be subclassed to create working virus classes and these are what my main class is trying to load instances of.
    Unfortuantely, I can't cast the instances into AbstractVirus objects. The error I've been getting is 'ClassCastException' which I presume is something to do with the fact that my ClassLoader and the Bootstrap ClassLoader aren't seeing eye-to-eye with the class types. Can anyone help? This line of programming is really new to me.
    My code for the main class is below:
    /* LifeSim.java */
    public class LifeSim {
      public LifeSim() {
        /* Get a list of all classes in the 'strains' directory and store non-
         * abstract classes in an array. */
        Class virusClasses[] = null;
        try {
          /* Get a reference to the file folder 'strains' and make sure I can read
           * from it. */
          java.io.File modulesFolder = new java.io.File("strains");
          if (!modulesFolder.isDirectory() || !modulesFolder.canRead()) {
         System.out.println("Failed to find accessible 'strains' folder");
         System.exit(-1);
          /* Get a list of all the class files in the folder. */
          String virusFiles[] = modulesFolder.list(new ClassFileFilter());
          if (virusFiles.length == 0) {
         System.out.println("No virus strains in 'strains' folder");
         System.exit(-1);
          /* Create an array of class objects to store my Virus classes. Ignore the
           * abstract class as I cannot instantiate objects directly from it.*/
          virusClasses = new Class[virusFiles.length];
          VirusClassLoader classLoader = new VirusClassLoader();
          int j = 0;
          for (int i = 0; i < virusFiles.length; i++) {
         String virusName = "strains/" + virusFiles;
         Class tempClass = classLoader.loadClass(virusName);
         if (tempClass.getName().compareToIgnoreCase("strains.AbstractVirus") != 0) {
         virusClasses[j++] = tempClass;
    } catch (ClassNotFoundException ncfe) {
    System.out.println("Failed to access virus class files.");
    ncfe.printStackTrace();
    System.exit(-1);
    /* TEST CODE: Create an instance of the first virus and print its class
    * name and print details taken from methods defined in the AbstractVirus
    * class. */
    if (virusClasses.length > 0) {
    try {
         // Print the class name
         System.out.println(virusClasses[0].getName());
         Object o = virusClasses[0].newInstance();
         strains.AbstractVirus av = (strains.AbstractVirus) o;
         // Print the virus name and it's description
         System.out.println(av.getQualifiedName());
         System.out.println(av.getDescription());
    } catch (InstantiationException ie) { ie.printStackTrace(); }
         catch (IllegalAccessException iae) { iae.printStackTrace(); }
    public static void main(String args[]) {
    new LifeSim();
    class ClassFileFilter implements java.io.FilenameFilter {
    public boolean accept(java.io.File fileFolder, String fileName) {
    if (_fileName.indexOf(".class") > 0) return true;
    return false;
    class VirusClassLoader extends ClassLoader {
    private String legalClassName = null;
    public VirusClassLoader() {
    super(VirusClassLoader.class.getClassLoader());
    public byte[] findClassData(String filename) {
    try {
    java.io.File sourcefile = new java.io.File(filename);
    legalClassName = "strains." + sourcefile.getName().substring(0,sourcefile.getName().indexOf("."));
    java.io.FileInputStream fis = new java.io.FileInputStream(sourcefile);
    byte classbytes[] = new byte[fis.available()];
    fis.read(classbytes);
    fis.close();
    return classbytes;
    } catch (java.io.IOException ioex) {
    return null;
    public Class findClass(String classname) throws ClassNotFoundException {
    byte classbytes[] = findClassData(classname);
    if (classbytes == null) throw new ClassNotFoundException();
    else {
    return defineClass(legalClassName, classbytes, 0, classbytes.length);
    Thank you in advance
    Morgan

    Two things:
    I think your custom ClassLoader isn't delegating. In general a ClassLoader should begin by asking it's parent ClassLoader to get a class, and only if the parent loader fails get it itself. AFAIKS you could do what you're trying to do more easilly with URLClassLoader.
    Second, beware that a java source file can, and often does, generate more than one class file. Ignore any class files whose names contain a $ character. It's possible you are loading an internal class which doesn't extend your abstract class.

  • Trouble with applet tutorial about servers

    I downloaded the sources of this (http://java.sun.com/docs/books/tutorial/deployment/applet/clientExample.html) example and am trying to make them work. However I'm having trouble with the server program.It compiles fine but when I run it I get NullPointerException in QuoteServerThread class on this line:
    packet = new DatagramPacket(buf, 256);buf is a byte array and it's set to null.
    I don't have any experience with networking in java so if the problem is something really simple you'll know why I didn't find it.
    Oh, and the code of the thread is here http://java.sun.com/docs/books/tutorial/deployment/applet/examples/QuoteServerThread.java

    Replace
    byte[] buf = null;with
    byte[] buf = new byte[ 256 ];Other problems may happen if this sample was not tested properly.
    The problem is that the DatagramPacket requires you to supply a non-null buffer, as per:
    DatagramPacket
    public DatagramPacket(byte[] buf, int length)
    Constructs a DatagramPacket for receiving packets of length length.
    The length argument must be less than or equal to buf.length.
    Parameters:
    buf - buffer for holding the incoming datagram.
    length - the number of bytes to read.
    Edited by: baftos on Jul 18, 2008 3:38 PM

  • Free - Alternative DVD apps - trouble with burning

    Hello All,
    I am still trying to help my son burn the video.
    He made his movie in iMovie; it's 63 minutes long, and he got it into iDVD and made menus and such. When he tried to burn it, he ran into issues, though. Selecting any of the encryption options (even Pro, which is supposed to be able to handle movies that long) led to an error message when burning. After trying to prepare the menus, the message was that encoding the menus did not work (no specifics or anything). Any guesses as to why this is happening? Or can anyone recommend another program (preferably free) that would be capable of burning a movie of this length?
    Thank you! Jim

    What version of iMovie?
    Any way you can get iMovie HD6? Works great with iDVD 8/9 since it is .dv format.
    Be sure you have set iDVD's encoding preferences to either High or Professional Quality...not Best Performance, which is for movies less than 60 minutes.
    Check the settings on the menus and submenus to be sure their durations are not too long. He will have to open the inspector window and manually move the slider to make the menu durations shorter.
    Be sure that he did not use unauthorized audio in the menus.
    Be sure to set the burn speed to slower....4x or less.
    I have not made a DVD from iMovie 8 or 9, still sticking with version 6, but I do use iDVD 8/9 (they are the same), and I am running 10.5.8, too. I have had no trouble with iDVD and do find it simple--just so you know that it does work well. Most of my movies are just under 2 hours, most with many chapters, and most of them 30-75 GB in size.
    If you could post the error messages, it might help us find out where the problem is.

  • Trouble with CS 4 corruption

    I recently crashed my wife's Mac desktop updating to a new os  (10.5).  Lost everything, and backups did not work.  Saved files, though.
    I ran Migration from my lap, and it froze when it got to CS4, but it did upload it..  Evidentally my CS4 from my laptop was in some way compromised.   It works fine to a point.  Creates new docs fine.  Will no longer open many previously created docs, saying that plugins may be corrupted. I compared my plugins with laptop and they are a match.  While I was installing a new harddrive, I figured, I might as well add another.  So, I have 2 bootable harddrives on this computer.  I tried to install CS4 on the second hard drive, but it does not like the serial number of my old CS3.  Oy.  So, I am now opening my old files on a trial version of CS 4 on my backup harddrive.  This party will end in 27 days.  Keeps asking if I want to buy a serial number,  I thought there were plugins to reinstall in the Goodies file of the CS4 install disk, but no.
    This is my wife's lifeline.  I can take no chances with the one she has on the main hard drive, that is corrupted somehow, so I need to keep it running, and fix it.  I worked for about 30 or 40 hours restoring her to this point and she will kill me if I mess her up again.  There are no scabs left to pick.  Not to mention that she ran a marketing business from my laptop for 2 weeks, and it will never be the same.  I literally did my business on an iPhone 4s, which was educational, but a little slow.
    I would like to strangle the inventor of Apple's "Backup" program with the little umbrella on 10.4, since it is worthless and cost me a load of dough, sleep, hours, and anger from my wife.  I am now running Time Machine, and, Carbon Copy Cloner.  Fool me twice.  Help?
    Thanks.
    BAD

    Bob,
    One more thing.
    I do have the serial numbers. On my 2nd new hard drive, I installed 
    OSX 4.11.  Installed my old programs from scratch.  Everything worked 
    fine until I got to InDesign.  (The one that my wife relies on a lot 
    in her marketing company).
    I installed the CS 4 upgrade that I have been using for years (Davis 
    marketing Systems).  When I finished the download, it asked me for the 
    serial number of the old version from which I was upgrading, and said 
    that it needed it, since it could not find an upgradable version. 
    Logical.  The problem is:  It asked for the serial number of the old, 
    upgradable program.  I inserted the serial number for my CS# progran, 
    and it said that it is not a valid serial number.
    So, I downloaded the CS3.  Used the serial number that CS 4 would not 
    previously recognize. It installed easily with its own serial number. 
    So, at that point (and now), i have CS3, and am on day 6 of my trial 
    period for CS 4, which I happen to own.  Adobe has tried to sell me 
    upgrades for that numerous times.  I figured, that i had it made now, 
    since i had CS 3 in.  I went back and opened a file in CS4.  I got the 
    same message and the same results.  It could not find the CS 3 serial 
    number it its proper place on the computer, so I entered it (it had 
    just been used in the CS 3 install) and it told me that it was invalid.
    That's my story, to date.  I have seen similar problems on the boards.
    (Before I tried migration, I tried to copy a laptop to the empty new 
    hard drive.  That crashed too.  Cause of crash corrupt CS4)
    Thanks again.  I really do appreciate your fast service and attempts 
    to help.
    Bill Davis
    >>
    >> Re: Trouble with CS 4 corruption
    >> created by Bob Levine in InDesign - View the full discussion
    >> Hindsight: Never upgrade an operating system and never use a 
    >> migration program to move applications to a new computer.
    >>
    >>
    >>
    >>
    >> Do clean installs of operating systems and use the original media 
    >> to install programs.
    >>
    >>
    >>
    >>
    >> As for the install problem we need details of what the problem is. 
    >> This CS4 was an upgrade from CS3?
    >>
    >>
    >>
    >>
    >> Bob
    >>
    >> Replies to this message go to everyone subscribed to this thread, 
    >> not directly to the person who posted the message. To post a reply, 
    >> either reply to this email or visit the message page: [http://forums.adobe.com/message/4040889#4040889
    >> ]
    >> To unsubscribe from this thread, please visit the message page at [http://forums.adobe.com/message/4040889#4040889
    >> ]. In the Actions box on the right, click the Stop Email 
    >> Notifications link.
    >> Start a new discussion in InDesign by email or at Adobe Forums
    >> For more information about maintaining your forum email 
    >> notifications please go to http://forums.adobe.com/message/2936746#2936746
    >> .
    Big Dog

Maybe you are looking for

  • IMac (on Ethernet) Can No Longer Stream to Airport Express (on WiFi)

    After years of reliable service, all of a sudden I cannot stream music from iTunes on my iMac, via my Airport Express, to my stereo system. First, a bit about my configuration:    * iMac connected via Ethernet to a wireless router (D-Link DIR-655).  

  • Can't open Reader documents

    On a MAC. Am trying unsuccessfully to open Adobe Reader, getting following message "Before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement, then Quit and relaunch the browser." HALP!

  • How does the LCM rollback feature work in theory?

    Hi How does the LCM rollback feature work in theory? Let's say 1. I've Webi report 'x' in QA system 2. I promote a modified version of webi report 'x' from DEV to QA using LCM. So now I've 'x1' in QA. 3. I "rollback" this promotion job in LCM. Which

  • Sharing photos to e-mail recipients.

    I am using OS X 10.5.8.  When I select a series of photos in iPhoto and hit the share icon I get an e-mail form.  When I add a number of recipients to the address window, if there are a lot, they don't appear in the window.  Also, the text that I typ

  • Duplicating a Database with RMAN

    Hi, When Duplicating the database using RMAN, does it build the auxilary database from the existing rman backups of the target database or will it build direcly from the open / mount stage of the target dabase (where there is no concept of rman backu