Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
New Developer
bb9
Posts: 29
Registered: ‎07-28-2008
My Device: Not Specified

VerticalFieldManager halves MAX_EXTENT

When I layout some Fields there seems to be a problem with the way Manager handles sizes.

 

I have a HorizontalFieldManager which contains two VerticalFieldManagers. Within one of the VerticalFieldManagers I add several Fields.  To check what was going wrong I subclassed the GaugeField and found that during the layout() method getManager().getPreferredWidth() it returns 0x1fffffff.  Now we all know that VerticalFieldManager.MAX_EXTENT is 0x3fffffff which presumably should not be treated as a real width value but as a symbolic value representing the maximum extent possible.

 

So why does the VFM arithmetically halve MAX_EXTENT to produce a width of  0x1fffffff?

 

BTW the width value passed to the GaugeField's layout is MAX_EXTENT.

 

BTW the GaugeField ignored Field.FIELD_RIGHT etc but should use that when deciding where to place text on the gauge.

 

BlackBerry Development Advisor
MSohm
Posts: 14,859
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: VerticalFieldManager halves MAX_EXTENT

The HorizontalFieldMananger may be halving the extent for the VerticalFieldManagers within it.

 

Can you provide a screenshot or diagram of how your fields are layed out?  Is the GaugeField in the HorizontalFieldManager or one of the VerticalFieldManagers?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
New Developer
bb9
Posts: 29
Registered: ‎07-28-2008
My Device: Not Specified

Re: VerticalFieldManager halves MAX_EXTENT

Which part of:

      "I have a HorizontalFieldManager which contains two VerticalFieldManagers."

      "Within one of the VerticalFieldManagers I add several Fields"

didn't you understand?

 

BlackBerry Development Advisor
MSohm
Posts: 14,859
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: VerticalFieldManager halves MAX_EXTENT

What fields are you adding?  Is the second VerticalFieldManager empty?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
New Developer
bb9
Posts: 29
Registered: ‎07-28-2008
My Device: Not Specified

Re: VerticalFieldManager halves MAX_EXTENT

A gauge field!! Didn't you read my post?

 

The vfms have equal  number of fields (I put label fields in left vfm and unlabelled fields in right vfm so that they look better than what standard RIM offering can do).

 

The gauge field is totally knackered if used in anything but a full width container.  For some reason the actual width never gets calculated properly.  So I wrote my own gauge field (took about an hour) and sensibly used getManager().getVisibleWidth() instead of getWidth().  Looks fantastic and works brilliantly.

 

I also both vfms have Manager.HORIZONTAL_SCROLL set so as to prevent them spilling over into the next 'row'.

 

Of course, if RIM put their top-level api source in public domain they could get the benefit of my excellent bug-free code.  But what I find interesting is that the RIM api looks suspiciously like the LWUIT api. Field==lwuit.Component, Manager==lwuit.Container, Screen==lwuit.Form, etc.  How did that happen?

 

Developer
peter_strange
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: VerticalFieldManager halves MAX_EXTENT

Since you can produce excellent bug-free code, would you be able to contribute a little of your time and answer some of the queries on this forum?

New Developer
New Developer
bb9
Posts: 29
Registered: ‎07-28-2008
My Device: Not Specified

Re: VerticalFieldManager halves MAX_EXTENT

I would have thought that a question like that would be better addressed to me personally via a private message rather than going off-topic.  BTW I don't work for RIM, and I don't have access to RIM's source code, so how could I possibly provide definitive answers to questions that concern bugs and other problems with RIM software.

 


Having said that, I believe I have clearly identified a bug.  And I also observe that the Gauge writes its percentage text over top of the gauge label when the gauge occupies the right half of the screen!

  

Developer
simon_hain
Posts: 16,360
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: VerticalFieldManager halves MAX_EXTENT

devsupport@rim.com is the mail-address. i bet they have a higher arrogance resistance, at least they get paid for it :smileyhappy:

maybe there is something like jobs@rim.com, i am pretty sure they will hire somebody who can produce bug-free code instantly. you save a lot of time for testing and debugging, i have to admit that i am a bit envious.

and i would really look forward to a new jde release that is guaranteed bug-free!
best of all would be if you would write the eclipse-plugin, i would offer at least a few kudos.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
New Developer
bb9
Posts: 29
Registered: ‎07-28-2008
My Device: Not Specified

Re: VerticalFieldManager halves MAX_EXTENT

The difference between you and me is that I do produce bug free software. That is why I earn 10 or more times what you are probably paid (if anything).  Yes, it is a rare quality, and that is why bug-ridden code irks me so much.

 

And the last place I would work work for would be RIM.  I don't live in Canada, and I don't want to.  I run my own very profitable company, and I don't really know why I bother discussing such things with poeople like yourself.

 

Have a nice day.

 

 

BlackBerry Development Advisor
MSohm
Posts: 14,859
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: VerticalFieldManager halves MAX_EXTENT