Screen size- Running in App versus Basic

BASIC SDK для Xcode
tampadancing
Posts: 8
Joined: Fri Jun 29, 2018 11:34 am
My devices: iPad Pro
iPhone se

Re: Screen size- Running in App versus Basic

Post by tampadancing » Tue Oct 30, 2018 10:17 pm

I think it Is a problem with Xcode, not SB. As Mr. K wrote several times, and is easy to see is true, it is the SB code that runs the .txt file. Since it runs properly in SB on my iPad Pro, SB is working correctly. I really think using SB to develop an app through Xcode is like trying to drive a round peg in a square hole. I wish Mr. K would continue to support SB, because I think it beats the heck out of any other programming option for non-programmers. No matter what anyone says, SB is powerful and much, much easier and faster than learning Swift 4, python, or any comparable language. My grandkids have learned SB and have great fun writing quick simple programs and writing programs to graphically work through their math assignments. I know that would never happen using Swift 4 or python. I love SB.

User avatar
rbytes
Posts: 1795
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Screen size- Running in App versus Basic

Post by rbytes » Tue Oct 30, 2018 10:47 pm

I'm glad you like SB. I am very fond of it myself, as you may note from the number of posts I have made and programs that I have posted.

But I will not excuse its flaws. The screen size reading error was pointed out a long time ago. It is up to the developer to report it to Apple if he believes that a bug exists in xCode that is causing SB's false readings. Oddly, I have never found any other App Store apps that report incorrect screen sizes - or even worse, don't fill the screen on my iPhone X. Most other developers also create their apps with xCode. How do they avoid the bug?

Some Smart Basic commands no longer work. The ones I miss the most are the CAMERA commands. I had an SB camera program I wrote that worked until a few iOS updates ago. My family liked it because it had a timer that spoke the countdown out loud and told them to "smile" just before the shutter fired. Now any attempt to run this program crashes SB to the home screen!

But the developer is in a stalemate with Apple. Not sure if you are aware of this. The App Store review team demands that Mr. Kibernetik remove Dropbox support before they will post any more SB updates, because they "won't allow code to be imported via Dropbox". I say that in quotes, because SB operates in a sandbox that prevents it from affecting any apps or files outside of the box. Its "code " is nothing more or less than text, which can be copied from anywhere else and pasted into SB. Apple has no such restriction on any other programming apps that I know of. Apps like Pythonista can import code directly from GitHub or import it via iTunes. Some of us suspect that the developers' country of origin may have factored into Apple's treatment of him, and that he has been unfairly singled out. But there is apparently no appeal process.

The concern over losing DropBox is the ostensible reason why there has not been an SB update in almost a year. However the developer may have some additional reasons unknown to me. A number of users, including me, have suggested other solutions as a substitute for importing/exporting via DropBox, but to date Mr. K has not been satisfied with any of them.
####### Living the colorful life #######

tampadancing
Posts: 8
Joined: Fri Jun 29, 2018 11:34 am
My devices: iPad Pro
iPhone se

Re: Screen size- Running in App versus Basic

Post by tampadancing » Tue Oct 30, 2018 11:11 pm

Sorry to hear about the camera app issue. I can see how that would be very frustrating. Sounds like a fun and useful app. That said, for me and my grandkids ( and I think school age kids in general), SB remains the simplest, most powerful stand alone app for learning, playing, and experimenting that I can find. It cracked me up when I googled " how to draw a circle in Swift 4". Google it yourself( or see attached). Many responses came up, all of them 6 to 15 lines of cryptic code. While various programmers discussed whose method was best, I was thinking, wow.... if you want to draw a circle, try " draw circle x,y size z." DONE. It's like day and night. This SB product just seems too good to let die. If you find something comparable, let me know!
Attachments
7F7116CB-EA4F-4C36-A163-9856CCA79115.png
7F7116CB-EA4F-4C36-A163-9856CCA79115.png (774.13 KiB) Viewed 1083 times

User avatar
rbytes
Posts: 1795
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Screen size- Running in App versus Basic

Post by rbytes » Wed Oct 31, 2018 1:09 am

I think we both have made important points both pro and con. I have tried quite a few programming apps for iPad and I agree that none of them are as easy to code for or as versatile as SB. Have you tried any of the programs in the Programs section? Your kids might enjoy them and learn from them.
####### Living the colorful life #######

User avatar
GeorgeMcGinn
Posts: 417
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro
IMac
Location: Venice, FL
Flag: United States of America
Contact:

Re: Screen size- Running in App versus Basic

Post by GeorgeMcGinn » Wed Nov 14, 2018 10:37 pm

I'm catching up on this post.

When coding in SWIFT or Objective-C, the code that draws the circle is not SWIFT or C Code. It is a UIKit code! You will find he same code in both languages.

What SmartBASIC probably did was it imported UIKit inside the interpreter and a Statememt created that is converted into the UI code that you see in your Stackflow graphic.

I've coded directly in XCode, where the SB interpreter is missing the code for the IDE that starts on your devices and defines the devices it supports. I have taken our DateCalc App, and running it in XCode simulator, it creates a screen with the proper size for the device you are testing for, and like my iPad Pro 10.5, which came after the last updates of SB, fills the entire screen.

I am making an educated guess that the smartBASIC APP has the sizes all pre-fined, but the Sim.a file, which is the SB interpreter minus the code to start the IDE (the code that runs the program in the IDE is there, but has many components removed - I believe there is a post by Mr. K. out there about this) runs in my obsolete XCode software with the proper screen sizes.

I hope that helps some, but maybe it works for me because I did not upgrade my iOS to 11+ and I am running XCode v8.2. Maybe when I get a new iMac that runs the latest XCode, it may stop working.

Just food for thought, for I could be partially or completely wrong, but all the devices on my XCode works fine.



tampadancing wrote:
Tue Oct 30, 2018 11:11 pm
Sorry to hear about the camera app issue. I can see how that would be very frustrating. Sounds like a fun and useful app. That said, for me and my grandkids ( and I think school age kids in general), SB remains the simplest, most powerful stand alone app for learning, playing, and experimenting that I can find. It cracked me up when I googled " how to draw a circle in Swift 4". Google it yourself( or see attached). Many responses came up, all of them 6 to 15 lines of cryptic code. While various programmers discussed whose method was best, I was thinking, wow.... if you want to draw a circle, try " draw circle x,y size z." DONE. It's like day and night. This SB product just seems too good to let die. If you find something comparable, let me know!
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)
http://georgemcginn.wordpress.com
http://cosmologyandspace.wordpress.com

Post Reply