Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Text not appearing

edited August 2012 in Questions Posts: 3

I don't know what I did, but the text() function doesn't work at all, even in the provided examples...?

iPad3

-scottyd

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,438

    Thank you for reporting this. Did it stop working at some point?

    Can you try restarting Codea? Quit by closing the app, then double tapping the home button, then touch-and-hold the Codea icon in the multitasking tray. A minus sign will appear to close the app.

  • Posts: 791

    I had the same issue with text along with some meshes not being displayed. Restarting codea resolved the problem

  • Posts: 41

    I just had this too, and it affected text and drawing. I was trying Reefwing's "Simple Button Class" tutorial, and the resulting button (a) had no text label, and (b) was shaped like a rectangle (not a round rect) with a horizontal line through the middle.

    Then I tried the slide rule app, and I briefly saw the numbers and markings of the slide rule flash and then disappear, leaving it a big white rectangle.

    Restarting the app seems to have fixed it. (iPad 3)

  • Posts: 3

    Yes, close/restart did the trick. Thanks.

    -scottyd

  • SimeonSimeon Admin Mod
    Posts: 5,438

    Sorry about the bug again. I hope to have a release ready soon that addresses this issue.

  • dave1707dave1707 Mod
    Posts: 8,781

    @krdavis You’re in a discussion from 2012, you could have started a new discussion for your question. Anyways, those two lines display for me. I’m on an iPad Air, what device are you using. If text is too long compared to the width size, for some reason it won’t show. If I comment out the textWrapWidth line, the text doesn’t show for me either. You can try changing the - 64 to another value to see if that helps otherwise cut the text into smaller lengths.

  • dave1707dave1707 Mod
    Posts: 8,781

    @krdavis It has something to do with the amount of text on one line and the width of the screen. As far as I know, the only way around it is to limit the amount of text on one line.

  • dave1707dave1707 Mod
    Posts: 8,781

    @krdavis Heres something to try. Slide the size parameter to increase or decrease the text string size. See what size the text disappears.

    viewer.mode=STANDARD
    
    function setup() 
        fill(255)
        parameter.integer("size",20,300,xx)      
    end
    
    function draw()
        background(0)
        text("str size "..size,WIDTH/2,HEIGHT/2+50)
        text(str,WIDTH/2,HEIGHT/2)
    end
    
    function xx()
        str=""
        for z=1,size do
            str=str.."a"
        end
    end
    
  • dave1707dave1707 Mod
    Posts: 8,781

    @krdavis Heres an example using you text messages. I combined them into one text command just to show the difference easier. Use the slider to change the width that the text stays in. The top text starts at position 0 and the bottom text starts ar 32, which is your original start value. You’ll notice as you change the width size, the text that starts at 0 stays within the width area, whereas your text starting at 32 extends beyond the width area. I don’t know if that’s a bug or just the way it is.

    @Simeon Is this a bug in textWrapWidth that it doesn’t account for the starting text position or is this just the way it is.

    viewer.mode=STANDARD
    
    function setup() 
        parameter.integer("size",0,800)
        fill(255)
        textMode(CORNER) 
        stroke(255)
        strokeWidth(2)
    end
    
    function draw()
        background(0)
        line(WIDTH-size,HEIGHT,WIDTH-size,0)
        textWrapWidth(WIDTH-size)
        text("Written using Codea by TwoLivesLeft.com. Codea allows you to write applications directly on the iPad or iPhone. Check it out.\n\nShadows uses graphics created by Kenney.nl, Lostgarden.com, and TwoLivesLeft.com. Sound effects and music are from Mark Braga. Thanks to all of them for providing terrific materials.",32,100)
    
        text("Written using Codea by TwoLivesLeft.com. Codea allows you to write applications directly on the iPad or iPhone. Check it out.\n\nShadows uses graphics created by Kenney.nl, Lostgarden.com, and TwoLivesLeft.com. Sound effects and music are from Mark Braga. Thanks to all of them for providing terrific materials.",0,400)
    end
    
Sign In or Register to comment.