Results 1 to 7 of 7

Thread: Small proposition

    You found a bug! We've classified it as TOUCH-3887 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    44

    Default Small proposition

    Now Ext.device.camera.Simulator always return url to image, but why not to fix it

    Code:
    config: {        samples: [
                {
                    success: 'http://www.sencha.com/img/sencha-large.png',
                    successData: '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB\nAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB\nAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAB4AKADASIA\nAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA\nAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3\nODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm\np6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA\nAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx\nBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK\nU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3\nuLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD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FAH71f8MC/sef8AREdE/wDB740/+aWj/hgX9jz/AKIjon/g98af/NLRRQB+Cv8Aw3z+\n2H/0W7W//BF4L/8Amao/4b5/bD/6Ldrf/gi8F/8AzNUUUAfvV/wwL+x5/wBER0T/AMHvjT/5paP+\nGBf2PP8AoiOif+D3xp/80tFFAH4K/wDDfP7Yf/Rbtb/8EXgv/wCZqj/hvn9sP/ot2t/+CLwX/wDM\n1RRQB+9X/DAv7Hn/AERHRP8Awe+NP/mlo/4YF/Y8/wCiI6J/4PfGn/zS0UUAfgr/AMN8/th/9Fu1\nv/wReC//AJmqP+G+f2w/+i3a3/4IvBf/AMzVFFAH71f8MC/sef8AREdE/wDB740/+aWj/hgX9jz/\nAKIjon/g98af/NLRRQB+Cv8Aw3z+2H/0W7W//BF4L/8Amao/4b5/bD/6Ldrf/gi8F/8AzNUUUAf/\n2Q==\n'
                }
            ]
        }

    +
    Code:
    capture: function(options) {        var index = this.sampleIndex,
                samples = this.getSamples(),
                samplesCount = samples.length,
                sample = samples[index],
                scope = options.scope,
                success = options.success,
                failure = options.failure;
            if ('success' in sample) {
                if (success) {
                    success.call(scope, options.destination == 'file' ? sample.success : sample.successData);
                }
            }
            else {
                if (failure) {
                    failure.call(scope, sample.failure);
                }
            }
    
    
            if (++index > samplesCount - 1) {
                index = 0;
            }
    
    
            this.sampleIndex = index;
        }
    So now in emulator mode it always work correctly

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448

    Default

    Thanks for the report! I have opened a request in our bug tracker.

  3. #3
    Sencha User voloshyn's Avatar
    Join Date
    Jan 2012
    Posts
    118

    Default

    what exactly does not work correctly at the moment?

  4. #4
    Sencha User
    Join Date
    Dec 2012
    Posts
    44

    Default

    Everything works just it doesnot matter which destination is used file, or data it always return url to link,
    my proposition is to return string base64 or url.
    You can just change properties which i added in Ext.device.camera.Simulator class.

  5. #5
    Sencha User voloshyn's Avatar
    Join Date
    Jan 2012
    Posts
    118

    Default

    OK, I see that is for not packaged application, as even on iOS Simulator if application is packaged it will useExt.device.camera.Sencha and not Ext.device.camera.Simulator. We will fix.

  6. #6
    Sencha User
    Join Date
    Dec 2012
    Posts
    44

    Default

    Yes you are right it is for not packaged, so its just for test purpose

  7. #7
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159

    Default

    While it would be nice to have this, I think adding a few extra KB of random code/lines to the file just to have this work is a little extreme. Thanks for the suggestion though.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •