Setting JDialog owner when passed Window

Ok here we go.
I have a class (AbstractDialog) that extends JDialog to take care of some common functionality for me. I want to be able to set the dialog's parent and have therefore included constructors for accepting either a Frame or Dialog as the owner.
I have a new Dialog class MyDialog that extends AbstractDialog.
I have a component MyTable that extends component. There is an action in the table that needs to show MyDialog. However, the Window in which the table is in might be a Dialog or Frame. I can call SwingUtilities.getWindowAncestor to get the parent Window.
My problem is that since JDialog only takes a Frame or Owner in its constructor, is there some way I can configure my dialog classes to take a Window and then cast it to a Dialog or Frame to call the appropriate constructor?
So far the only think I can think to do is the following:
Window parent = SwingUtilities.getWindowAncestor(myTable);
if (parent instanceof Frame)
    new MyDialog ((Frame)parent);
else
   new MyDialog ((Dialog)parent);Is there a better way since repeating this code all over the place where I instantiate my dialogs seems really sucky.
Thanks,
John

A static constructor method is one possibility:
public class AbstractDialog extends JDialog {
    private AbstractDialog(final Frame frame) {
        super(frame);
    private AbstractDialog(final Dialog dialog) {
        super(dialog);
    public static AbstractDialog createDialog(final Component parentComponent) {
        final Window parentWindow =
            SwingUtilities.getWindowAncestor(parentComponent);
        if (parentWindow instanceof Frame) {
            return new AbstractDialog((Frame) parentWindow);
        } else if (parentWindow instanceof Dialog) {
            return new AbstractDialog((Dialog) parentWindow)
        } else {
            throw new IllegalStateException();
}

Similar Messages

  • Open PDF in same browser when the preference is set to open in new window.

    The corporate policy for all applications is to open the PDF document in new browser/reader but our application needs the reader to open in the same browser even the preference "Display PDF in Browser" is unchecked.... The setPreference from javascript (html) doesn't seemed to work... How do i make this work?
    Also, I need the links the browser to open in new browser once the PDF is loaded... do I need to reset the preference once it is loaded for the links to open in new browser?
    thanks,
    - Ray

    There is no way to override that from your application.   And if the Links in the PDF have an explicit "open in new window" setting, that is respected over the preference.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Wed, 19 Oct 2011 22:02:53 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Open PDF in same browser when the preference is set to open in new window.
    Open PDF in same browser when the preference is set to open in new window.
    created by h_ray<http://forums.adobe.com/people/h_ray> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3981167#3981167

  • How to  pass data between JDialog and its parent window ?

    Hi,
    I am new to swing. I want to know how pass data between a JDialog and its parent window.
    If you have any information please reply with example code.
    Thank You

    hi Encephalopathic ,
    I was looking for something like as it was given in the link provided by you.
    Thank you for reply It really helped me.

  • Can anyone tell me how to remove the owner when setting the location

    Hello,
    Can anyone tell me how to remove the owner when setting the location?
    Properties
       Table Name:  (Table Name)
       Table Type:   Tables
       Owner:           Public
       Overridden Qualified Table Name:  (Table Name - same as above)
    Any help would be appreciated.
    Thanks
    Ann

    Hi Ann,
    please check this document to determine the correct space for your question:
    Find Topic Spaces on SCN (Forums)
    If you need help moving it, let me know!
    Thanks,
    Kristen

  • I use pc windows 7 i downloaded new version fire fox i cant print wirelessly to my hp printer it is set as default when i chouse it from drop down it wont let me and it stays on the konica

    i use PC windows 7 i downloaded new version fire fox i cant print wireless to my hp printer it is set as default when i chose it from drop down it wont let me and it stays on the konica after down load new fire fox and chose disable option not compatible

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Why does my MacBook come up with window saying "setting Up Mac" when I turn it on and enter my password and stays there and does not go any further

    Why does my MacBook come up with window saying "setting Up Mac" when I turn it on and enter my password and stays there and does not go any further

    You may want to put this question on the MacBook community forum to get a better response.
    https://discussions.apple.com/community/notebooks/macbook

  • When I oppen the internet, I want this to be made by Mozilla Firefox, not by Internet Explorer how it made now. I want to know the steps for this setting. I have installed windows X. Thank you very much in advance!P.

    Question
    When I oppen the internet, I want this to be made by Mozilla Firefox, not by Internet Explorer how it made now. I want to know the steps for this setting. I have installed windows X. Thank you very much in advance!P

    Hi,
    This is [[How to make Firefox the default browser]]

  • How do you set default programs for all users when deploying Windows 8.1?

    I have my Windows 8.1 image set up the way I want including the start screen, theme, etc. But how can I set the default programs for all users. Most of out computers are non-touch and I want the desktop apps (e.g. Windows Photo Viewer), not the store apps
    to be the default for opening pictures, videos, etc. Can that be done?

    Great question, this has been bugging me too!
    So, I did some research by using "Set Default Programs" app in Windows 8. Then I ran the super ProcMon.exe tool from Sysinternals.com <Thanks Mark!>
    After filtering out the junk, I could see some *interesting* writes to the registry:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
    "Hash"="57y87/ogggU="
    "ProgId"="PhotoViewer.FileAssoc.Jpeg"
    But the "Hash" part had me concerned. I did some internet searching for the hash, and came across a post and a pointer to a blog with some answers.  This is both good news and bad.
    Background:
    One of the problems with Windows XP is that any program can come in and party on the entire system. No, I don't want you to put a shortcut on the desktop, install a crappy IE Toolbar, and change the default file association for *.jpg files to your app, I
    just wanted to play a stupid game. Since Windows 7, Microsoft has been attempting to block that functionality from the stupid applications, and give them back to the user. Take note of the last line in the ITaskbarList3 interface:
       Applications cannot programmatically pin themselves to the taskbar. That functionality is reserved strictly for the user.
    Of course that sucks for us IT Pros who may wish to create *default* working environments for corporate images, but there are some tricks we can do.
    Solution:
    This blog appears to have the answer:
    http://blogs.technet.com/b/mrmlcgn/archive/2013/02/26/windows-8-associate-a-file-type-or-protocol-with-a-specific-app-using-a-gpo-e-g-default-mail-client-for-mailto-protocol.aspx
    New for Windows 8 is a dism command: /Get-DefaultAppAssociations that allows you to export a control case from a known good computer. Microsoft the supports importing the exported xml file via GPO. For example, before I changed the file association, .AVI
    was pointing to the Modern App, after the change the /export-DefaultAppAssociations shows change to the new app:
    From:
    <Association Identifier=".avi" ProgId="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt" ApplicationName="Video" />
    To:
    <Association Identifier=".avi" ProgId="VLC.avi" ApplicationName="VLC media player" />
    I am still doing some investigation to see if a GPO is required, or if you can inject the association into a local user account. Also, if you do have some Modern Windows 8 Touch Tablets, it would recomend keeping most of the Modern App defaults in place,
    perhaps seperate GPO's for Desktops/Laptops vs Tablets?
    -k
    Keith Garner - keithga.wordpress.com

  • Firefox does not show numbers in arabic format when the windows regional settings is set to arabic, instead it shows numbers in latin characters

    when switching windows regional settings to Arabic, numbers are still shown in Latin characters, unlike other browsers (ex IE).
    == This happened ==
    Every time Firefox opened
    == all firefox versions

    See "bidi.numeral" in http://kb.mozillazine.org/About:config_entries#Bidi.
    See also http://mxr.mozilla.org/mozilla1.9.2/source/modules/libpref/src/init/all.js#1058
    To open the ''about:config'' page, type '''about:config''' in the location (address) bar and press the Enter key, just like you type the url of a website to open a website.
    If you see a warning then you can confirm that you want to access that page.

  • Itunes does not pass windows logo testing to verify CD/DVDrom drives, Why?

    Hello All,
    When I try to install Itunes 9.2 on my XP 32bit machine, I get the error message "Itunes does not pass windows logo testing to verify CD/DVD rom drives this software will not be installed. Contact your administrator" I am the owner & my account has administrator rights. When I start itunes i get the message "Itunes was not properly installed if you wish to burn Cds you will need to reinstall itunes" Any ideas what i should do anyone?
    Thanks
    Lacanox

    When I start itunes i get the message "Itunes was not properly installed if you wish to burn Cds you will need to reinstall itunes" Any ideas what i should do anyone?
    That sounds like the GEAR drivers that iTunes uses for burning and importing aren't going in properly. (or there's damaged GEAR drivers for an old install stuck on the PC.
    Perhaps manually uninstalling and reinstalling the GEAR drivers can get you past this. There's instructions for that on the GEAR wiki:
    [DRIVERS: Windows - Updating, removing, 64 bit versions, etc|http://www.gearsoftware.com/wiki/index.php?title=DRIVERS:Windows_-_Updating%2C_removing%2C_64_bit_versions%2Cetc]

  • Secondary monitor on 20"iMac, How to set portrait orientation when running

    How do you set the display rotation in Windows XP?
    I have a secondary monitor (wall-mounted at 90 degrees to normal) that OS X handles just fine (the display preference window provides a rotate function). However, when running Windows XP, the secondary monitor is still available, but I can not find a setting that will rotate the display. I downloaded the Apple Boot Camp ATI driver from AMD's site and the driver version went from 8.39 to 8.43. Still no visible way to rotate the secondary display. I then upgraded Boot Camp to 2.1 after which the ATI driver version went to 8.45. Still no rotate functionality.
    I have tried using the ALT-OPTION-ARROW key with no success (recommended on some obscure Windows XP forum). I also downloaded the Apple Boot Camp Crystal Control Center from the AMD site, but it would not execute after installation (this upon yet another obscure recommendation).
    I also have Windows XP on my MacBook. It uses an NVIDIA driver and it will allow display rotation.
    Any help or advice is appreciated.

    Updating my original post:
    I have resolved the issue. The ATI Catalyst Control Center app (I meant Catalyst, not Crystal in my original post) needs Microsoft's .NET Framework 2.0, which was not included in my original Windows XP installation.
    After downloading and installing the .NET Framework 2.0 package and reinstalling the Catalyst Control Center app, I am now able to rotate the secondary monitor display to the portrait orientation.
    I use the secondary monitor primarily viewing on-line documentation while working with an application on the primary screen. The portrait orientation provides a much better environment for reading documentation as I can view 2+ pages at the same time.

  • Script fails when passing values from pl/sql to unix variable

    Script fails when passing values from pl/sql to unix variable
    Dear All,
    I am Automating STATSPACK reporting by modifying the sprepins.sql script.
    Using DBMS_JOB I take the snap of the database and at the end of the day the cron job creates the statspack report and emails it to me.
    I am storing the snapshot ids in the database and when running the report picking up the recent ids(begin snap and end snap).
    From the sprepins.sql script
    variable bid number;
    variable eid number;
    begin
    select begin_snap into :bid from db_snap;
    select end_snap into :eid from db_snap;
    end;
    This fails with the following error:
    DB Name DB Id Instance Inst Num Release Cluster Host
    RDMDEVL 3576140228 RDMDEVL 1 9.2.0.4.0 NO ibm-rdm
    :ela := ;
    ERROR at line 4:
    ORA-06550: line 4, column 17:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    &lt;a string literal with character set specification&gt;
    &lt;a number&gt; &lt;a single-quoted SQL string&gt; pipe
    The symbol "null" was substituted for ";" to continue.
    ORA-06550: line 6, column 16:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev su
    But when I change the select statements below the report runs successfully.
    variable bid number;
    variable eid number;
    begin
    select '46' into :bid from db_snap;
    select '47' into :eid from db_snap;
    end;
    Even changing the select statements to:
    select TO_CHAR(begin_snap) into :bid from db_snap;
    select TO_CHAR(end_snap) into :eid from db_snap;
    Does not help.
    Please Help.
    TIA,
    Nischal

    Hi,
    could it be the begin_ and end_ Colums of your query?
    Seems SQL*PLUS hs parsing problems?
    try to fetch another column from that table
    and see if the error raises again.
    Karl

  • Database, Dataset, Table Adaptors Error "Unable to load, Update requires a valid DeleteCommand when passed DataRow collection with deleted row"

    Microsoft Visual Basic 2010 Express.
    I am new to Visual Basic programing and i am trying to understand the relationships between Datasets, database, table Adaptors. I have to following code that is is giving me the following error" Unable to load, Update requires a valid DeleteCommand
    when passed DataRow collection with deleted rows". 
    I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    It seems that i can delete the data on the DataGridView Table and it only displays the correct data. but my database is not updating, even though the data grid displays differently.I can determine this because, when i save the offset database, i have all
    the previous uploads and all the rows that i wanted to delete are still there.
    My final goal is to be able to import offset data from a CSV file, save this data on the pc, send a copy of this data to a NuermicUpDown so the customer can modify certain numbers. From here they download all the date to a controller.  IF the customer
    needs to modify the imported data, they can go to a tab with a data grid view and modify the table. They will also have to option to save the modified data into a csv file.  
    Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    CODE:
    Private Function LoadOffSetData()
            Dim LoadOffsetDialog As New OpenFileDialog 'create a new open file dialog and setup its parameters
            LoadOffsetDialog.DefaultExt = "csv"
            LoadOffsetDialog.Filter = "csv|*.csv"
            LoadOffsetDialog.Title = "Load Offset Data"
            LoadOffsetDialog.FileName = "RollCoaterOffset.csv"
            If LoadOffsetDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then  'show the dialog and if the result is ok then
                Try
                    Dim myStream As New System.IO.StreamReader(LoadOffsetDialog.OpenFile) 'try to open the file with a stream reader
                    If (myStream IsNot Nothing) Then 'if the file is valid
                        For Each oldRow As MaterionOffsetDataSet.OffsetTableRow In MaterionOffsetDataSet.OffsetTable.Rows
                            oldRow.Delete()                       
    'delete all of the existing rows
                        Next
                        'OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        Dim rowvalue As String
                        Dim cellvalue(25) As String
                        'Reading CSV file content
                        While myStream.Peek() <> -1
                            Dim NRow As MaterionOffsetDataSet.OffsetTableRow
                            rowvalue = myStream.ReadLine()
                            cellvalue = rowvalue.Split(","c) 'check what is ur separator
                            NRow = MaterionOffsetDataSet.OffsetTable.Rows.Add(cellvalue)
                            Me.OffsetTableTableAdapter.Update(NRow)
                        End While
                        Me.OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        MainOffset.Value = OffsetTableTableAdapter.MainOffsetValue          'saves all the table offsets
    to the offset numericUpDown registers in the main window
                        StationOffset01.Value = OffsetTableTableAdapter.Station01Value
                        StationOffset02.Value = OffsetTableTableAdapter.Station02Value
                       myStream.Close() 'close the stream
                        Return True
                    Else 'if we were not able to open the file then
                        MsgBox("Unable to load, check file name and location") 'let the operator know that the file wasn't able to open
                        Return False
                    End If
                Catch ex As Exception
                    MsgBox("Unable to load, " + ex.Message)
                    Return False
                End Try
            Else
                Return False
            End If
        End Function

    Hello SaulMTZ,
    >>I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    This error usually shows that you do not initialize the
    DeleteCommand object, you could check this
    article to see if you get a workaround.
    >> Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    If you are working CSV file, you could use OleDB to read it which would treat the CSV file as a Table:
    http://www.codeproject.com/Articles/27802/Using-OleDb-to-Import-Text-Files-tab-CSV-custom
    which seems to be easier (in my opinion).
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 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
    -- ---------+---------+---------+---------+---------

  • Do I need to install boot camp on Windows 7 as well as on Lion? I already installed it some years ago on Leopard when installing Windows Vista on my Macbook Pro. But now after installing Windows 7, many things in windows doesn't work (sound etc.)

    Do I need to install boot camp on Windows 7 as well as on Lion? I already installed it some years ago on Leopard when installing Windows Vista on my Macbook Pro. But now after installing Windows 7, many things in windows doesn't work (sound etc.). I made a clean installation because I needed to go from 32 bit to 64 bit.
    Or should I just update bootcamp in Lion? (cause when I search for "boot camp" in Windows 7 there's no result)

    Installation Guide
    Instructions for all features and settings.
    Boot Camp 4.0 FAQ Get answers to commonly asked Boot Camp questions.
    Windows 7 FAQ Answers to commonly asked Windows 7 questions.
    Apple Boot Camp Support
    Lion's Boot Camp Assistant 4.x should have downloaded Apple drivers as part of also partitioning.
    You need Apple drivers. And you then need to add on your own audio driver.
    You can run Assistant at any time to download and save a set of drivers.

Maybe you are looking for

  • How do I Update Preview?

    Hi there, I work for a college setting up images. I'm stuck in a spot now. I am using a Mac Pro, that has Snow Leopard installed. I'm going to be installing lots of software, (CS5, iLife, Office, etc) What I have been doing is putting folders in the

  • Can I use MBP 17" ac adaptor for my MBA 13"?

    Can I use MBP 17" ac adaptor for my MBA 13"? Thanks.

  • Does it all have to be in 1 Flash document?

    i'm doing a flash home page with a simple animated intro, which ends in a static page with links to html pages. so when i test the movie in flash everything goes right. so i publish. then i open the html file in my browser that the publish created. t

  • Importing to AddressBook

    hi, Iv'e tried to import from diverse formats to addressbook: VSV: numbers, excel, open Office.. hand coded from 4D... tab-return: numbers, excel open office, hand coded from 4D... I wasn't able too import from many of those files !!

  • FRM-92150 WEB Version too new.

    Hi, I got this error trying to use WebForms. I'm using IE5 with JInitiator 1.1.8.14, on a windows NT4 sp5 machine. Please, someone help me.