Hi, i have a question: in the xml.lua is possible to get a specific tag attribute value??Thanks
I didn’t write the XML code and it’s been a long time since I looked at it, but if it gets attributes, they would be in the table that it returns. I’m likely ignoring anything I didn’t need for the RSS side. Looking at the RSS code and how it uses the table returned by XML, it looks to me like that each entry in the table is another table in this format:
xmldata[1].name – the tag name
xmldata[1].value – the data between the <name> and </name> tags
xmldata[1].properties – I think this is another table of key-value pairs that would have each attribute key and value
so it appears that xml.lua is getting those attributes for you.
Rob
I have been trying to implement a map market event listener. I have managed to make it work on iOS. But, on Android, the listener did not appear to ever be called on pin tap.
So, wanting to make sure I was not doing something wrong, I downloaded this sample business app, built it, put it on my phone. I then went to the map tab and tapped a pin, then looked at the logcat of the phone. It would display some print statements that I had put in, such as upon entering the scene so I knew it was logging correctly. But, no print statement from the event listener function (there are already 4 pre-built with this sample app) was ever displayed. Additionally, the pin icons were not changed as they should be, they were plain old pin icons. Thus, I think something might be wrong with my building of the app. Does anyone have any thoughts?
Thank you so much for your time.
I’m following this with interest. My needs are generic:
-
Data entry into screen form, save to database.
-
Retrieve record for edit/delete/computation/etc
-
Listbox of all records
So there above you have a todo list, address book, golf score keeper,etc,etc.
Jocala4,
You should be able to do this now. Use the SQLite for your database and the rest you can code in to do.
Warren
Hi Warren,
I was talking about adding features to the sample business app. I think for the sample business app to be useful it needs to be able to:
-
Data entry into screen form, save to database.
-
Retrieve record for edit/delete/computation/etc
-
Listbox of all records
Its been called CRUD (create,Retrieve,Update,Delete).
Mmmm there is one thing that i don’t understand: the initial effect of the screen splash that zomming until to the full screen size… how can i change it ??
We appreciate these suggestions and at some point, we may add these features. The idea behind the business sample app was to not show everything that is possible nor really even provide a complete template for this. It’s more of a demo than anything. Maybe we should consider a second CRUD example, with a more practical SQL database engine.
Many people perceive Corona SDK as a game engine and not practical for other types of apps and while we will be the first to admit, we don’t have every desired feature at every desired level (have you seen the complexity of the iOS SDK?), there is still a lot that can be done.
Let me talk it over with the folks in the office. Once we get under this crush of projects we have now, I really like the idea about revisiting this with a different set of features. One thing I would love to be able to do is to include some sample for fetching REST data, but one of the things I ran into was what data do I use. Any suggestions in that area might be helpful too. Perhaps a screen with a tableView populated from a local SQLlite database and another tableView populated from a RESTful web source.
Please keep these suggestions coming.
Thanks for taking this into consideration.
@gmarshall, I’m working on making it G2.0 compatible and I’ll test the map markers on my Google Nexus 7 later on and see if I can reproduce what you’re seeing.
@mandre86, this is an illusion created by the simulator. The simulator tries to simulate the iOS device feature of showing the Default.png file before the app loads. It however does not take into consideration iOS tall devices. Then on the Android side, Android doesn’t support Default.png loading images at all. This is a feature we added because people wanted it. So we have two scenerios:
1. You’re on the simulator with a non 2:3 ratio screen (iPad, iPhone 5, Android device) in which case it loads Default.png which is a 2:3 ratio image (as Apple expects it to be) and show’s it stretched to fit, then the app comes up and draws it’s real splash screen (with the words “Business Sample App” on it) which is in the right aspect ratio for the skin.
- You’re running it on an Android device and it’s picking up the 2:3 ratio Default.png.
I guess I should just get rid of the Default.png and leave a blank black Default-568h@2x.png image for iOS use.
Rob
I just tested it on my Nexus 7 and the pin points touch just fine. I get a call out with the information. It worked as I expect it to.
Rob
Hmm, alright. Well, thanks for checking it. If I find any new information that helps solve this problem I will post here, but otherwise hopefully the knowledge that it should work will help me find the solution. Thanks.
Is anyone going to update the Business App Sample to be G2 compliant?
Edit : It seems to work well with graphicsCompatibility = 1 running in #2085 but still it would be nice if it was up to date with all the changes in anchors etc.
Thanks
Looking forward to giving this a spin using the newest build. This is the kind of ‘kitchen sink’ app that is desperately needed to compete with Titanium, imo.
It should have been updated today. FWIW, it actually will run on G2.0 or G1.0. It now checks the build version and applies colors and positioning relative to the graphics engine in place. Normally you would not want to do this and at some point, this extra code will probably be removed, but while we have the community on both platforms, it made sense to have one version that ran in both engines.
Rob
Thanks for the update. I think the conditional code will be interesting to observe as well.
Folks,
I’ve been scouring the threads for a couple of days now and I’m sure I can get a quick answer here (the last entry regarding this was in 2011, from what I’ve found).
I have max resolution on my iMac 27"
Everytime I run the “iPhone” simulator it’s roughly the right size for the 3 & 4 series.
When I select the 4 or 5 iphone it goes offscreen and I’m on a 27" system with resolution maxed out.
Any quick quotes that might assist me? (oh, and just to have a tidbit on topic, my oral surgeon found out I build apps and wants me to build him one. Guess I’m going to be getting on the bus app demo soon .
Thanks much.
Richard
Quick question on statusBar. I noticed the use of a display.newImageRect to paint over the statusBar using the same image file that is used to create the titleBar. I was wondering how you managed to color the statusBar (looking at the simulator) and tracked this down in your code. Very interesting… Did not try this on the device yet. Does it work well? Is this the best way to match the statusBar color to the rest of your app color scheme? Thanks
Richard, can you post this in a new thread as it’s not widget related and we don’t want to hijack this thread.
As for my trick of coloring the status bar, basically it’s there to not mess up some math I had going. The statusBar is transparent and sitting on top of my rectangle. It’s a hack, but it works.
Rob
Ahh, I think I get it. Its because Apple made the status bar translucent this works in IOS7 right? I was looking at the code to see if you used
display.setStatusBar( display.TranslucentStatusBar )
and did not see one so I was confused. Nice hack.