Hmmm, nvm, I sent the wrong code below...that piece of code doesn't work :)

should have been  height = height > max ? max : height;

On Fri, May 11, 2012 at 7:56 AM, Chris Geer <[email protected]> wrote:

> It happens to me all the time with the gadgets I'm currently working on
> but those would be hard to share due to all their dependencies. Let me see
> if I can recreate a sample where it happens.
>
> For the time being I've changed it to this in my version.
>
> function resizeIframe(args) {
>         var max = 0x7FFFFFFF;
>
>         var height = typeof(args.a) == 'number' ? args.a : args.a[0];
>         height = args.a > max ? max : args.a;
>         args.gs.setHeight(height);
>     }
>
> Chris
>
>
> On Fri, May 11, 2012 at 5:44 AM, Franklin, Matthew B. <[email protected]
> > wrote:
>
>> >-----Original Message-----
>> >From: Chris Geer [mailto:[email protected]]
>> >Sent: Thursday, May 10, 2012 7:16 PM
>> >To: users
>> >Subject: Error with gadgets.window.adjustHeight()
>> >
>> >I'm trying to call gadgets.window.adjustHeight(); from within my gadget
>> and
>> >sometime it works and others it doesn't. When it has problems it's
>> because
>> >of an error in this method:
>> >
>> >/*
>> > RPC Callback handlers
>> > */
>> >/**
>> > * Resizes the iFrame when gadgets.window.adjustHeight is called
>> > *
>> > * @param args the RPC event args
>> > */
>> >function resizeIframe(args) {
>> >var max = 0x7FFFFFFF;
>> >var height = args.a > max ? max : args.a;
>> >args.gs.setHeight(height);
>> > }
>> >
>> >When I debug the method what I see is that args.a is an Array with a
>> single
>> >value so that causes height to be null. I'm not sure what would cause
>> that
>> >though.
>>
>> Interesting.  Sounds like something is going on in the Shindig common
>> container.
>>
>> Are there any cases that you can reliably reproduce the error under?
>>
>> >
>> >Any thoughts?
>>
>
>

Reply via email to