Bug in dialog box "... the form" adjustment of the mask?

I just posted this in the Adobe bug report, but wanted to make sure it is a bug of software, not a personal fault. Did anyone else encounter this problem and have you found a solution?  Thank you!

Problem: Definition left and right side a rectangular mask to the same number in the mask dialog box "Form."... "causes the mask to be unusable.

Steps to reproduce the Bug:

1. create a new model of px 500 x 500, new comp solid size and double-click Rect. mask tool to create a full size mask.

2 adjust the mask using the "Shape" dialog box to set the left and right to 250. Output dialog.

3.re - enter in the dialog box and try to make any changes to the left and to the right, or try to reset the rectangular box.

Results:

The changes will not be saved out of the dialog box.  This is the case when you work with keyframes or not. It should also be noted that if a mask is done this way, then a new keyframe, the mask is "reset", the shape will not change, but I noticed that points are.

It seems that when the mask sharing the left and right sides identical, it confuses the points and cannot properly open the mask up.

Hi Greg,.

I saw your bug report and was able to reproduce the problem.

The problem occurs only when the left/right or up/down pairs have exactly the same value. Changing the value of the left or top will also change the law or low value, respectively. and change the value to the right or bottom is not saved when you OK from the dialog box.

My hunch is that this bug is related to the logic in the form of mask Panel that corrects the values so that the left value can never be greater than the fair value or the value never greater than the background value. (This logic ensures that left is always left or right and top are always above the background.)

This bug seems to have been in After Effects at least several years (9.0 or a previous version). Anyway, apologies for the disruption.

Tags: After Effects

