TileGrid drawing on Safari

I’m using a TileGrid in 7.0RC and, while it seems to work fine on Firefox, it does not draw the tiles on Safari. Oddly enough, I can still mouse over and get the highlight, and I can still select.

Any ideas?

Thanks,

Kirk Austin

Does it happen in samples?

Safari version?

Works in samples

No, the samples look ok. And I think my code is just lifted from the sample JS but in a different larger layout, so I’ll have to start from a simple sample and work my way up to where I am now, paying attention to where it fails.

I usually use Firefox because of the debugging support, and just happened to notice this yesterday when I hit it from Safari.

No Luck

Well, it gets stranger by the minute. I copied the example JS and pasted it into a pretty simple page. It works in Firefox, but not Safari. I just changed where the picture is pointed to, otherwise it’s the stock sample code.

Here it is:

animalData = [
{
picture:“Dolphin.jpg”,
commonName:“Elephant (African)”,
information:“The African Elephant is the largest of all land animals and also has the biggest brain of any land animal. Both males and females have ivory tusks. Elephants are also wonderful swimmers. Man is the only real enemy of the elephant. Man threatens the elephant by killing it for its tusks and by destroying its habitat.”,
lifeSpan:60,
scientificName:“Loxodonta africana”,
diet:“Herbivore”,
status:“Threatened”
},
{
picture:“Dolphin.jpg”,
commonName:“Alligator (American)”,
information:“In the 16th century, Spanish explorers in what is now Florida encountered a large formidable animal which they called "el largo" meaning "the lizard". The name "el largo" gradually became pronounced "alligator".”,
lifeSpan:50,
scientificName:“Allligator mississippiensis”,
diet:“Carnivore”,
status:“Not Endangered”
}]

…

    this.addTab(    {
        title: "Welcome",
        pane:isc.TileGrid.create({
            tileWidth:150,
            tileHeight:190,
            height:400,
            width:"100%",
            showAllRecords:true,
            data:animalData,
            fields: [
            {
                name:"picture",
                type:"image",
                imageURLPrefix:"animals/"
            },

            {
                name:"commonName"
            },

            {
                name:"status"
            }

            ]
        })

    }
    );

…

Any Thoughts on This?

So, this appears to be a bug. Is there anything further I can do to help demonstrate this?

Thanks,

Kirk Austin

No one has reported this bug, and if it’s a real bug there should be hundreds of reports since it’s so obvious. Can you take another look and if you really really think you have a bug, show a complete (from the <html> tag onward) test case that runs in a completely unmodified SmartClient SDK and demonstrates the problem?

Here you go

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Test</title>
        <!-- enforce namespace constraint for isomorphic -->
        <script type="text/javascript">window.isc_useSimpleNames = false;</script>
        <!-- isomorphic preload -->
        <script type="text/javascript">var isomorphicDir="isomorphic/";</script>
        <script type="text/javascript" src="isomorphic/system/modules/ISC_Core.js"></script>
        <script type="text/javascript" src="isomorphic/system/modules/ISC_Foundation.js"></script>
        <script type="text/javascript" src="isomorphic/system/modules/ISC_Containers.js"></script>
        <script type="text/javascript" src="isomorphic/system/modules/ISC_Grids.js"></script>
        <script type="text/javascript" src="isomorphic/system/modules/ISC_Forms.js"></script>
        <script type="text/javascript" src="isomorphic/system/modules/ISC_DataBinding.js"></script>
        <script type="text/javascript" src="isomorphic/system/skins/Enterprise/load_skin.js"></script>
    </head>
    <body>
        <script type="text/javascript">
            animalData = [
                {
                    picture:"Elephant.png",
                    commonName:"Elephant (African)",
                    information:"The African Elephant is the largest of all land animals and also has the biggest brain of any land animal. Both males and females have ivory tusks. Elephants are also wonderful swimmers. Man is the only real enemy of the elephant. Man threatens the elephant by killing it for its tusks and by destroying its habitat.",
                    lifeSpan:60,
                    scientificName:"Loxodonta africana",
                    diet:"Herbivore",
                    status:"Threatened"
                },
                {
                    picture:"Alligator.png",
                    commonName:"Alligator (American)",
                    information:"In the 16th century, Spanish explorers in what is now Florida encountered a large formidable animal which they called \"el largo\" meaning \"the lizard\". The name \"el largo\" gradually became pronounced \"alligator\".",
                    lifeSpan:50,
                    scientificName:"Allligator mississippiensis",
                    diet:"Carnivore",
                    status:"Not Endangered"
                }]

            // point to our images directory for relative url's
            isc.Page.setAppImgDir("animals/");

            isc.VLayout.create({
                width:"100%",
                height: "100%",
                autoDraw: true,
                members: [
                    isc.TileGrid.create({
                        tileWidth:150,
                        tileHeight:190,
                        height:400,
                        width:"100%",
                        autoDraw: false,
                        showAllRecords:true,
                        data:animalData,
                        fields: [
                            {
                                name:"picture",
                                type:"image"
                            },

                            {
                                name:"commonName"
                            },

                            {
                                name:"status"
                            }

                        ]
                    })
                ]
            });

        </script>
    </body>
</html>

Get rid of your XHTML strict doctype.

Thanks

Just curious, could you explain why that made the difference?

SmartClient supports HTML4/5, not XHTML. That’s one of about a billion things that may go wrong with the browser in the wrong mode.

Just in time this post. I was having today the same problem in Chrome & Safari. My page doctype:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

After removing the doctype it seems ok. Is there a recommended value for doctype we should use in order to achieve max. compatibility? Thx

Hi Felixx,

We do our best to render consistently cross browser regardless of doctype.

Having said that, if you have the option to change the doctype, your best bet is always “Quirks” / “Transitional Mode” (the default setting if you don’t specify a doctype).

We do support Standards mode and Almost Standards mode but ironically these doctype settings tend to introduce greater deltas between the native rendering behaviors of the various browsers, which increases the likelihood of us encountering rendering issues.
We’ll certainly look into this issue with TileGrids using the doctype you specified - and for now we’d recommend you go with Quirks mode

Thanks
Isomorphic Software

Thanks for the quick answer. I’ll switch to ‘quirks’ for now and see how it goes.