08-31-2008 10:02 PM
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.
09-02-2008 10:01 AM
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?
09-02-2008 10:14 AM
Which part of:
"I have a HorizontalFieldManager which contains two VerticalFieldManagers."
"Within one of the VerticalFieldManagers I add several Fields"
didn't you understand?
09-03-2008 08:53 AM
09-03-2008 09:09 AM
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?
09-04-2008 08:20 AM
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!
09-04-2008 10:33 AM
09-04-2008 10:44 AM
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.