Similar Questions

  • I have DC Acrobat and run it on Windows 7.  I have a Brother printer.  I downloaded the new drivers last night, but the same problem occurs: when I try to print, I get a message in a dialog box, "the cocument could is allowed.  When I click on

    I have DC Acrobat and run it on Windows 7.  I have a Brother printer.  I downloaded the new drivers last night, but the same problem occurs: when I try to print, I get a message in a dialog box, "the cocument could is allowed.  When I click on out of the box with this message, I get a different dialog box including the message says "it has not chosen to print pages".  Any suggestion would be appreciated.

    The way I got it to print has been:

    Without opening the program, in the list of applications, move on to Adobe Reader and right click, select Properties.

    Go to the compatibility and click 'run as Admin '.  Reopen the application and all prints for me now.

    (This can only work with your personal computer if?)

  • How to get the dialog box print forms 6.0.8.8.0 (6i)

    Hello

    I want to get a print dialog box when the button is pressed. For this I need to use win_api_dialog.select_printer that I found in the library of d2kwutil.pll.

    I created a simple form using Developer 6.0.8.8.0.
    I have attached the d2kwutil.pll lib

    I have the d2kwutil.pll in the directory where forms_path is pointing to in my registry.

    There is only a single block and a button on the form. Here is the code on the when button pulled the trigger

    declare
    vcPrinter varchar2 (200);
    vcPort varchar2 (200);
    Start
    win_api_dialog.select_printer (vcPrinter, vcPort, TRUE);
    : PRI. PRI_PRINTER: = vcPrinter;
    : PRI. PRI_PORT: = vcPort;
    end;

    When I run the form, the form compiles well but I
    FRM-40734 internal error PL/SQL ERROR OCCURRED.

    Can you please tell me what must I watch or even step by step instructions on how to get this working. ?

    Thank you
    Laba

    Hi Laba!

    Your form is not the d2kwut.dll, I think.
    Try to put in the \bin folder in your home of developer.

    Cordially and Pauline halla!

  • caviggia files and dialog boxes (the role of Qt, Flex, etc) post-ADM

    After a few years of having to put my development efforts well enough hold him, I'm now back in the thick of it and work to get my CS3 (and so - CS5) plugins updated to CS6 and beyond. With the disappearance of the ADM, it seems to be quite a wild west as far as UI goes. First (if I remember), we were encouraged to use Flash, Flex, and now HTML5. What most developers using, especially smaller developers?

    Make a palette (now called a sign?) seems simple enough using native Xcode and Visual Studio, although there is a lot of extra coding for each platform. I see that the swirl sample plugin uses a file of .zxp in addition to the file of Betty. A caviggia file does not contain enough information for these controls, although it is apparently enough for the EmptyPanel project? I am not happy to find plenty of platform-specific reminders, etc., but do not want to submit my clients to an awkward two-step setup with the Extensions Manager process, either. Nor do I really had the time to become competent in several new programming languages.

    My plugins often use modal dialog boxes, but I can't find an example of how to apply them without an Interface separate editor. I already has many palettes/panels that you almost an extra monitor just for all, so I'd rather not have to go Park that route - but if I have to. Am I correct in guessing this is better done in Xcode (somehow) with a view with a window in Interface Builder? I'm sure that Visual Studio is not easy or intuitive.

    Golly, developing a plugin would be so MUCH easier if it was somehow possible using XOJO, which is simpler that C++ and completely cross-platform, including a great WYSIWYG editor, or even better if ADM dialog/control have been revised to work with the new user interface.

    I would greatly appreciate comments and recommendations for porting to CS6 and beyond, keeping in mind I'm an illustrator of trade and a self-taught programmer who writes plugins in my "spare" time

    TIA - Rick

    Rick E Johnson wrote:

    After a few years of having to put my development efforts well enough hold him, I'm now back in the thick of it and work to get my CS3 (and so - CS5) plugins updated to CS6 and beyond. With the disappearance of the ADM, it seems to be quite a wild west as far as UI goes. First (if I remember), we were encouraged to use Flash, Flex, and now HTML5. What most developers using, especially smaller developers?

    I think that a lot of small developers simply abandoned, and which perhaps explains why this forum is so quiet now. Personally, I use Flex. When Adobe has HTML5, they said that they would have begun to remove flash products support Creative Cloud in the middle of 2014. There are also rumours that they would stop Extension Manager. I don't think they did either again.

    Introducing HTML5 extensions | Adobe Developer Connection

    Make a palette (now called a sign?) seems simple enough using native Xcode and Visual Studio, although there is a lot of extra coding for each platform. I see that the swirl sample plugin uses a file of .zxp in addition to the file of Betty. A caviggia file does not contain enough information for these controls, although it is apparently enough for the EmptyPanel project?

    The zxp file is an Extension Manager installer for the installation of the part of the user interface of the plugin, which is built from other files. Betty files are only used to set the entry point and name of plugin. All the stuff of the user interface are now in mxml flex for files and html html5 files, or native code, as in EmptyPanel.

    I am not happy to find plenty of platform-specific reminders, etc., but do not want to submit my clients to an awkward two-step setup with the Extensions Manager process, either. Nor do I really had the time to become competent in several new programming languages.

    You can include the zxp UI file in another zxp file that also contains the plugin by creating a hybrid extension, so that it looks like the user that they install only one thing.

    http://www.Adobe.com/devnet/creativesuite/articles/hybrid-extensions.html

    My plugins often use modal dialog boxes, but I can't find an example of how to apply them without an Interface separate editor. I already has many palettes/panels that you almost an extra monitor just for all, so I'd rather not have to go Park that route - but if I have to. Am I correct in guessing this is better done in Xcode (somehow) with a view with a window in Interface Builder? I'm sure that Visual Studio is not easy or intuitive.

    The suite of AIUser has functions for the display of message boxes (* alert functions) and also has functions to display the file picker and color picker dialog boxes. There is also one to get a string of the user (GetInputFromUser), but if you need anything with more controls, you have to build your own dialog boxes. I would recommend this doing flex/HTML5 rather than as a native window to maintain the look and feel of the Illustrator.

    Golly, developing a plugin would be so MUCH easier if it was somehow possible using XOJO, which is simpler that C++ and completely cross-platform, including a great WYSIWYG editor, or even better if ADM dialog/control have been revised to work with the new user interface.

    Yes, Adobe could simply write a conversion layer to convert WMD in which that is the language of the INTERFACE now takes their fancy, but instead, they decided it would be best to plugin developers to rewrite their code whenever they decide to change the user interface.

  • Dialog box retains the entries

    Hello world

    I created a box of script and dialogue for the people in my office to use. I intend for people to take what I've created and save it to their computer this way with the master copy never gets dirty. In this dialog box, the user must enter a number of variables and test settings that I saved as variables such as T1, L1, R1,... etc. Is it possible that when you close diadem and reopen the data of a former test that you can fill out the dialog box with entries that have previously been entered. Now everthing resets to 0 if you completely close Diadem. Because the way in which there are a number of fields, you must enter it would be pretty annoying to have to fill it every time. I am currently using Diadem 2015. Unforunately I don't think that I can provide this code and dialog box to you guys so I hope it's clear enough.

    Thanks for any help

    So I found a solution to my problem. The way I solved the problem and was able to keep the values in the dialog box was using a global dimension and create a channel to store these values.

    If groupindexget ("VariablesV2") = 2 then ' occurs when there is a variable channel

    GlobalDim1 = CHDX (1,2)
    Call SUDDlgShow ("Dlg1", MyFolders (0) & "NoName.SUD", NULL)
    ChD (1, "VariablesV2/TestVarChanName") = GlobalDim1

    else ' happens when there is NO variable channel

    Group = "VariablesV2."
    Call GetCreateGroup (Group)
    TestVar1 = GetChannel ("TestVarChanName", 1, "Digital", group)
    Call SUDDlgShow ("Dlg1", MyFolders (0) & "NoName.SUD", NULL)
    ChD (1, "VariablesV2/TestVarChanName") = GlobalDim1
     
    End if

    Basically, what it does is check if the variable group is present as the second group. If it isn't then it creates the group, then channels, I need. I then called the dialog box where I can enter the values in the text box who assined to the variables 'GlobalDim1' which he. I then store this value in the channel that I just created. When I reload the tiara, the script will see this channel, open the dialog and display this value and I can then choose to change this value or would it be let. I won't say it's the best way to do it, but until now it works. I'll see how it behaves when I have a long list of variables/channels.

  • How to close the PrintDocument printing dialog box after pressing on it's Cancel button

    I develop using Windows 7, VB.net 2010 and dotnet 4.0.  The application is an x 86 application of Windows Forms using the PrintDocument class for printing.  After the call to PrintDocument.Print, the application manages the PrintDocument events and a print dialog box is displayed that indicates the number of pages that have been printed.  The print dialog box also includes a Cancel button.  I noticed that when a print job is canceled by using the Cancel button in the print dialog box, the print dialog box does not close until the underlying application closes.  When the compiled application is running, the application must close before to close the print dialog box.  When the application is running in the Visual Studio debugger, Visual Studio must close before to close the print dialog box.  The print dialog box also throws an error "a StartDocPrinter call was not issued" when you press the Cancel button.  Once you press the Cancel button, printing of dialogue "pages" message changes to "Cancel printing".

    Can someone tell me what I do wrong?

    The 'Microsoft community' focuses on the consumer.  You're more likely to get help in the MSDN forums or TechNet (links are on the forums to know which forum to post in).

    https://social.msdn.Microsoft.com/forums/en-us/home?Forum=whatforum&filter=AllTypes&sort=lastpostdesc

    https://social.technet.Microsoft.com/forums/en-us/home?Forum=whatforum&filter=AllTypes&sort=lastpostdesc

  • BlackBerry Smartphones Feature Request: Dialog boxes to password visible to the Windows API

    One of my frustrations with the help of BlackBerry Desktop Manager is asked for my password again and again many times - first to unlock BlackBerry, then to enter mass storage Mode, then to check the updates of the application, and then to load the software for the device, then to synchronize, etc.

    A partial solution for me was to use a utility script (AutoHotKey) on the desktop to automatically answer BBDM password dialog boxes.  But now BBDM version 5.0, these dialog boxes have become java nested forms that are not visible on the Windows API.

    So, if someone of the RIM is listening, please return the actual password dialog boxes Windows forms.  Ideally, different security BB applications would communicate with them so I have to enter my password once, but until that happens, please don't make it more difficult it must be.

    Thank you for your consideration.

    Hello and welcome to the Forums!

    With regard to your hope that RIM will see your message - these forums are a chain of support to users, not a conduct of user-to-RIM. Therefore, it is unlikely they will see what you wrote. However, if you have specific and constructive ideas for them, I heard they accept this by e-mail to [email protected].

    Good luck!

  • Refresh the page after registration in the pop-up dialog box

    I have a page that displays read values of VO. I have a contextual dialog which allow you to change the values.

    When I click ok in the dialog box, the changes are committed to the database, but the home page is not refreshed with the updated values.

    How to update?

    Hello

    How do view you vo as a table or a form?

    If the id of the button value context partialTrigger property table.

    and for the partialTrigger property for any attribute form.

  • CS6: Accessibility attributes dialog box tags entry for forms

    is the tag input of the accessibility attributes exist in the dialog box for forms? It does not appear when I click on the text field button.

    THX...

    Hi theshortstraw,

    This feature has been deprecated in 12.2. What version do you have?

    Also see this video http://tv.adobe.com/watch/learn-dreamweaver-cc/html5-forms-workflow/

    Thank you

    Preran

  • Forms 6i (select) open Directory dialog box

    Hello
    is it possible to display the windows DIRECTORY selection dialog box in Forms 6i?
    I know d2kwutil WIN_API_DIALOG. OPEN_FILE, SAVE_FILE, but I want open dialog box which allows you to select a directory, no user file.

    Do you know how can I achieve this?

    Thank you

    There is a parameter of the function client_Get_File_Name/Get_File_Name SELECT_FILE. This false value to select directories, only.

  • The cancellation of the 'file' dialog box and handle errors caused by the empty path that makes the DB connection

    Hi guys.

    I developed a VI that connects to the database reads the names of tables, columns of the selected table, etc. It works well as I want to.

    However, I have problem with identifying the UDL file with function of dialog 'file' use in a structure of the event that is triggered when the button 'Open' value is changed. It also works well, when I choose the UDL file, but the problem is when I cancel it and I get the error 43.

    I tried to deal with this problem with a "error handler" function to clear the error 43 but the next errors that are associated with the database conncetion appeared. The reason is, when file dialog is cancelled, an empty path passes by reference of connection and I can't start the while loop where are the key codes. I also used a box Structure connected to "Cancelled" with 'DB connection tool' in case of real and connection the reference connection for the while loop, but I get the same result.

    I want to apply for work as: start to push the button "Open" and select the file UDL, the loop run to establish the connections database, if not with the cancellation of the file dialog box, the application waits by pushing the button open and select the UDL file again.

    Thanks a lot for your help in advance.

    Hi lman,.

    start to push the button "Open" and select the file UDL, the loop run to establish the connections database, if not with the cancellation of the file dialog box, the application waits by pushing the button open and select the UDL file again.

    Some pseudocode, easy to implement:

    WHILE
    
      onevent(OPEN button)
        FileDialog
    
      IF file selected THEN
        open database
        do calculations
      ELSE
        do nothing
      ENDIF
    
    WEND
    

    What is your problem with the help of loops and structures of the case?

  • Display thumbnails in the open dialog box?

    When you refer to a "Open file" dialog box, the window is automatically in the list.  Once it is open, I can manually select the thumbnail view, but next time you mention it it goes back to the list view.  I want this dialog box to open with the selected thumbnail view.  Anyone know of a way to do this?

    Ben wrote:

    Andrey Dmitriev wrote:

    Ben wrote:

    Not me!

    When I saw the work involved, I let my customer choose, photos or substance. They have not chosen the substance if no ready-made solution.

    Ben

    Ah, all LabVIEW programmers are commonly so lazy... (me too)

    Andrey.

    He looks the other way...

    LV developers are smart (they chose LV) so that they use their intelligence to work smarter, not more difficult.

    Ben

    Totally agree! But LabVIEW developers are not only smart, they also able to make a difference...

    Quick and dirty something liike that:

    LabVIEW 8.6 / WindowsXP. Not sure about Vista / 7. Too lazy to check it out.

    Enjoy!

    Andrey.

  • Stop, reboot is not available on the stop dialog box

    I have a XP SP3 box that does not "Shutdown" or "Restart" as options in the shutdown dialog box (the box that you see when you click on stop in the start menu.)  The only option available is to disconnect.  I see no issues update, AV is up to date.  The machine is part of a domain, but I checked the local security and domain strategies to see if 'hide closed' was enabled, but it wasn't.

    Any ideas as to the cause?  Thank you.

    I had a similar problem. I found a solution through SevenForums: the link below has a REG file download that fixed this easily (option 1).

    He added the controls in the registry. After the merger of the file with regedit and reboot, the buttons have been restored in the Start Menu.
  • Features lost in the x 10.5.8 Mac OS print dialog box

    I don't know how it happened, but suddenly I lost the ability to change some settings in the print dialog boxes.

    In any print dialog box, the upper part of the window allows you to select which printer, all presets, the number of copies, whether you want collated and which pages.

    Below that is a combo box that usually displays the name of the application. If you select the triangle in this drop-down menu, other options appear: layout, choice of colors, paper handling, Page coverage and Planner. These options work fine.

    Below, however, here is another set of options that are all, I suppose, provided by the printer driver. On my HP Photosmart C7200, the available options are: double-sided printing, Type/paper quality, printing without margins, HP Real Life Technologies and printer driver information.

    If I choose one of these options that appear in the lower part of this drop-down menu, nothing appears. The name of the application remains in the drop-down list box. In other words, I lost the ability to select two-sided printing, change the paper type and print quality, cor log printing without margins.

    Any suggestions?

    I solved this problem.

    For those who might stumble upon this thread who have the same problem, try resetting the CUPS.  To do this right click on the left side of the preferences window printers (where it lists the printers) and select "Reset Printing System...".

    Thanks to Calderone on the MacRumors Forums - www.forums.macrumors.com to help him.

  • Native of filebrowse using and the cascading Save dialog box

    In my application I need to open file and file save dialog box when a specific button is clicked. I looked at the docs of stunts, but I found that the native options. Tried the native alert dialog, change of filebrowse dialog type. It displays well on Simulator, but could not get any output file that will be used in the Qt code.

    I pass these parameters

    int * num = NULL;

    char * folder [1024];
    dialog_update (alert_dialog);

    to dialog_event_get_filebrowse_filepaths(event,file,num), but it always returns BPS_FAILURE.

    In addition, access_shared is present in the bar-descriptor

    Here is my code:

    //slot function
    void App::fileOpen(){
        //===========================
            dialog_instance_t alert_dialog = 0;
    
            bps_initialize();
    
            dialog_request_events(0);    //0 indicates that all events are requested
    
            if (dialog_create_filebrowse(&alert_dialog) != BPS_SUCCESS) {
                        fprintf(stderr, "Failed to create alert dialog.");
                        return ;
                }
                const char* extensions[] = {"*.*","*.jpg","*.jpeg","*.mp3","*.wav","*.mp4","*.txt","*.doc","*.pdf"};
                int items = 9;
                if(dialog_set_filebrowse_filter(alert_dialog, extensions,items) != BPS_SUCCESS){
                    fprintf(stderr, "Failed to set alert dialog message text.");
                            dialog_destroy(alert_dialog);
                           alert_dialog = 0;
                           return ;
                }
               if( dialog_set_filebrowse_multiselect(alert_dialog,FALSE)!=BPS_SUCCESS){
                   fprintf(stderr, "Failed to set alert dialog message text.");
                                dialog_destroy(alert_dialog);
                               alert_dialog = 0;
                               return ;
               }
    
            if (dialog_show(alert_dialog) != BPS_SUCCESS) {
                fprintf(stderr, "Failed to show alert dialog.");
                dialog_destroy(alert_dialog);
                alert_dialog = 0;
                return ;
            }
    
            int shutdown =0;
            while (!shutdown) {
                bps_event_t *event = NULL;
                bps_get_event(&event, -1);    // -1 means that the function waits
                                              // for an event before returning
    
                if (event) {
                    if (bps_event_get_domain(event) == dialog_get_domain()) {
    
                        int selectedIndex =
                            dialog_event_get_selected_index(event);
                        const char* label =
                            dialog_event_get_selected_label(event);
                        const char* context =
                            dialog_event_get_selected_context(event);
    
                        char **fileArray[]={};
                        int *numFiles = NULL;
                       //
                              if(selectedIndex == 0){
           shutdown = 1;//user press the cancel button on dialog; close the dialog
       }
       else if(selectedIndex == 1){
           if(dialog_event_get_filebrowse_filepaths(event,file,num)!=BPS_SUCCESS){
           fprintf(stderr,"File open fail");
       }
       else{
    
    //debug purposes
           fprintf(stderr,"File array: %d/n",sizeof(file)*1024);
               fprintf(stderr,"Num files: %n",num);
               //fprintf(stderr,"Files int: %d",files);
       }
    
       }
                    }
                }
            }
    
            if (alert_dialog) {
                dialog_destroy(alert_dialog);
            }
            //===========================
    }
    

    Native Subforums have no useful information on this subject. Any help is greatly appreciated

    Hello again, here's the example as promised.

    To use the native filebrowse dialog box, the native code must run in its own thread to prevent the user interface in the Cascades to block. This is achieved by encapsulating all the dialog box code in a class derived from QThread.  The class I wrote is called FileBrowseDialog

    FileBrowseDialog.hpp

    #ifndef FILEBROWSEDIALOG_HPP_
    #define FILEBROWSEDIALOG_HPP_
    
    #include 
    #include 
    #include 
    
    /*
     * The file browse dialog displays a dialog to browse and select
     * files from shared folders on the system.
     */
    class FileBrowseDialog : public QThread
    {
        Q_OBJECT
    
        /*
         * QML property to allow multiple selection
         */
        Q_PROPERTY(bool multiselect READ getMultiSelect WRITE setMultiSelect)
    
        /*
         * QML property to read the selected filenames
         */
        Q_PROPERTY(QVariant filepaths READ getFilePaths)
    
        /*
         * QML property to set or get the file filters. This is an
         * list array variant.
         */
        Q_PROPERTY(QVariant filters READ getFilters WRITE setFilters)
    public:
        /*
         * Ctor and Dtor
         */
        FileBrowseDialog(QObject* parent = 0);
        virtual ~FileBrowseDialog();
    
        /*
         * Exposed to QML to start the run loop which creates and displays the dialog.
         * The dialog is shown until a button is clicked.
         */
        Q_INVOKABLE void show();
    
    public:
        /*
         * Getter for the selected filenames QML property
         */
        QVariant getFilePaths() const;
    
        /*
         * Setter and Getter for the filters QML property
         */
        QVariant getFilters() const;
        void setFilters(QVariant const& value);
    
        /*
         * Getter and Setter for the multiselect QML property
         */
        bool getMultiSelect() const;
        void setMultiSelect(bool value);
    
    signals:
        /*
         * Signal emitted when the OK button has been clicked on the browse dialog
         * The OK button is not enabled unless a file is selected
         */
        void selectionCompleted();
    
        /*
         * Signal emitted when the cancel button has been clicked on the browse dialog
         */
        void selectionCancelled();
    
    protected:
        /*
         * Implements the run loop. Dialog stays open until a button is clicked.
         */
        virtual void run();
    
    protected:
        dialog_instance_t m_dialog;
        bool m_multiSelect;
        QVariantList m_filePaths;
        QVariantList m_filters;
    };
    
    #endif /* FILEBROWSEDIALOG_HPP_ */
    

    FileBrowseDialog.cpp

    #include "FileBrowseDialog.hpp"
    #include 
    #include 
    
    FileBrowseDialog::FileBrowseDialog(QObject* parent)
        : QThread(parent)
        , m_multiSelect(false)
    {
        m_filters.push_back(QString("*.*"));
    }
    
    FileBrowseDialog::~FileBrowseDialog()
    {
    }
    
    void FileBrowseDialog::show()
    {
        if (!isRunning())
        {
            m_filePaths.clear();
            start();
        }
    }
    
    QVariant FileBrowseDialog::getFilePaths() const
    {
        return m_filePaths;
    }
    
    bool FileBrowseDialog::getMultiSelect() const
    {
        return m_multiSelect;
    }
    
    void FileBrowseDialog::setMultiSelect(bool value)
    {
        m_multiSelect = value;
    }
    
    QVariant FileBrowseDialog::getFilters() const
    {
        return m_filters;
    }
    
    void FileBrowseDialog::setFilters(QVariant const& value)
    {
        m_filters = value.toList();
        qDebug() << "filter count: " << m_filters.count();
    }
    
    void FileBrowseDialog::run()
    {
        bps_initialize();
    
        //request all dialog events
        dialog_request_events(0);
        if (dialog_create_filebrowse(&m_dialog) != BPS_SUCCESS)
        {
            qDebug() << "Failed to create file browse dialog.";
            emit selectionCancelled();
            return;
        }
    
        //set the selection filters
        if (m_filters.count() > 0)
        {
            char** ext = (char**)new char[m_filters.count()*sizeof(char*)];
            int i = 0;
            for (QVariantList::iterator it = m_filters.begin(); it != m_filters.end(); ++it, ++i)
            {
                QString filter = it->toString();
                if (!filter.trimmed().isEmpty())
                {
                    int length = (filter.length() + 1) * sizeof(char);
                    ext[i] = new char[length];
                    strncpy(ext[i], filter.toAscii(), length);
                }
            }
            if (dialog_set_filebrowse_filter(m_dialog, (const char**)ext, m_filters.count()) != BPS_SUCCESS)
            {
                qDebug() << "unable to set file browse dialog extensions";
            }
            for (i = 0; i < m_filters.count(); i++)
            {
                delete ext[i];
            }
            delete ext;
        }
    
        if (dialog_show(m_dialog) != BPS_SUCCESS)
        {
            qDebug() << "Failed to show file browse dialog.";
            dialog_destroy(m_dialog);
            m_dialog = 0;
            emit selectionCancelled();
            return;
        }
    
        bool shutdown = false;
        while (!shutdown)
        {
            bps_event_t* event = NULL;
            bps_get_event(&event, -1);    // -1 means that the function waits
            // for an event before returning
    
            if (event)
            {
                if (bps_event_get_domain(event) == dialog_get_domain())
                {
                    //0=ok, 1=cancel
                    int selectedIndex = dialog_event_get_selected_index(event);
    
                    if (selectedIndex == 1)
                    {
                        int count;
                        char** filepaths;
                        if (BPS_SUCCESS == dialog_event_get_filebrowse_filepaths(event, &filepaths, &count))
                        {
                            for (int i = 0; i < count; i++)
                            {
                                qDebug() << "selected file: " << filepaths[i];
                                m_filePaths.push_back(QString(filepaths[i]));
                            }
                            bps_free(filepaths);
                        }
                        emit selectionCompleted();
                    }
                    else
                    {
                        emit selectionCancelled();
                    }
    
                    qDebug() << "Got file browse dialog click";
                    shutdown = true;
                }
            }
        }
    
        if (m_dialog)
        {
            dialog_destroy(m_dialog);
        }
    }
    

    This class derives from QObject (by QThread) which means that it can be used by QML when it exposes properties and signals. The FileBrowseDialog class has 3 properties

    -multiple selection: a Boolean flag indicating if single or multiple selection is allowed

    -filepaths: a read only value that returns the list of files selected

    -Filters: a read/write value is where you can specify one or more filters to file (for example, ".doc", "*.jpg") etc.

    The next part is how you call the FileBrowseDialog through the QML. To do this, we must inform the QML of the FileBrowseDialog page. This is done in the App class via the qmlregistertype code.

    App.cpp

    #include 
    #include 
    #include 
    
    #include "app.hpp"
    #include "FileBrowseDialog.hpp"
    
    using namespace bb::cascades;
    
    App::App()
    {
        qmlRegisterType("Dialog.FileBrowse", 1, 0, "FileBrowseDialog");
        QmlDocument *qml = QmlDocument::create("main.qml");
        qml->setContextProperty("cs", this);
    
        AbstractPane *root = qml->createRootNode();
        Application::setScene(root);
    }
    

    The QML is now ready to be able to use the FileBrowseDialog. The example below is a page complete qml which has a button and a label. When we click on the FileBrowseDialog button is open, and all selected files will appear in the label.

    Main.QML

    import bb.cascades 1.0
    import Dialog.FileBrowse 1.0
    
    Page {
        content: Container {
            Label { id: filebrowseDialogLabel }
            Button {
                text : "File Browse Dialog"
                onClicked: {
                    filebrowseDialog.show();
                }
            }
            attachedObjects: [
                FileBrowseDialog {
                    id: filebrowseDialog
                    multiselect : true
                    filters : ["*.doc","*.jpg","*.txt"]
                    onSelectionCompleted: {
                        if(filebrowseDialog.filepaths.length>0)
                            filebrowseDialogLabel.text = filebrowseDialog.filepaths[0];
                        else
                            filebrowseDialogLabel.text = "no file selected";
                    }
                    onSelectionCancelled: {
                        filebrowseDialogLabel.text = "file browse dialog was cancelled";
                    }
                }
            ]
        }
    }
    

    And it's pretty much just invoke the native dialog file navigation in stunts. Please note save the file would follow a similar model, but I found that this dialog box was not particularly useful because it displays only a simple dialogbox with a text file name entry.

    See you soon

    Swann

