Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Problems trying to create resource manager using XML framework

On May 5, 2011, at 2:45 PM, Albert L. Rossi wrote:

> As per our discussion this morning, I have gone forward and modified slightly the browse-button.
> 
> The browse widget now uniformly uses the uiFileManager instead of FileDialog; I did this because the latter does not seem to enforce directory-only lists, though you can return the filter (the dir) instead of the file.  
> 
> new attribute options on Widget:
> 
> localOnly: force the connection to local (default is false)
> directory: browse only directories (default is false)
> uri: return a full uri instead of path (default is false)
> 
> There is also a second layout data element on widget,
> 
> <sub-layout-data>
> 
> in the case of composite (2-widget) widgets like the browse text+button; the sub-layout will be applied to the second element (in this case, the button), giving greater control over size and position.
> 
> My one question about the uiFileManager browse.  On local and remote connections, browseDirectory gives you only directories; on local connections, browseFile allows you to choose only files.  But on remote connections, browseFile allows you to choose both file and directory.  Should I add a bit of automatic validation to make sure the directories are excluded here or not? or is it that directories are considered files, but not vice versa (but then the local behaves differently by enforcing an X-OR) ...?

That sounds like a bug. What does the JFace FileDialog do?

Greg



Back to the top