Week ending 29th July

Sunday 23rd July

Had to put up a curtain rail yesterday afternoon so, courtesy of my arthritis, I am struggling to concentrate this morning. Never mind. I intend to investigate query.mobile to see what it can do for me over the next few days whilst I program just the tablet interface.

Monday 24th July

Managed two sessions today in an effort to catch up with the time I lost last week. Firstly, just to mention it, I have not had my TMA 03 back yet so I have no feedback on my current progress. I have complained to the Student support.

I spent some time messing about with logos etc. but went down a blind alley so decided that I could do without for the time being. I am now using jQuery to put the horizontal buttons in correctly. There was some extra code needed in the back end as, currently, the only option for data from the server was for client specific data. The back end can now deliver specific data types such as locos, cars, etc.

I finished the day with the “View Data” page showing the correct heading and the JavaScript holding the requisite JSON data set. Target for tomorrow is to put these data sets into tables on the mobile screen.

Screen Shot 2017-07-25 at 10.43.31

Tuesday 25th July

I spent the whole two hours trying to figure out how to create a table in Javascript so that I can build the list of items selected using the buttons in Monday’s effort. There is an awful lot of information out there but, somehow, it never seems to answer my queries so I end up experimenting instead. The problem is simply stated. I have a list of items that I want to put into a table. I need a table so that I can get each column nicely aligned. There is plenty of help out there to show how to build a table from a list of know items but I want to insert data objects into the table. Fours has been spent on this and I still can’t see how to do to. I will take the problem up again on Thursday.

Thursday 27th July

I spent a fruitless day trying to get these static data lists to work the way that I want them too. My experience in JavaScript is very limited – enough to get through TM352 – but not enough for what I am doing now. However, I have the time and the inbuilt software knowledge to batter my way through this. It is a case of not knowing all of the inbuilt functions and remembering to put curly braces around things. I am getting close – but no cigar as the Americans say.

Friday 28th July

Got there. Spent another hour battering down the door and finally sorted it all out. I now have static data displays working on Android for the parts that move – freight cars, coaches and cabooses.

Screen Shot 2017-07-28 at 17.34.20

I can stop now and feel as though I have hit a little milestone. Next stop is to sort out the Loco display – just a slight tweak. After that I have to get the rest of the data displays going – town, routes, trains etc. This is going to be a bit more difficult as Chrome is throwing up an exception when reading the JSON for these items. It seems that there might be a “dodgy” character in there which my software accepts but JavaScript doesn’t. I have to be out on Saturday (hence why I am working of Friday evening) so I will pick up on this for an all day session on Sunday.

I have also had my TMA03 back. I got 66% which isn’t brilliant but ~I fell down in one section – LO4/LO6/LO7. These are the areas where I am supposed to get others involved in the project to comment and offer suggestions. Plus, it seems that I must quote lots of sources of information to back up my project. As I am stuck for answers to these issues I am going to pen an email to my tutor listing the issues as I see them and ask for his assistance in how to deal with them. This isn’t my normal way as I am normally trying to be totally self reliant but he keeps on about this and I can’t see a way forward so I do need his help.

Saturday 29th July

Sorted out the Loco display and then had a look at the JSON problem. It turned out to be an easy fix. It seems that the JSON data records for the non-railroad stuff – trains, routes, etc.  had a line of “””””””””” appended before the final curly brace. A very short piece of Smalltalk cleared that up.

| last aCopy |
last := self at: self size. "Get the last curly brace"
aCopy := self copyFrom: 1 to: ( self size -1). "Make a copy and drop that char"
aCopy := aCopy trimEndQuotes. "Removes all " chars from the end of a string"
^ aCopy, '"', last asString. "Insert a needed " and replace the curly brace"

The JSONs were now accepted by JavaScript and some sort of display was presented. Next step (Monday) is to format these data items. This will complete this part of the project.


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s