Maybe you are looking for

  • E-mail notify@fmf.iclodu. ***

    I got the email from [email protected]. ***. It is really strange that this email reaches to my email account which I don't use currently Apple ID. DATE OF INVOICE13July 2016 SEQUENCE NO.1-63445223 COMMAND IDFAS432425235235 DOCUMENT NO.63462347234154

  • Satellite U300 - blue screen

    My 10 days as old Satellite U300 - 14 d knows the blue screen problem frequently. I noticed that attaching a file from my office to my email exchange server to blue screen triggers. The blue screen gives various complaints: once his RTL86.sys and the

  • my e-mail account has a virus, he keeps shooting e-mails to my contacts, emails are unwanted adds, how it stop?

    I noticed my email * address email is removed from the privacy * it is compromised, he keep shooting e-mails to my contacts with a link to a online *, he started a week ago, or so, what should I do to put an end to this topic?

  • Authorization

    Why do I get the following message appears when I open Microsoft Office Outlook?  It seems quite useless, and even if it's a small thing, I find it very irritating.  What can I do to prevent it? "You want the following program to make changes to this

  • Expansion base xb3000 - compatible with the new portable computers HP?

    Hello all! I am currently using a laptop DV8305 connected to a basic xb3000 expansion.  This is a great set!  I would like to get a new computer laptop (something in the DV7 range) and use it with my old xb3000. The problem is nothing new HP laptop c