Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: XE8: Landscape orientation error on iOS


This question is answered.


Permlink Replies: 10 - Last Post: Jul 24, 2015 1:21 PM Last Post By: Tom Suhler
Hans Jakobsen

Posts: 103
Registered: 9/10/01
XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 27, 2015 3:48 AM
I have a landscape-only app, which shows strange behavior in XE8.
The splash/load screen is correct, but when the main form is shown it is rotated 90 degrees, cutting off the sides of the form.
There has already been a bug reported about this, but no solution yet, and very few have voted for it, so maybe it is not a very common problem?
[https://quality.embarcadero.com/browse/RSP-10313]

Some have commented that Tfgprogressdialog caused the problem, but I am not using this component at all. However, I do use mainly native components (TMS iCL), so I might have something in common with Tfgprogressdialog. I just don't know what it is...

Any ideas for a solution or a workaround?

Edited by: Hans Jakobsen on May 27, 2015 12:49 PM
Bryan Ray

Posts: 31
Registered: 3/2/07
Re: XE8: Landscape orientation error on iOS
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 27, 2015 10:17 AM   in response to: Hans Jakobsen in response to: Hans Jakobsen
Hello,
I had the same / or similar problem with my app in XE8 and using TMS iCL (I don't think it was necessarily a TMS / iCL problem though).
Short story, there was a form that became corrupt in my project. I had to remove one unit at a time from my project until it worked correctly, then rebuilt that offending form and components.
I posted my problem in the TMS / iCL forum if you need more details.

One odd thing I noticed was when I opened the corrupt form in the IDE, a duplicate form appeared on my desktop (not in the IDE). No other form showed this behavior.

Not sure this is exactly the same problem you had, but the appears was the same.

Good luck,
Bryan

Hans Jakobsen wrote:
I have a landscape-only app, which shows strange behavior in XE8.
The splash/load screen is correct, but when the main form is shown it is rotated 90 degrees, cutting off the sides of the form.
There has already been a bug reported about this, but no solution yet, and very few have voted for it, so maybe it is not a very common problem?
[https://quality.embarcadero.com/browse/RSP-10313]

Some have commented that Tfgprogressdialog caused the problem, but I am not using this component at all. However, I do use mainly native components (TMS iCL), so I might have something in common with Tfgprogressdialog. I just don't know what it is...

Any ideas for a solution or a workaround?

Edited by: Hans Jakobsen on May 27, 2015 12:49 PM
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 30, 2015 2:41 AM   in response to: Bryan Ray in response to: Bryan Ray
Bryan Ray wrote:
I had the same / or similar problem with my app in XE8 and using TMS iCL (I don't think it was necessarily a TMS / iCL problem though).
Short story, there was a form that became corrupt in my project. I had to remove one unit at a time from my project until it worked correctly, then rebuilt that offending form and components.

Thank you very much. This helped me to identify the problem. When I removed one of the autocreated forms, the orientation error no longer appeared. Instead of recreating the form, I just moved the creation of the form to a different place (away from auto create in the .dpr file and instead called by the TApplicationEvent.BecameActive event).

The form does not seem to be corrupt however, as it loads fine in the IDE and also work in the program. The form has a huge .fmx file though, as it contains all our custom controls with a lot of bitmap properties storing hi-res .png files.

PS: this confirms how iOS development with Delphi is currently a long chain of weak links. So many different things fail all the time so I use only 20% of my time on being productive and spend 80% of my time on tweaking, IDE crashes, "Internal errors", compiling for device*, and so on.

*my app takes about 8 minutes to build and run on a device, and as I cannot currently make the simulator work, there is no way around it. Therefore the trial and error tweaking part is an extremely time consuming exercise.
Eli M

Posts: 1,346
Registered: 11/9/13
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2015 6:42 AM   in response to: Hans Jakobsen in response to: Hans Jakobsen
8 minutes is pretty gnarly.

If you moved your large images to just load at runtime from the file system or from a SQLite database does the app deploy faster?

Is the 8 minutes because of Debug mode? In Debug mode it has to copy a ~130MB file over the network to the Mac. In Release mode it doesn't do that. Also the faster your network the faster it is going to deploy (I recommend gigabit if possible between the PC and the Mac). Some Wifi is not very fast.

I usually debug mainly in Win32 and then once everything looks good then I deploy to IOS and make sure it also works over there. For this issue obviously that isn't possible though.

PS: this confirms how iOS development with Delphi is currently a long chain of weak links. So many different things fail all the time so I use only 20% of my time on being productive and spend 80% of my time on tweaking, IDE crashes, "Internal errors", compiling for device*, and so on.

*my app takes about 8 minutes to build and run on a device, and as I cannot currently make the simulator work, there is no way around it. Therefore the trial and error tweaking part is an extremely time consuming exercise.
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2015 6:01 AM   in response to: Eli M in response to: Eli M
Eli M wrote:
8 minutes is pretty gnarly.

Thank you Eli for your suggestions.
The 8 minutes are only the Build+Link part. The Deploy and Run part does not take too long, maybe because I have Gigabit LAN and a Mac with SSD drive.
If I just choose run, so it only compiles changed files, it takes 'only' 2-3 minutes. However, this often fails, which require an IDE restart and complete build afterwards.

Testing on Windows is indeed the fastest solution, but as I am only using native iOS components, that is not an option.
I did however make a quick Windows mockup that allows me to test parts of the non-GUI code.

I love Delphi for being able to make a native iOS app and still keep our codebase, and I really, really hope that EMB has the funding to finish what they started, so it becomes .
But my frustration has been building over many months. At the current stage of Delphi+iOS+native there is simply an incredible number of different ways things goes wrong all the time.
Borja Serrano

Posts: 172
Registered: 1/10/13
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2015 11:43 AM   in response to: Hans Jakobsen in response to: Hans Jakobsen
Simulator should work fine after applying the hotfix. It works correctly on my side:

ID: 30221, iOS 8 Simulator Hotfix (Beta) for XE8
http://cc.embarcadero.com/Item/30221
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2015 12:10 PM   in response to: Borja Serrano in response to: Borja Serrano
Borja Serrano wrote:
Simulator should work fine after applying the hotfix. It works correctly on my side:

The simulator itself works with the hotfix, but I still have this issue that prevents me from running my main app in the simulator:
https://forums.embarcadero.com/thread.jspa?threadID=115571
Tom Suhler

Posts: 23
Registered: 9/9/01
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2015 9:33 AM   in response to: Hans Jakobsen in response to: Hans Jakobsen
Thank you very much. This helped me to identify the problem. When I removed one of the autocreated forms, the orientation error no longer appeared. Instead of recreating the form, I just moved the creation of the form to a different place (away from auto create in the .dpr file and instead called by the TApplicationEvent.BecameActive event).

The form does not seem to be corrupt however, as it loads fine in the IDE and also work in the program. The form has a huge .fmx file though, as it contains all our custom controls with a lot of bitmap properties storing hi-res .png files.

Hans,
I'm having a similar problem. I only have one form so changing so it is not autocreated is not an option. I know there is a problem with the form file because when trying to use "Complete at Cursor" for new methods I receive this error: "cannot complete a class with incomplete method implementations".

I cannot find any information about how to fix the file. It has over 300 components. Any suggestions?

PS. Reading your post I see we share the same global problems and frustrations. I have been using Delphi since version 1. I was one of the XE8 beta testers. 80% of my time is spent chasing down Delphi bugs and finding work arounds. I have filled bug reports and answered surveys yet EMB still seems to pay no regard to fixing issues some of which date back to XE2. Knowing what I know now I would have looked elsewhere for a programming platform. But I have so much time and money invested it is a difficult decision to change platforms. Then there is always the unknown issues of the new programming environment.

Edited by: Tom Suhler on Jun 17, 2015 1:31 PM

EDIT: I have resolved the Code Completion error. This had no effect on the orientation problem.
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 18, 2015 2:12 AM   in response to: Tom Suhler in response to: Tom Suhler
Tom Suhler wrote:
I'm having a similar problem. I only have one form so changing so it is not autocreated is not an option.

Have a look at this forum thread
https://forums.embarcadero.com/thread.jspa?threadID=115696

Also if you use the FMXwrapper from TMS, they have confirmed that it can cause this orientation error. In that case it helps to create the wrapper component first time it should be shown, and not during program load.

PS. Reading your post I see we share the same global problems and frustrations. ... Knowing what I know now I would have looked elsewhere for a programming platform.

I think the road they are on is great, though I would prefer more focus on native components rather than trying to emulate it with styles.
Delphi would be the perfect solution if it just worked as it was intended to do :-)
Tom Suhler

Posts: 23
Registered: 9/9/01
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 18, 2015 8:09 AM   in response to: Hans Jakobsen in response to: Hans Jakobsen

Yes and this one too:
https://forums.embarcadero.com/thread.jspa?messageID=673390&#673390

Also if you use the FMXwrapper from TMS, they have confirmed that it can cause this orientation error. In that case it helps to create the wrapper component first time it should be shown, and not during program load.

Not using any component that did not ship with Delphi.
Tom Suhler

Posts: 23
Registered: 9/9/01
Re: XE8: Landscape orientation error on iOS  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 24, 2015 1:21 PM   in response to: Tom Suhler in response to: Tom Suhler
There is now a bug report associate with this issue:

"6/29/2015 4:55 AM | Carlos Fernandez
Tom,
My apologize if I didn´t explain myself correctly. The bug is already reported with reference: RS-64543. In this report I have attached your project so R&D can figure out what is wrong. "
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02