Comments (6)
I'll try to repeat. I also have an error when trying to add to a RootPanel
directly.
I have a feeling it is related to the doLayout method (which does the
appointment
layout calculations) being called from the constructor ... perhaps a divide by
zero...
i'll investigate and see what i can find
Original comment by [email protected]
on 20 Jul 2009 at 5:42
- Changed state: Accepted
from gwt-cal.
Did you check the javascript method 'private static native int
getScrollBarWidth()'
from the WindowsUtils.java with these objects to see if they were returning the
right
value?
I forgot to mention I only tested the error in hosted mode. I didn't test it in
a
real browser.
Original comment by [email protected]
on 28 Jul 2009 at 11:25
from gwt-cal.
So I think I found a temporary solution to this problem. If you add another
widget
to a panel you are trying to add the DayView to, the DayView won't get -huge
number
as a size.
I have a hunch that Google sets the initial size of a lot its panels to REALLY
REALLY
huge numbers and it throws off your 'private static native int
getScrollBarWidth()'
method.
Original comment by [email protected]
on 10 Aug 2009 at 8:38
from gwt-cal.
Yes, I can't quite put my finger on what it is, but i put in a temporary
workaround in r72 that I think fixed the problem.
If the getScrollBarWidth returns a negative number (which was causing the
error) then it will use a default value of 17px, which seems to be standard on
all the browsers. If the method returns the default value it does not cache it,
and the next time the method is called it will re-run the native method.
If you look at line 94 of the ical demo, you will see i'm adding the DayView to
a doc panel and it seems to work fine:
http://code.google.com/p/gwt-cal/source/browse/trunk/gwt-cal-demo/src/com/bradry
dzewski/gwt/calendar/demo/client/iCalCalendarPanel.java
I'll keep the bug open until I have a better solution, but hopefully this helps
in the short term
Original comment by [email protected]
on 10 Aug 2009 at 10:04
from gwt-cal.
FYI, I came across this bug even with the fix above. It appears to happen
primarily
on PCs when the scrollbar width is being retrieved when an object (such as
DayView)
is created in a controller's constructor. At that time, the scrollbar widths
aren't
available. Unfortunately, it doesn't always return a negative number, and in my
case, it simply returned zero (0) - this did not occur on Macs, however. The
fix for
us was to modify WindowUtils.java getScrollBarWidth() with the following change:
if(tmpScrollBarWidth<=0)
instead of:
if(tmpScrollBarWidth<0)
After this change, it worked fine. Normally, I'd be concerned with the
comparison
matching zero, but a scrollbar width shouldn't be zero anyway (except possibly
if
there is no scrollbar).
Original comment by [email protected]
on 16 Dec 2009 at 12:52
from gwt-cal.
Thanks for providing the fix. I made the change and committed to the 0.9
branch, r179
Original comment by [email protected]
on 16 Dec 2009 at 6:44
- Changed state: Fixed
- Added labels: Release0.9
from gwt-cal.
Related Issues (20)
- setView remove additional style HOT 4
- Support external drop onto calendar HOT 4
- memory leak on every redraw with appointments in view HOT 1
- Turkish Locale HOT 4
- hour view HOT 3
- Purchase commercial license HOT 2
- Day numbers not correctly showed in month-view HOT 3
- Month view in IE9 displays incorrectly
- Strange behavior with Chrome and DialogBox.center() HOT 1
- allow the adding of a user object to the Appointment HOT 1
- Appointment refreshed on Day view will fire null pointer exception when being dragged again HOT 1
- calendarWeekIso will break in 2016 in locales where firstDayOfWeek==1 HOT 1
- In the week view and with RTL direction, the calendar header is not RTL
- Opera display width problem
- Appointment does not provides any mechanism to set tooltip for a particular appointment in day view
- Same calendar with different view in tabpanel
- tt.css
- Changing first day of week
- Put version 0.9.4 in the maven central
- Would love to see a click/drag create capability in the day views
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-cal.