Movieclip's width is always zero

Hi, I am having some trouble with some Movieclip this time so I come here to ask for help again.  Please see following for my current code, whenever I try detecting the MC's width, it always display zero for some reason.
On the 2nd frame, the following function will start loading.  After the initial turn, I have another condition statement to check whether it should go to another frame or not.  If it's staying in this frame, it will load this function again, and the temp_counter will increases.
tel_phrase_holder is just a dynamic textfield I use to display the width only.
function tel_load () {
    tel_holder.removeChildAt(0);
    var a = new Loader();   
    tel_holder.addChild(a);
    a.load(new URLRequest(tel_pic_start[temp_counter - 1]));
    tel_phrase_holder.text = tel_holder.width.toString();
I tried putting "tel_phrase_holder.text = tel_holder.width.toString();" at the beginning as well like I did at the following code.  It's slightly better, but it's loading the previous picture's width instead of the current picture's width.
function tel_load () {
   tel_phrase_holder.text = tel_holder.width.toString();
     tel_holder.removeChildAt(0);
     var a = new Loader();   
     tel_holder.addChild(a);
     a.load(new URLRequest(tel_pic_start[temp_counter - 1]));
Thanks in advance

When you issue a URLRequest for the loader you have to wait until the content finishes loading and is ready to be accessed before you try and get properties. That is why when you put the code at the beginning you get the results of the "previous" contents, because at that point they aren't previous at all!
Check out the documentation for the Loader class. Basically you need to do this:
var a:Loader = new Loader();
a.contentLoaderInfo.addEventListener(Event.INIT,initHandler)
function initHandler(e:Event){
     // the content has loaded and is ready
     trace(e.target);
     // do what you need

Similar Messages

  • Reference point locater missing, x and y always zero

    Hey,
    I don't know how it happened, but it sure did and its making me crazy! My reference point locater is nonfunctioning. The x and y axis points are always zero. Knowing what happened would be fine but knowing how to fix it would be a miracle! Anybody?

    Cindy,
    One of the first things to try is to Move the folder, see instructions and explanations here: http://www.bugge.com/Family-and-friends/Illy/illy.html

  • Popularity trends report always zero

    I am migrating serveral site collections from SP2010 to SP2013 farm. After migrated the sites, I enabled "Reporting" feature in site collection feature list.
    I found the usage report is always zero and after some research I performed the check suggested here:
    http://geekswithblogs.net/bjackett/archive/2013/08/26/powershell-script-to-workaround-no-data-in-sharepoint-2013-usage.aspx
    I found the Receivers are not well defined. After running the powershell script suggested I am able to define the Receivers.
    However, after 24 hours, all the reports still show zero. What else I can check? Thank you!

    Hi Mark,
    As I understand, usage report shows empty in your site collection. So far, you have confirmed the related two timer jobs work well as Inderjeet suggested, and defined new receivers as the blog you posted.
    Below are the tips you should take into consideration when testing the issue:
    1. Site we want to get web analytics report of should be in the content source.
    2. Site should be accessed by normal users; site accessed by farm admin users will be ignored by web analytics.
    3. Site should be accessed from client machines; site accessed with in server will be ignored by web analytics.
    4. System pages like pages under _layouts, _catalogs and web service calls are ignored web analytics.
    5. Also give at least 1 day to see data in usage report after you have accessed site.
    Below are the suggestions you could check:
    1.Confirm timer service is running, search service works well and run a full crawl for the site collection.
    2.Ensure the account for Usage and Health Data collection has enough permission.
    http://technet.microsoft.com/en-us/library/ee663480(v=office.15).aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Confirmed qty is always zero..

    Hi all,
    I am testing the Consignment Process in SD.
    I have done the below settings in IMG.  But when I create the Consign Fillup Order, always the "Availability Control Screen" pops with the Confirmed qty showing always ZERO....even though the plant has sufficient stock.
    When I create Normal Sales Order, I don't get this message. Is't becos in Schedule Line cate CP the Av check is not ticked in t-code : VOV6 for movement type 601 ???
    1. Consignment fill up:
    Sales document type is KB
    Item category KBN
    shedule line category E1
    In this step, since we are not invoicing the customer. document flow is sales order -
    delivery item category. It will not be relevent for billing and pricing because we are not charging money for these goods in this step.
    In schedule line category, we will set movement type 631 & set for availability check and TOR.
    2. Consignment Issue.
    Once the customer informed us that he used all the goods or partial goods then we will create consignment issue for used goods.
    Sales document: KE
    Item category: KEN
    shedule line category: C0 or C1
    Here we are invoicing the customer(because he used the goods). We assign the delivery documnt and billing document to the sales document.
    In item category, we are setting relevent for billing, pricing, special stock.
    In schedule line category, the setting is 633 movement type, relevent for availability check & TOR.
    3. Consignment Return: Customer found that some goods are damaged or he not able to sold the goods he want to send it back. that we are creating this document.
    Sales document type: KR
    Item category: KRN
    Shedule line category: D0
    Then I assigned delivery document and billing to sales document. We create return order, return delivery, return billing.
    The setting for item category is relevent for billing, returns, pricing, special stock.
    The setting for schedule line item category: 634 movement type, NO availability NO TOR.
    4. Consignment Pick up:
    Even if we create the consignment return the goods are not coming directly  to our plant. For that we need to create consignment pick up. here the owner ship is not changing so we do not need to create billing.
    Assign retrun delivery to sales document type.
    Sales document: KA
    Item category: KAN
    schedule line category: F0 & F1
    The item category is relevent for returns. any shedule line category relevent for 632 movement type, MRP, availability check, delivery.
    Regards,
    Pri

    Dear Anne
    My suggestion would be create the issue order with reference to proforma (F8).  Then only, you have the track record of whatever material despatches from plant tallies with material available in issue order.
    If you create  issue order with reference to fill up order, at a later stage, you will not be able to track despatch details accurately.
    To explain your requirement in detail, my comments would be as follows:-
    You created Consignment fillup order for x1 material 10 pcs.  For this you create fillup delivery and proforma invoice.  Based on this proforma invoice, you create an issue order so that whatever you transfer the stock to warehouse, for that quantity only, you issue order will show the details.
    Against this issue order, you create a issue delivery for 10 pcs and generate commercial invoice (F2) for the same.  Now as you said, if end customer rejects 2 pcs out of 10 pcs, you create a return order with reference to commercial invoice.  It should NOT be with reference to issue order.
    I am sure, now your flow will be in line with the standard process.
    Thanks
    G. Lakshmipathi
    ps:-  think you took most of my today's time ::).  no problem in turn, I am also checking my capability in this process.  reward if this really useful

  • IPV6 DHCP : Active Clients always zero 0

    Hello All,
    I have configure IPV6 DHCP by using below mentioned configuration, all my LAN PCs are getting IPV6 correctly and internet is also running well.
    But if run this command on Router, so it shows Active Clients are always zero 0.
    R1# sh ipv6 dhcp pool
    DHCPv6 pool: DHCP_POOL
      DNS server: 2001:470:ab::cd
      Domain name: abc.com
      Active clients: 0
    R1# sh ipv6 dhcp binding --> also show empty result.
    Can anyone please tell me the reason .
    MY CONFIGURATION:
    ipv6 unicast-routing
    ipv6 dhcp pool DHCP_POOL
    dns-server 2001:470:ab::cd
    domain-name abc.com
    interface FastEthernet0/0
    no ip address
    speed 100
    full-duplex
    ipv6 address 2400:FC00:ab::/64 eui-64
    ipv6 nd prefix 2400:FC00:ab::/64
    ipv6 nd other-config-flag
    ipv6 dhcp server DHCP_POOL
    ipv6 route ::/0 2400:FC00:ab::1
    int fa0/0 is directly connected to my LAN Switch.
    Regards,

    Ok , the problem solved by changing the configuration in this way. Now it is showing Active clients and Bindings.
    I will try your method too, to just add ipv6 nd managed-config-flag in my previous config.
    But i am still confused which configuratrion is better and which technique to use ?? 
    My previous config was stateless , is my new config is stateful ??
    My NEW Configuration:
    ipv6 unicast-routing
    ipv6 cef
    ipv6 dhcp pool DHCP_POOL
    address prefix 2400:FC00:ab::/64 lifetime infinite infinite
    link-address 2400:FC00:ab::2/64
    dns-server 2001:470:ab::cd
    domain-name abc.com
    interface FastEthernet1/0
    no ip address
    duplex full
    speed 100
    ipv6 address 2400:FC00:ab::2/64
    ipv6 enable
    ipv6 nd managed-config-flag
    ipv6 dhcp server DHCP_POOL
    ipv6 route ::/0 2400:FC00:ab::1

  • 1099-MISC nonemployee compensation amount always zero in lower part

    Hi,
    When I m trying to execute withholding tax report S_P9C_18000158 ( for 1099-MISC ) for multiple vendor account, the form is not printing Nonemployee compensation for vendor who are getting printed in lower half of form. The same is getting printed for all vendor in upper half.
    Rest all data are getting printed properly in both half.
    The nonemployee compensation amount always shows zero in lower half.
    I doubt if we need some notes or any settings? any inputs would be appreciable
    Thanks
    Pankaj

    Hi Praveen,
    Thanks a lot for the input.
    Yes I tried downloading the file and the amount shows correctly for both upper and lower part.
    Infact I have already checked sapscript form and found in std program the amount in lower form is assigned to bset-fwbase field and sapscript forms prints the value
    in field *bset-fwbase. so its only changing the assignment in td prg.
    But before doing the repair ...I just wanted to know if there is some notes provided for this so that we dont have to touch std code..
    let me know if u r aware of any...
    Thanks
    Pankaj

  • Nast-Anzal(no of copies) is always zero for GR Label

    Hi ,
      I am issuing GR slips.I have choosen "Individual Slip" Print option and I have given "No of GR Slips" as 3 .My requirement is to print Multile GR slips.But its always printing one.I checked the NAST Table entry .I found the Anzal (no of copies)  field of NAST  is zero.Please,let me know the problem.
    Thanks in advance.
    Nuthan.

    Number of GR Slip/Label is being decided from this code, not from the NAST.
    Code snippet which decides the no of copies from program SAPM07DR routine ENTRY_WE01 .
      IF not t159p-xmehr is initial.
        IF mseg-weanz gt 0.
          anzahl = mseg-weanz.
        ELSE.
          anzahl = 1.
        ENDIF.
      ELSE.
        anzahl = 1.
      ENDIF.
    Find out, what do you have in this values.
    Regards,
    Naimesh Patel

  • JQuery width() height() always get stage size instead of div size?

    I have an Edge project with nested Symbols. In a 3rd level symbol instance, I log it's real size like this.
    var stageWidth = $(window).width();
    var w = sym.getSymbolElement().width();
    console.log(w,stageWidth);
    When it's in the creationComplete event handler, it shows the right size.
    When it's in the mousemove event handler, it always shows that div size == stage size.
    I have tried hours not to find the solution.
    What is this problem?

    Trying to use logic to locate the problem ( at least trying...)
    - if the code is placed in 3rd level, maybe the stageWidth is calculating something else than stage size?
    - if the code is placed in stage maybe the w is not targeting the right element?
    - Does it mean that during the mouseMove the creation has not completed yet? what could be the explanation for the contradictory results here?
    - maybe during mouseMove you are performing some sort of transform or modification on the element, and it makes the width equal to stage size? something to manipulate the w value after its creation?
    - maybe w is not reading the size you are actually interested to read ( like the value of w is equal to stage in reality and this is what shown in mouseMove but interestingly in creationComplete you get unequality. Assuming the  reverse scenario, suspecting the creationComplete results instead)
    - what happens if you replace mousemove to a click event?
    hope it helps, i guess this is how sherlock holmes would try to help you. not enough knowledge on creationComplete to find the flaw here...

  • KeyCode always zero

    Hi all.
    I'm trying to get my JTextField to transfer focus when the user hits enter. However, for some reason, I always get zero when I call keyEvent.getKeyCode(). The weird thing is, the getKeyChar() shows the correct character. Something funky is going on.
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import javax.swing.BoxLayout;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class MyCustomTextField extends JTextField {
         protected void processKeyEvent(KeyEvent e) {
              if (e.getID() == KeyEvent.KEY_TYPED) {
                   System.out.println(
                        "TYPED IN PROCESSKEYEVENT: " + e.getKeyChar() + " " + e.getKeyCode());
                   if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                        transferFocus();
              super.processKeyEvent(e);
         public MyCustomTextField() {
              super();
              setColumns(10);
              addKeyListener(new KeyAdapter() {
                   public void keyTyped(KeyEvent e) {
                        System.out.println(
                             "TYPED IN KEYADADPTER: " + e.getKeyChar() + " " + e.getKeyCode());
                        super.keyTyped(e);
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().setLayout(
                   new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS));
              JPanel panel = new JPanel();
              panel.add(new MyCustomTextField());
              panel.add(new MyComboBox());
              frame.getContentPane().add(panel);
              panel = new JPanel();
              panel.add(new MyCustomTextField());
              panel.add(new MyComboBox());
              frame.getContentPane().add(panel);
              frame.pack();
              frame.show();
    class MyComboBox extends JComboBox {
         MyComboBox() {
              super(new String[] { "Cool", "Not Cool" });
         public void processKeyEvent(KeyEvent e) {
              if (e.getID() == KeyEvent.KEY_TYPED) {
                   System.out.println(
                        "TYPED: " + e.getKeyChar() + " " + e.getKeyCode());
                   if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                        transferFocus();
              super.processKeyEvent(e);
    }output-> First letter is character typed, next letter is keycode of the character.
    TYPED IN PROCESSKEYEVENT: a 0
    TYPED IN KEYADADPTER: a 0
    TYPED IN PROCESSKEYEVENT: s 0
    TYPED IN KEYADADPTER: s 0
    TYPED IN PROCESSKEYEVENT: d 0
    TYPED IN KEYADADPTER: d 0
    TYPED IN PROCESSKEYEVENT: f 0
    TYPED IN KEYADADPTER: f 0

    Works OK changing
    if (e.getID() == KeyEvent.KEY_TYPED) {
    to
    if (e.getID() == KeyEvent.KEY_PRESSED) {
    and
    public void keyTyped(KeyEvent e) {
    to
    public void keyPressed(KeyEvent e) {                                                                                                                                                                                                                                                                                                                                                                           

  • Step Count always zero?

    Hi,
    Report generation sequence file, like reportgen_txt.seq shipped with TestStand, has step called "add step count". In my understanding it comes from model, like sequential model.seq, but I have always seen it to be zero.
    I was interpretating this parameter in report would tell how many steps a test took in total, because my test execution may take different number of steps. Is my assumption correct that this parameter would tell total number of steps executed, including all step executed e.g. in a while loop ?
    br
    petri
    Solved!
    Go to Solution.

    Thanks Sahana your reply.
    That seems to be true in my machine when I have selected report generator option DLL. But when I have selected sequence option, which I want to use because I have a custom reporter to excel sheet, the step count remains zero. I'm not sure if something has happened with sequences, they are pretty old originally coming from TestStand 3.x. Anybody help to try this ?
    Sequence file attached.
    Attachments:
    add step count to report.seq ‏7 KB

  • Measuring ellapsed time always zero in FlashBuilder 4

    Here is what I have worked out so far:
    I declare some public variables.
        <fx:Script>
            <![CDATA[
                import flash.utils.getTimer;
                import mx.controls.Alert;
                import mx.events.FlexEvent;
                import mx.events.ListEvent;
                public var now: Date = new Date;
                public var beg_tck: uint;
                public var end_tck: uint;
    I then start my app in debug mode.
    I then click a button and load the beg_tck variable:
                protected function btnGo_clickHandler(event:MouseEvent):void
                 beg_tck = now.getTime();
                 ... "hit and stay at debug stop"...
    I go over to the debug screen in FlashBuilder 4 and wait about 3 seconds, then I resume with F8
    I have a updateComplete which loads the end_tck, and displays their contents.
            protected function grdSBJs_updateCompleteHandler(event:FlexEvent):void
                        end_tck = now.getTime();  //  - beg_tck
                        lblResponseTime.text = 'Response time: ' + String((end_tck)) + '  beg_tck: ' + String(beg_tck);                   
    For some reason beg_tck and end_tck are ALWAYS THE SAME.
    Why is this happening?  Even though I've held back processing for 3 seconds, the now.getTime() is putting the exact same number into beg_tck and end_tck.
    Thanks in advance for any help you can provide.

    Because now still refers to the same object (the one that is created when your component is initialized). Try new Date().getTime().

  • Mouse position always zero

    Hello!
    I am developing a rather big application in Labview ver 8.2.
    I have a problem with getting the mouse position inside a picture.
    The property node mouse->mouse position always returns (-1, -1) or (0, 0). The (-1, -1) returns if the mouse is positioned over a scrollbar.
    My problem is that the (0, 0) is returned for every position inside the picture.
    Now i  wonder if anybody has any suggestions how to get the mouse position to be returned correctly.
    Best regards
    Erik Johansson

    Are you saying that you cannot reproduce the problem if you reduce it to a very small program (e.g. a loop containing only an image, appropriate property node with indicator and a small wait statement)?
    Where did your code come from? Was it converted from an earlier version or coded from scratch in 8.20? Have you tried deleting the current image indicator and creating a new one?
    LabVIEW Champion . Do more with less code and in less time .

  • SPRM Audio value always zero?

    Hi there,
    I've been working on a 5-language DVD an trying to manage the audio streams in scripts by using the SPRM audio values (SPRM 1
    Even when I been using different audio languages defaults with in the simulator, the SPRM audio value will be still displayed as zero.
    Is this a bug in the simulation or does the default audio stream that could be choosen there, take no effect to the simulator?
    Thanks for your comments and help in advance!
    Regards from Germany!

    Hi there all,
    sorry - after more tryouts I've found that there is not the language value in SPRM1 displayed, it is the audio track value!
    In this case it would be better for me to use SPRM0 values in the scripts to choose the right language track.

  • HD7950 temp sensor always zero + auto fan always 100%

    After installing new card and latest CCC software and drivers as soon as windows starts, the card fan goes to 100% even at idle.  In Performance section of CCC GPU temp reads 0c at all times even under load.
    Tried uninstall CCC, remove card, re-install card and then CCC, no dice... same problem.  I can manually adjust the fan speed in CCC but it's a PITA and shouldn't be necessary.
    Do I have a faulty temp sensor perhaps?
    Thanks....

    Quote from: flobelix on 26-November-12, 13:46:47
    Obviously either driver isn't correctly installed or it's indeed a sensor misreading caused by a defect.
    Remove current driver in safe mode using>>Driver Fusion<<. Reboot and install latest MSI driver:
    Thanks for the suggestion.  Gave it a whirl but still the same deal.  Temp 0c - Power 0% - Activity 0% - Fan 100% from the moment Win7 starts no matter what the card's doing.
    Only thing I didn't follow to a T from syour suggestion is that the free version of Driver Fusion said it required upgrading to Pro to remove all driver items even in Safe Mode.

  • Set sidebar width of (Finder window 1) to 0 - (no longer working for me)

    on script_title()
    Filename : finderwindowprops.scpt (Script Debugger)
    Author : Bill Hernandez
    Version : 1.0.0
    Updated : Thursday, December 14, 2006 ( 6:01 PM )
    end script_title
    -- ---------+---------+---------+---------+---------
    on script_notes( )
    Setting the sidebar width for finder windows is not working consistently,
    nor correctly for me. I had written several scripts to standardize the
    display of windows on screen several months ago, and they have quit working
    during the last couple of versions of the OS, not sure what has happened ?
    end script_notes
    -- ---------+---------+---------+---------+---------
    on run
    tell me
    set this_folder to (path to current user folder)
    SetupWindow(this_folder)
    if (ChooseTest() = 1) then
    TestOne(this_folder)
    else
    TestTwo(this_folder)
    end if
    set str to ""
    set str to str & "The Sidebar Width Should be Zero" & return & return
    set str to str & "It had worked well several months ago when I was doing some "
    set str to str & "window stacking, but it seems to be broken for me..." & return & return
    set str to str & "iMacG5 running OSX 10.4.8" & return & return
    ShowMsg(str, 10)
    end tell
    end run
    -- ---------+---------+---------+---------+---------
    on SetupWindow(whichFolder)
    tell application "Finder"
    activate
    set counter to 1
    try
    open whichFolder
    select Finder window 1
    on error
    set win to make new Finder window
    end try
    set bounds of (Finder window counter) to {20, 60, 700, 700}
    set current view of (Finder window counter) to icon view
    set toolbar visible of (Finder window counter) to true
    set sidebar width of (Finder window counter) to 300
    set w_props to get properties of Finder window 1
    set str to ""
    set str to str & "The Sidebar Width Should be 300" & return & return
    set str to str & "Sidebar Width : " & ((sidebar width) of w_props)
    my ShowMsg(str, 0)
    end tell
    end SetupWindow
    -- ---------+---------+---------+---------+---------
    on TestOne(whichFolder)
    tell application "Finder"
    activate
    set counter to 1
    try
    open whichFolder
    select Finder window 1
    on error
    set win to make new Finder window
    end try
    set bounds of (Finder window counter) to {20, 60, 600, 600}
    set current view of (Finder window counter) to list view
    set toolbar visible of (Finder window counter) to true
    set sidebar width of (Finder window counter) to 0
    set w_props to get properties of Finder window 1
    set str to ""
    set str to str & "The Sidebar Width Should be Zero" & return & return
    set str to str & "Sidebar Width : " & ((sidebar width) of w_props)
    my ShowMsg(str, 0)
    end tell
    end TestOne
    -- ---------+---------+---------+---------+---------
    on TestTwo(whichFolder)
    tell application "Finder"
    activate
    set w_props to {}
    set w_props to w_props & {sidebar width:0}
    set w_props to w_props & {current view:list view}
    set w_props to w_props & {toolbar visible:true}
    set w_props to w_props & {statusbar visible:true}
    set w_props to w_props & {bounds:{20, 60, 400, 600}}
    try
    open whichFolder
    select Finder window 1
    on error
    set win to make new Finder window
    end try
    set w_ref to Finder window 1
    set properties of w_ref to w_props
    set w_props to get properties of Finder window 1
    set str to ""
    set str to str & "The Sidebar Width Should be Zero" & return & return
    set str to str & "Sidebar Width : " & ((sidebar width) of w_props)
    my ShowMsg(str, 0)
    end tell
    end TestTwo
    -- ---------+---------+---------+---------+---------
    on ChooseTest()
    tell application "Finder"
    activate
    set s to ""
    set s to s & "The sidebar width is inconsistent no matter which method I use." & return & return
    set s to s & "Sometimes there is a sidebar, sometimes there is none, particularly "
    set s to s & "with a window that already exists." & return & return
    set s to s & "Method one seems to work better, but does not always hide the sidebar." & return & return
    set s to s & "Please select a choice..."
    set b1 to "TestOne"
    set b2 to "TestTwo"
    set aReturn to display dialog s buttons {b1, b2} default button {b2}
    if (button returned of aReturn = b1) then
    return 1
    else
    return 2
    end if
    end tell
    end Choose
    -- ---------+---------+---------+---------+---------
    on ShowMsg(s, howLong)
    tell application "Finder"
    activate
    if (howLong = 0) then
    set theTIme to 3
    else
    set theTIme to howLong
    end if
    set b1 to "OK"
    display dialog s buttons {b1} default button {b1} giving up after theTIme
    end tell
    end ShowMsg
    -- ---------+---------+---------+---------+---------

    This is a re-post since I learned how to format the output a little nicer...
    on script_title()
       Filename : finderwindowprops.scpt (Script Debugger)
       Author : Bill Hernandez
       Version : 1.0.0
       Updated : Thursday, December 14, 2006 ( 6:01 PM )
    end script_title
    -- ---------+---------+---------+---------+---------
    on script_notes()
       Setting the sidebar width for finder windows is not working consistently,
       nor correctly for me. I had written several scripts to standardize the
       display of windows on screen several months ago, and they have quit working
       during the last couple of versions of the OS, not sure what has happened ?
    end script_notes
    -- ---------+---------+---------+---------+---------
    on run
       tell me
          set this_folder to (path to current user folder)
          SetupWindow(this_folder)
          if (ChooseTest() = 1) then
             TestOne(this_folder)
          else
             TestTwo(this_folder)
          end if
          set str to ""
          set str to str & "The Sidebar Width Should be Zero" & return & return
          set str to str & "It had worked well several months ago when I was doing some "
          set str to str & "window stacking, but it seems to be broken for me..." & return & return
          set str to str & "iMacG5 running OSX 10.4.8" & return & return
          ShowMsg(str, 10)
       end tell
    end run
    -- ---------+---------+---------+---------+---------
    on SetupWindow(whichFolder)
       tell application "Finder"
          activate
          set counter to 1
          try
             open whichFolder
             select Finder window 1
          on error
             set win to make new Finder window
          end try
          set bounds of (Finder window counter) to {20, 60, 700, 700}
          set current view of (Finder window counter) to icon view
          set toolbar visible of (Finder window counter) to true
          set sidebar width of (Finder window counter) to 300
          set w_props to get properties of Finder window 1
          set str to ""
          set str to str & "The Sidebar Width Should be 300" & return & return
          set str to str & "Sidebar Width : " & ((sidebar width) of w_props)
          my ShowMsg(str, 0)
       end tell
    end SetupWindow
    -- ---------+---------+---------+---------+---------
    on TestOne(whichFolder)
       tell application "Finder"
          activate
          set counter to 1
          try
             open whichFolder
             select Finder window 1
          on error
             set win to make new Finder window
          end try
          set bounds of (Finder window counter) to {20, 60, 600, 600}
          set current view of (Finder window counter) to list view
          set toolbar visible of (Finder window counter) to true
          set sidebar width of (Finder window counter) to 0
          set w_props to get properties of Finder window 1
          set str to ""
          set str to str & "The Sidebar Width Should be Zero" & return & return
          set str to str & "Sidebar Width : " & ((sidebar width) of w_props)
          my ShowMsg(str, 0)
       end tell
    end TestOne
    -- ---------+---------+---------+---------+---------
    on TestTwo(whichFolder)
       tell application "Finder"
          activate
          set w_props to {}
          set w_props to w_props & {sidebar width:0}
          set w_props to w_props & {current view:list view}
          set w_props to w_props & {toolbar visible:true}
          set w_props to w_props & {statusbar visible:true}
          set w_props to w_props & {bounds:{20, 60, 400, 600}}
          try
             open whichFolder
             select Finder window 1
          on error
             set win to make new Finder window
          end try
          set w_ref to Finder window 1
          set properties of w_ref to w_props
          set w_props to get properties of Finder window 1
          set str to ""
          set str to str & "The Sidebar Width Should be Zero" & return & return
          set str to str & "Sidebar Width : " & ((sidebar width) of w_props)
          my ShowMsg(str, 0)
       end tell
    end TestTwo
    -- ---------+---------+---------+---------+---------
    on ChooseTest()
       tell application "Finder"
          activate
          set s to ""
          set s to s & "The sidebar width is inconsistent no matter which method I use." & return & return
          set s to s & "Sometimes there is a sidebar, sometimes there is none, particularly "
          set s to s & "with a window that already exists." & return & return
          set s to s & "Method one seems to work better, but does not always hide the sidebar." & return & return
          set s to s & "Please select a choice..."
          set b1 to "TestOne"
          set b2 to "TestTwo"
          set aReturn to display dialog s buttons {b1, b2} default button {b2}
          if (button returned of aReturn = b1) then
             return 1
          else
             return 2
          end if
       end tell
    end ChooseTest
    -- ---------+---------+---------+---------+---------
    on ShowMsg(s, howLong)
       tell application "Finder"
          activate
          if (howLong = 0) then
             set theTIme to 3
          else
             set theTIme to howLong
          end if
          set b1 to "OK"
          display dialog s buttons {b1} default button {b1} giving up after theTIme
       end tell
    end ShowMsg
    -- ---------+---------+---------+---------+---------

Maybe you are looking for

  • Company name change and impact on table T882

    Hi We had to change the name of a company.  I did this in IMG via "Enterprise structure->Definition->Financial Accounting->Edit,copy,delete,check company code". This created a transport containing also table T882. Our problem is that the field VTRHJ

  • Hazard Symbol appeared - now won't play

    I created a project in iMovie with transitions, then exported, uploaded into iDVD, and then burned a copy to disc. I decided that the transitions were too fast, so went back into iMovie to change their durations. As soon as I did, the yellow triangle

  • Running Programs in Classic

    I just installed (tried) a scanner that was made for OS9, ran the install program learned I had to install OS9 so I got out my old restore disk and installed Classic. (not sure why it wasn't installed to begin with) Now I ran the install program, Cla

  • Cannot install Checkpoint Encryption but all other apps install

    OS 10.8.5. Checkpoint Encryption app fails to install. Downloaded and reinstalled the OS 8 times. Still the same result.

  • IMAC Retina won't boot external HD

    Dear Apple Community, I've tried to get my iMac Retina 5K to boot from an external thurderbolt HD using three different OS X installations: 10.7, 10.8 and 10.9... each time I get an error screen. Does the new iMAC boot anything other than 10.10? Chee