Tilegrid error in Phonegap - jquery-mobile

I'm constantly having this error:
06-27 10:19:40.503: E/TileGrid(24474): Unexpected portion:left, top, right, bottom 0.000000 0.000000 -0.002500 0.018672<br>
06-27 10:19:40.503: E/TileGrid(24474): Unexpected portion:left, top, right, bottom 0.000000 0.000000 -0.002500 1.000000<br>
06-27 10:19:40.503: E/TileGrid(24474): Unexpected portion:left, top, right, bottom 0.000000 0.000000 -0.002500 1.000000<br>
06-27 10:19:40.503: E/TileGrid(24474): Unexpected portion:left, top, right, bottom 0.000000 0.000000 -0.002500 1.000000<br>
06-27 10:19:40.503: E/TileGrid(24474): Unexpected portion:left, top, right, bottom 0.000000 0.000000 -0.002500 1.000000<br>
06-27 10:19:40.503: E/TileGrid(24474): Unexpected portion:left, top, right, bottom 0.000000 0.010391 -0.002500 1.000000<br>
I'm using Phonegap 3.5.0, JQuery 2.1.1 and JQuery Mobile 1.4.2 (targeting Android), and had this error before (in another apps), but it didn't affect the functionalities. This time, however, in my multipage app, it seems to be affecting the pagecontainer('change', 'mypage') method... the page transition works before the error, but after that, it only changes pages by 5 (I'm using swipe events, so it needs 5 swipes to change page, and jumps from 1 to 5, e.g.). The error occurs sometimes after 2 or 3 page changes, other times after 50, so I can't figure it out...
I found this error message in TileGrid.cpp, on android (line 357):
http://osxr.org/android/source/external/webkit/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
...but couldn't find a solution.
Any help would be very appreciated!

Ok, I found the problem and will answer in case someone have the same issue: the problem was I was using JQuery 2.1.1, and JQMobile was expected to work correctly only with 1.9+ versions (it was explained on the documentation).
Changing to JQuery 1.11.1 made page transitions work correctly.

Related

how to give different constraint in same size class (xcode 8 AutoLayout)

Size class is same and constraint is also same, but getting different height green box.
Does constant should work same for same size classes ?
If not then how i will get same height green box using auto layout? I want green box height = 25% of total height of device
Thanks in advance..
Since you have given the constant distance of green box from bottom so it will maintain that constant distance for all the device.
Secondly you have aligned the top of green box with topLayoutGuide so it will maintain the same for all devices.
So basically top is fixed with topLayout and bottom distance is fixed as 502. And if you run the same on different device having different screen height it will auto-resize your green box height only since other two parameters (top, bottom) are fixed.
Please add the height constraint for your green view as shown in image. It will give you greenViewHeight = 25% of superViewHeight
This is the demo created for your question

Corona SDK - rectangle not appearing in expected place (coordinate system)

I'm brand new to corona SDK and following tutorials. I notice that when I'm positioning elements theyre not appearing as they do in the tutorials. For example:
local testRect = display.newRect( 0, 0, 50, 50 )
testRect:setFillColor( 0.5,0,0 )
In the tutorial it looks like this:
I would guess the anchor point on the rectangle would be 0.5, 0.5 and I'd have to position it 50% to the right, and 50% from the top of the upper left corner. It looks like in their example the rectangle has an anchor point of 0, 0 and is stuck to the edge of the screen by default.
Why is there a difference? i notice this tutorial is using an iphone 4.. but should that matter?
A couple of years ago, Corona SDK went to their Graphics 2.0 standard. Part of this move was to get all display.* objects to behave the same when creating them. Before Graphics 2.0, some objects the X and Y values meant top left, for others it meant center. With Graphics 2.0, all X and Y values when creating an object are the center of the object now.
If you have an older tutorial, it may be assuming that the x, y is top left. In your example you are creating the object at 0, 0 which is the top left corner of the content area. Since you're on a screen that's wider than it's defined content area, 0, 0 isn't always the top left corner of the screen.
I'm guessing your config.lua is setting the width to 320 and the height to 480 (always listed as if the device was in portrait mode). But you're using an iPhone 5 screen, which means the top left corner is -44, 0. This explains why the image isn't all the way to the left edge.
I am sure the anchor points they using are 0.5,0.5.
I suggest you check your build.settings file .. I tried the code and got the same result they had ..
Again CHECK your build.settings file

Why is this combination of constraints ambiguous?

XCode 7
Do you know why this is being considered ambiguous?
I defined that I wanted it centered horizontally and vertically... nothing should be questionable there... then I defined that I wanted it 650 points or larger in horizontal and vertical... so why the ambiguity?
** EDIT **
I'm following up with some more images based on a comment below.
Notice that ambiguity appears to be resolved, yet I get no output on the screen which should be filled edge to edge with a map view.
You chose an inequality constraint of greater than or equal to. Since the size could change, (be greater than 650 height or width) it is considered ambiguous. If you set it equal to 650, it should no longer be considered ambiguous.

Reduce dot size or padding to fit all page indicators on screen with UIPageControl

I have a UIPageControl that has 22 pages, therefore 22 page indicator dots. In landscape on iPhone they're all visible with plenty of space on the left and right, but in portrait there's not enough horizontal space to display all of the dots (at least on iPhone 4 and 5), so two aren't visible and the outer two are cut in half.
I am looking for a way to reduce the size of the dots or reduce the amount of padding between the dots to ensure all dots fit on screen in portrait. How can that be accomplished?
If you have that many dots, I would seriously consider a different control. But if you want to stick to UIPageControl, I would just scale it down to fit on screen, with something like:
pageControl.transform = CGAffineTransformMakeScale(0.7, 0.7);
This scales it down to 70% of its initial size - I leave it to you to determine the best scale for your screen size/number of pages.
Swift 3 version code: based on pbasdf answer.
pageControl.transform = CGAffineTransform(scaleX: 0.7, y: 0.7)
You should really not use a UIPageControl for something that has 22 pages.
How about trying something like a label that returns a number instead. Will make you app look a lot cleaner.
Although if you REALLY want to use the pageControl, pbasdf's answer is spot on.
pageControl.transform = CGAffineTransformMakeScale(0.8, 0.8)
should do the trick.

Jasper report margins larger than what is set

I have a jasper report set to portrait letter, which, in pixel terms, translates to 612 x 792 in iReport. I have the left margin set to 17 pixels and the right set to 10. That leaves the single column width at 585 with no spacing.
Now, I have two vertical lines that are used to form the report's border, and they're positioned at x-coordinates 0 (for the left bar) and 585 (for the right). When this reported is executed, the resultant PDF looks perfectly fine. However, when I go to print, the two vertical lines are missing, and I have to select shrink to fit (which sets the zoom to 94% and displays everything).
I've done some experimenting, and, without shrinking the report at print time, the vertical lines need to be positioned at x-coordinates 2 (for the left) and 575 (for the right) in order to display, which translates into essentially an x-margin of 19 pixels. Playing around some more, if I set the left margin to 19, the left vertical bar displays at print time when positioned at x-coordinate 0.
Is something else setting the margins at 19 pixels aside from the jasper report itself? I can't find any culprits in the report itself that seem to be responsible for the discrepancy. Any help is greatly appreciated.
Most printers can't print up to the edge of a page. It sounds like you are hitting this limit. The print driver is detecting that the PDF doesn't fit inside the printer's printable area and allows you to shrink the content to fit what the printer supports.
This is just a guess. In my reports I use the Background-Band in iReport and draw a rectangle for the background of my reports.

Resources