Giter VIP home page Giter VIP logo

Comments (11)

dezinezync avatar dezinezync commented on August 17, 2024

You could please paste an example Label object which I can test? Also, to what type of view did you add it to(Window, View, etc)?

Cheers,
Nikh.

On Tue, Oct 8, 2013 at 8:33 PM, Michele Antonaci [email protected]
wrote:

If you set text align (in my case Ti.UI.TEXT_ALIGNMENT_CENTER) and more links app crash on iOS 7.

The application has crashed with an uncaught exception 'NSRangeException'. Reason: NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds

Reply to this email directly or view it on GitHub:
#22

from nappui.

mantonaci avatar mantonaci commented on August 17, 2024

Below there is a snippet of code, in this example, the underline is not displayed.

I add it on a ScrollableView.

var string = "Cliccando su Salva, indichi di aver letto e accettato la Normative sulla privacy e le Condizioni d'uso.";
var privacyLabel = Ti.UI.createLabel({
    top : 10,
    width : 300,
    textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER,
    font : {
        fontSize : 14
    },
    color : "#3C3C3C",
    text : string,
    attributedText : {
        text : string,

        attributes : [{
            text : "Condizioni d'uso.",
            color : "#fff",
            link : "http://demo.paybay.it/web/termini",
            underline : 1
        }],

        attributes : [{
            text : "Normative sulla privacy",
            color : "#fff",
            link : "http://demo.paybay.it/web/termini",
            underline : 1
        }]
    }
});

Regards,
M

from nappui.

dezinezync avatar dezinezync commented on August 17, 2024

Can you please try the following, by replacing your attributedText prop with this one?

attributedText : {
        text : string,

        attributes : [{
                text : "Condizioni d'uso.",
                color : "#fff",
                link : "http://demo.paybay.it/web/termini",
                underline : 1
            },{
                text : "Normative sulla privacy",
                color : "#fff",
                link : "http://demo.paybay.it/web/termini",
                underline : 1
            }
        ]
    }

Also, if possible, I'd recommend using the range property instead of the text property. You can use it like so:

            {
                range : [57,23],
                color : "#fff",
                link : "http://demo.paybay.it/web/termini",
                underline : 1
            }

from nappui.

mantonaci avatar mantonaci commented on August 17, 2024

It's work, but for some reason sometimes crash. Below, the full stack trace:

The application has crashed with an uncaught exception 'NSRangeException'.
Reason:
NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds
Stack trace:

0   CoreFoundation                      0x2e84ef53 <redacted> + 130
1   libobjc.A.dylib                     0x38b766af objc_exception_throw + 38
2   CoreFoundation                      0x2e84ee95 <redacted> + 0
3   Foundation                          0x2f17111d <redacted> + 120
4   Foundation                          0x2f17108f <redacted> + 46
5   Passpartu                           0x0040e259 -[TiUILabel(Extend) touchesEnded:withEvent:] + 724
6   UIKit                               0x31147101 <redacted> + 232
7   UIKit                               0x30fb7e4b <redacted> + 5522
8   UIKit                               0x30fefc41 <redacted> + 772
9   UIKit                               0x30fef5e7 <redacted> + 666
10  UIKit                               0x30fc4a25 <redacted> + 196
11  UIKit                               0x30fc3221 <redacted> + 7096
12  CoreFoundation                      0x2e81a18b <redacted> + 14
13  CoreFoundation                      0x2e81965b <redacted> + 206
14  CoreFoundation                      0x2e817e4f <redacted> + 622
15  CoreFoundation                      0x2e782ce7 CFRunLoopRunSpecific + 522
16  CoreFoundation                      0x2e782acb CFRunLoopRunInMode + 106
17  GraphicsServices                    0x3345b283 GSEventRunModal + 138
18  UIKit                               0x31024a41 UIApplicationMain + 1136
19  Passpartu                           0x0003a19b main + 114
20  Passpartu                           0x000396f0 start + 40

2013-10-25 10:32:54.295 Passpartu[1968:60b] *** Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds'

from nappui.

dezinezync avatar dezinezync commented on August 17, 2024

Ah! Happens when you tap a link? This is a known bug and I'm trying to find a fix for this. 

Cheers,
Nikh.

On Fri, Oct 25, 2013 at 2:09 PM, Michele Antonaci
[email protected] wrote:

It's work, but for some reason sometimes crash. Below, the full stack trace:

The application has crashed with an uncaught exception 'NSRangeException'.
Reason:
NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds
Stack trace:
0   CoreFoundation                      0x2e84ef53 <redacted> + 130
1   libobjc.A.dylib                     0x38b766af objc_exception_throw + 38
2   CoreFoundation                      0x2e84ee95 <redacted> + 0
3   Foundation                          0x2f17111d <redacted> + 120
4   Foundation                          0x2f17108f <redacted> + 46
5   Passpartu                           0x0040e259 -[TiUILabel(Extend) touchesEnded:withEvent:] + 724
6   UIKit                               0x31147101 <redacted> + 232
7   UIKit                               0x30fb7e4b <redacted> + 5522
8   UIKit                               0x30fefc41 <redacted> + 772
9   UIKit                               0x30fef5e7 <redacted> + 666
10  UIKit                               0x30fc4a25 <redacted> + 196
11  UIKit                               0x30fc3221 <redacted> + 7096
12  CoreFoundation                      0x2e81a18b <redacted> + 14
13  CoreFoundation                      0x2e81965b <redacted> + 206
14  CoreFoundation                      0x2e817e4f <redacted> + 622
15  CoreFoundation                      0x2e782ce7 CFRunLoopRunSpecific + 522
16  CoreFoundation                      0x2e782acb CFRunLoopRunInMode + 106
17  GraphicsServices                    0x3345b283 GSEventRunModal + 138
18  UIKit                               0x31024a41 UIApplicationMain + 1136
19  Passpartu                           0x0003a19b main + 114
20  Passpartu                           0x000396f0 start + 40
2013-10-25 10:32:54.295 Passpartu[1968:60b] *** Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds'

Reply to this email directly or view it on GitHub:
#22 (comment)

from nappui.

mantonaci avatar mantonaci commented on August 17, 2024

Even when i tap a label that haven't a link. Maybe, i found a work around by setting tocuhEnabled false on Label (if isn't a link).

Regards,
Michele

from nappui.

harrythree avatar harrythree commented on August 17, 2024

Having the same crashes when click events are on a label. Getting the same error as above.

'Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds'

I'm using NappUI module to add drop shadow to a view in another window but still crashes on the label with the click event. But I guess NappUI takes over default titanium UI.

Anyway, hope this helps with figuring out a fix for this bug.

Thanks for an awesome module!

from nappui.

viezel avatar viezel commented on August 17, 2024

@dezinezync should we remove this feature, since its supported by appcelerator now ?

from nappui.

dezinezync avatar dezinezync commented on August 17, 2024

Yes please. I have another implementation in place which I shall release once stable in it's own repo. Thanks.

from nappui.

viezel avatar viezel commented on August 17, 2024

try 1.2.3
52f46d0

from nappui.

harrythree avatar harrythree commented on August 17, 2024

Thanks for the update guys!

from nappui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.