tsteward Well-Known Member Licensed User Longtime User Apr 24, 2021 #1 Anyone following anything I have posted will know i'm not a programmer but I get there somehow by hacking and reusing code from the brilliant people here and making up some of my own. Anyway I think I need to create a Class but may be wrong. In my app on an activity I have created some panels and buttons to interact with SMMRitcheitor lib here and it works great my users are able to leave feedback some of the buttons I created allows them to add data from my database it works well Now I have need to use this on serveral other activities and re-writting that code while possible seems silly. I require the ability to call an activity to diplay my smmricheditor and other thing, allow the users to edit it and when finished return the result. Something like my string = openFeedbackEditor(contents as string) so I can send data to be displayed and get contents back when finished I don't want someone to do it all for me but guide me please hope that makes sense
Anyone following anything I have posted will know i'm not a programmer but I get there somehow by hacking and reusing code from the brilliant people here and making up some of my own. Anyway I think I need to create a Class but may be wrong. In my app on an activity I have created some panels and buttons to interact with SMMRitcheitor lib here and it works great my users are able to leave feedback some of the buttons I created allows them to add data from my database it works well Now I have need to use this on serveral other activities and re-writting that code while possible seems silly. I require the ability to call an activity to diplay my smmricheditor and other thing, allow the users to edit it and when finished return the result. Something like my string = openFeedbackEditor(contents as string) so I can send data to be displayed and get contents back when finished I don't want someone to do it all for me but guide me please hope that makes sense
D Daica Active Member Licensed User Longtime User Apr 24, 2021 #2 If your app isn't so huge already, I would suggest switching over to B4XPages. here's some more info on interacting between 2 activities though, using CallSubDelay: Using CallSubDelayed to interact between activities and services | B4X Programming Forum Upvote 0
If your app isn't so huge already, I would suggest switching over to B4XPages. here's some more info on interacting between 2 activities though, using CallSubDelay: Using CallSubDelayed to interact between activities and services | B4X Programming Forum
tsteward Well-Known Member Licensed User Longtime User Apr 24, 2021 #3 Daica said: If your app isn't so huge already, I would suggest switching over to B4XPages. here's some more info on interacting between 2 activities though, using CallSubDelay: Using CallSubDelayed to interact between activities and services | B4X Programming Forum Click to expand... Yes unfortunately its too big for that. I wish it was around when I started LoL Changing over now I fear would be a big task Upvote 0
Daica said: If your app isn't so huge already, I would suggest switching over to B4XPages. here's some more info on interacting between 2 activities though, using CallSubDelay: Using CallSubDelayed to interact between activities and services | B4X Programming Forum Click to expand... Yes unfortunately its too big for that. I wish it was around when I started LoL Changing over now I fear would be a big task
tsteward Well-Known Member Licensed User Longtime User Apr 24, 2021 #4 Daica said: here's some more info on interacting between 2 activities though, using CallSubDelay: Using CallSubDelayed to interact between activities and services | B4X Programming Forum Click to expand... that could work - thank you Upvote 0
Daica said: here's some more info on interacting between 2 activities though, using CallSubDelay: Using CallSubDelayed to interact between activities and services | B4X Programming Forum Click to expand... that could work - thank you
josejad Expert Licensed User Longtime User Apr 24, 2021 #5 Just try and you will see is not complicated. I was afraid to do it, but when you start, you will see is not so hard. Just create a class, and start moving the subs and declarations of your smmricheditor to that class. Then all you have to do is declarate an object in your activity of that class, and call the methods. You will find a couple of problems in the process, but you will be able of solving them with searching in the forum about classes. Really, try it and you will find is easier than you think. Take a look to this lesson: https://www.b4x.com/guides/B4XBasicLanguage/?page=126 Upvote 0
Just try and you will see is not complicated. I was afraid to do it, but when you start, you will see is not so hard. Just create a class, and start moving the subs and declarations of your smmricheditor to that class. Then all you have to do is declarate an object in your activity of that class, and call the methods. You will find a couple of problems in the process, but you will be able of solving them with searching in the forum about classes. Really, try it and you will find is easier than you think. Take a look to this lesson: https://www.b4x.com/guides/B4XBasicLanguage/?page=126