Share My Creation iMachinist CNC (b4x)

ilan

Expert
Licensed User
hi

i made some apps lately but did not post any of them here. this one i post here because i wanted to show something. and what i wanted to show is how much effort it will take to convert an average app from b4a to b4i WITHOUT using xui or other shortcuts. don't understand me wrong i recommend to use xui views and libs but still, sometimes you don't plan to create an app for both platforms and u use libs and views that u r familiar with and then after you finished your app you decide to port it to b4i (that what happened to me)

so have a look at the video and of course, you are welcome to download the app and rate it if you like.
i made it for personal use but anyone that is in the CNC branch will find it useful. this is also why i did not add ads to it! so it is completely free!!

Android link: https://play.google.com/store/apps/details?id=www.sagital.cnc

iOS link: https://www.b4x.com/android/forum/threads/imachinist-cnc-b4x.103972/

before you watch the video i want to say that it took me about 30 mins to do the conversion from b4a to b4i. the other 30 minutes was only polishing!

it is also a good example to see where i had difficulties and how b4x can be improved to avoid those difficulties.

thanx, ilan :)



BTW: the stopwatch was made via B4J. if you want the source let me know ;)
 

Attachments

Last edited:

JohnC

Well-Known Member
Licensed User
Even when slowing youtube playback speed to 0.25 (1/4 normal), the video is too fast to really see what you are doing.

Any chance of reposting it at close to normal speed, then other can speed it up if needed.
 

Scotter

Active Member
Licensed User
hi

i made some apps lately but did not post any of them here. this one i post here because i wanted to show something. and what i wanted to show is how much effort it will take to convert an average app from b4a to b4i WITHOUT using xui or other shortcuts. don't understand me wrong i recommend to use xui views and libs but still, sometimes you don't plan to create an app for both platforms and u use libs and views that u r familiar with and then after you finished your app you decide to port it to b4i (that what happened to me)

so have a look at the video and of course, you are welcome to download the app and rate it if you like.
i made it for personal use but anyone that is in the CNC branch will find it useful. this is also why i did not add ads to it! so it is completely free!!

Android link: https://play.google.com/store/apps/details?id=www.sagital.cnc

iOS link: (waiting for review)

before you watch the video i want to say that it took me about 30 mins to do the conversion from b4a to b4i. the other 30 minutes was only polishing!

it is also a good example to see where i had difficulties and how b4x can be improved to avoid those difficulties.

thanx, ilan :)



BTW: the stopwatch was made via B4J. if you want the source let me know ;)
Wow thanks for caring enough to share this process! It gives me more confidence to port my game over to iOS!
Downloaded your app and 5-starred it.
Thanks, again!
 

ilan

Expert
Licensed User
Any chance of reposting it at close to normal speed, then other can speed it up if needed.
the file would be to big (now its about 350mb for only 6 minutes). do you have maybe a mac? i edited the video via iMovie and you could download the video from youtube and put it in imovieand change the speed to about 20% then it should be good enough.

anyway i can list some b4a/b4i change i had to do.

1. in b4a then SetLayoutAnimated does not have a Dumping Ratio so i had to add it in b4i
2. b4a you can set animation to views with SetVisibleAnimated that will expect a boolean but in b4i you can only use SetAlphaAnimated wich expect an integer. (i really dont know why erel did it. i would preffer to have for both platforms the same animation to fade in and out)
3. when using bal2bil (a tool to convert b4a layout files to b4i layout files) the buttons settings are not converted so i had to maually all colors and settings to the buttons and also it seems like when using Fontawesome on views it wont be converted to. so i had to choose again the fonttypefor all views that use fontawesome font.
4. in b4a you have ColorDrawable in b4i not so you will need to set the background color manually in b4i (dont know how to set corners)
5. in b4a i am using listviews but b4i doesnot have listviews so i used clv. you will need to do small changes for it like you can see in the video. it would make more sense to use xCustomlistview for both platforms and like this you will save a lot of time
6. b4a has textfield and b4i edittext. (view)
7. some changes in Application_Start (b4i) but not to much and setting the #CertificateFile and #ProvisionFile and some Project Attributes for ios.

so those are basicly the points i had to fix when converting my app from b4a to b4i. everything else is just some polishing.
so you can see that you can use about 90% - 95% of the code from your b4a app to your b4i app and if you do it smart even more!

Wow thanks for caring enough to share this process! It gives me more confidence to port my game over to iOS!
Downloaded your app and 5-starred it.
Thanks, again!
thank you very much for your ratting and i really can recommend anyone to buy b4i. it is really awesome like his big brother b4a and sister b4j :p
 
Last edited:

skrjabin

Active Member
Licensed User
I have only some month experience with b4i and still many projects to port from b4a. So it is very useful to me, to see in the video, how you do this. Many steps looks already familiar. Thanks!
 

Erel

Administrator
Staff member
Licensed User
1. in b4a then SetLayoutAnimated does not have a Dumping Ratio so i had to add it in b4i
2. b4a you can set animation to views with SetVisibleAnimated that will expect a boolean but in b4i you can only use SetAlphaAnimated wich expect an integer. (i really dont know why erel did it. i would preffer to have for both platforms the same animation to fade in and out)
3. when using bal2bil (a tool to convert b4a layout files to b4i layout files) the buttons settings are not converted so i had to maually all colors and settings to the buttons and also it seems like when using Fontawesome on views it wont be converted to. so i had to choose again the fonttypefor all views that use fontawesome font.
4. in b4a you have ColorDrawable in b4i not so you will need to set the background color manually in b4i (dont know how to set corners)
5. in b4a i am using listviews but b4i doesnot have listviews so i used clv. you will need to do small changes for it like you can see in the video. it would make more sense to use xCustomlistview for both platforms and like this you will save a lot of time
6. b4a has textfield and b4i edittext. (view)
7. some chnageson Application_Start in b4i but not to much and setting the #CertificateFile and #ProvisionFile and some Project Attributes for ios.
Most or all of these points are easily solved with XUI and B4XView.
 
Top