Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » New nested layout failure at 3.1RC1
New nested layout failure at 3.1RC1 [message #458275] Tue, 12 July 2005 14:14 Go to next message
Eclipse UserFriend
Hi,

I put together a wizard page using nested layouts. The page is a Composite
using RowLayout. The page contains three Group composites. The first Group
uses RowLayout, the second and third Group use GridLayout.

The page worked as expected at 3.1M6, but when I installed 3.1RC1 and ran
the wizard, I started seeing a ClassCastException on line 338 of
org.eclipse.swt.layout.RowLayout::layoutVertical().

When computing the size of the page, the method above loops through all the
Composite's children, calls getLayoutData() on the child, and tries to cast
the result to RowData. The cast fails when getLayoutData() is called on the
second Group and a GridData object is returned.

The cast was added as part of a fix for bug 49426. Is the problem I'm
seeing a regression, or is my wizard page nesting layouts in a way that has
always been unsupported, but is now being checked and enforced at RC1?

As this is my first SWT project, any and all help and or suggested
workarounds are appreciated.


Thank you.

Jerry Cox
Re: New nested layout failure at 3.1RC1 [message #458524 is a reply to message #458275] Thu, 14 July 2005 10:23 Go to previous messageGo to next message
Eclipse UserFriend
The layout data in the child needs to match the layout in the parent. If
the parent is using a GridLayout, then the children must use GridData, not
RowData.

"Jerry Cox" <Jerry.Cox@sas.com> wrote in message
news:Xns969190E1072F0JerryCoxsascom@206.191.52.34...
> Hi,
>
> I put together a wizard page using nested layouts. The page is a Composite
> using RowLayout. The page contains three Group composites. The first Group
> uses RowLayout, the second and third Group use GridLayout.
>
> The page worked as expected at 3.1M6, but when I installed 3.1RC1 and ran
> the wizard, I started seeing a ClassCastException on line 338 of
> org.eclipse.swt.layout.RowLayout::layoutVertical().
>
> When computing the size of the page, the method above loops through all
the
> Composite's children, calls getLayoutData() on the child, and tries to
cast
> the result to RowData. The cast fails when getLayoutData() is called on
the
> second Group and a GridData object is returned.
>
> The cast was added as part of a fix for bug 49426. Is the problem I'm
> seeing a regression, or is my wizard page nesting layouts in a way that
has
> always been unsupported, but is now being checked and enforced at RC1?
>
> As this is my first SWT project, any and all help and or suggested
> workarounds are appreciated.
>
>
> Thank you.
>
> Jerry Cox
Re: New nested layout failure at 3.1RC1 [message #458530 is a reply to message #458524] Thu, 14 July 2005 10:37 Go to previous message
Eclipse UserFriend
Steve,

That is what I needed to know. I changed my wizard page Composite and all
nested Group objects to use GridLayouts and now it works.

Thanks for the information.

Jerry Cox


"Steve Northover" <steve_northover@ca.ibm.com> wrote in
news:db5sg5$e6s$1@news.eclipse.org:

> The layout data in the child needs to match the layout in the parent.
> If the parent is using a GridLayout, then the children must use
> GridData, not RowData.
>
> "Jerry Cox" <Jerry.Cox@sas.com> wrote in message
> news:Xns969190E1072F0JerryCoxsascom@206.191.52.34...
>> Hi,
>>
>> I put together a wizard page using nested layouts. The page is a
>> Composite using RowLayout. The page contains three Group composites.
>> The first Group uses RowLayout, the second and third Group use
>> GridLayout.
>>
>> The page worked as expected at 3.1M6, but when I installed 3.1RC1 and
>> ran the wizard, I started seeing a ClassCastException on line 338 of
>> org.eclipse.swt.layout.RowLayout::layoutVertical().
>>
>> When computing the size of the page, the method above loops through
>> all
> the
>> Composite's children, calls getLayoutData() on the child, and tries
>> to
> cast
>> the result to RowData. The cast fails when getLayoutData() is called
>> on
> the
>> second Group and a GridData object is returned.
>>
>> The cast was added as part of a fix for bug 49426. Is the problem I'm
>> seeing a regression, or is my wizard page nesting layouts in a way
>> that
> has
>> always been unsupported, but is now being checked and enforced at
>> RC1?
>>
>> As this is my first SWT project, any and all help and or suggested
>> workarounds are appreciated.
>>
>>
>> Thank you.
>>
>> Jerry Cox
>
>
>
Previous Topic:EditMask available?
Next Topic:TreeColumns not shorting long text
Goto Forum:
  


Current Time: Sun Jul 06 12:18:43 EDT 2025

Powered by FUDForum. Page generated in 0.04727 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top