Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:14 Go to next message
Jerry Cox is currently offline Jerry CoxFriend
Messages: 8
Registered: July 2009
Junior Member
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 14:23 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
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 14:37 Go to previous message
Jerry Cox is currently offline Jerry CoxFriend
Messages: 8
Registered: July 2009
Junior Member
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: Sat Nov 28 06:06:16 GMT 2020

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

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

Back to the top