[ 
https://issues.apache.org/jira/browse/PIVOT-865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13423907#comment-13423907
 ] 

Roger Whitcomb commented on PIVOT-865:
--------------------------------------

Hi Sandro, that would be great if you could commit for me (? and do the merge 
to 2.0.x as well?).  Thank you!  Should be simple -- just two files in the 
patch.
Here's the text I wanted to use for the commit message:

PIVOT-865: Crash in TerraFileBrowserSheetSkin when specifying a relative path
and file name in the SAVE_AS mode text input field.
This is also a follow-on to PIVOT-825 which was an earlier case of a crash here.

Made several fixes:
1) Put the text input inside a form so we can put an error flag on the field.
2) Much more understanding when the user types something in the field to try to
   interpret what is meant, whether a file name only, a relative path, an
   absolute path, or path + file name.
3) Using Canonical file name always to set the root directory so it will make
   sense if the root directory is used to set the current directory for the next
   time around.
4) Clear the form flag whenever the text changes.

                
> Crash in Save, As dialog when path + filename entered in text field
> -------------------------------------------------------------------
>
>                 Key: PIVOT-865
>                 URL: https://issues.apache.org/jira/browse/PIVOT-865
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk, wtk-terra
>    Affects Versions: 2.0.2
>         Environment: Windows XP, Windows 7, JRE 1.6 or 1.7
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>              Labels: filebrowser
>             Fix For: 2.0.3
>
>         Attachments: pivot865.patch
>
>   Original Estimate: 48h
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> In a File Browser sheet in SAVE_AS mode, enter a path and file name 
> (something like [in Windows] "test\script\test.txt") in the text field and it 
> will throw this exception:
> java.lang.IllegalArgumentException
>         at 
> org.apache.pivot.wtk.FileBrowserSheet.setRootDirectory(FileBrowserSheet.java:139)
>         at 
> org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.previewSheetClose(TerraFileBrowserSheetSkin.java:296)
>         at 
> org.apache.pivot.wtk.Sheet$SheetStateListenerList.previewSheetClose(Sheet.java:34)
>         at org.apache.pivot.wtk.Sheet.close(Sheet.java:118)
>         at 
> org.apache.pivot.wtk.skin.terra.TerraSheetSkin.keyPressed(TerraSheetSkin.java:502)
>         at 
> org.apache.pivot.wtk.Component$ComponentKeyListenerList.keyPressed(Component.java:544)
>         at org.apache.pivot.wtk.Component.keyPressed(Component.java:2853)
>         at org.apache.pivot.wtk.Window.keyPressed(Window.java:1179)
>         at org.apache.pivot.wtk.Component.keyPressed(Component.java:2856)
>         at org.apache.pivot.wtk.Component.keyPressed(Component.java:2856)
>         at org.apache.pivot.wtk.Component.keyPressed(Component.java:2856)
>         at org.apache.pivot.wtk.Component.keyPressed(Component.java:2856)
>         at org.apache.pivot.wtk.Component.keyPressed(Component.java:2856)
>         at 
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.processKeyEvent(ApplicationContext.java:1339)
>         at java.awt.Component.processEvent(Unknown Source)
>         at 
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:792)
>         at java.awt.Component.dispatchEventImpl(Unknown Source)
>         at java.awt.Component.dispatchEvent(Unknown Source)
>         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
>         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown 
> Source)
>         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown 
> Source)
>         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown 
> Source)
>         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
>         at java.awt.Component.dispatchEventImpl(Unknown Source)
>         at java.awt.Container.dispatchEventImpl(Unknown Source)
>         at java.awt.Window.dispatchEventImpl(Unknown Source)
>         at java.awt.Component.dispatchEvent(Unknown Source)
>         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
>         at java.awt.EventQueue.access$000(Unknown Source)
>         at java.awt.EventQueue$3.run(Unknown Source)
>         at java.awt.EventQueue$3.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
> Source)
>         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
> Source)
>         at java.awt.EventQueue$4.run(Unknown Source)
>         at java.awt.EventQueue$4.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown 
> Source)
>         at java.awt.EventQueue.dispatchEvent(Unknown Source)
>         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>         at java.awt.EventDispatchThread.run(Unknown Source)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to