Before I get too carried away with writing C# code to access the secure server data, I need to fix one bug that has been bothering me since I first created the main screen. The bottom AppBar has nice looking toggles but I need the 4 toggle buttons to be like radio buttons. it should be easy to fix since I made a note of the MSDN page that explains how to fix them. I like to close everything when I leave to go home each evening. This morning I start by double clicking on the GitHub kitten on my desktop and make sure I committed everything yesterday. I then open VSE and click on my project under the recent projects sections and I am ready to go. I went to Tim Heuer's blog on my Windows laptop and read the current top 3 blog posts as he has great words of wisdom. He mentions using Modern UI Icons and explains how to use a custom font for social icons; I already know how to do that but it is good to find out I am doing it the same way. I continue on as he seems to always mention stuff that I need to know, like the next blog post I found interesting on old style Callisto menus and Flyouts since I will need to create dialogs next. Then I see a post on how to show character ellipsis when truncating text, which is so useful as I will need that one also. I think I could keep reading all day long as the next blog post I see is on how to use the new SettingsFlyout as I need that one as well. He even makes his web page buttons use the new Windows 8 toggle buttons, which is going a bit crazy for me, but he is a Windows guy so I understand. I finished scanning all of the blog posts on his main page so switch over to the Windows laptop and try to access the blog post I need. I entered part of the name incorrectly and saw a very nasty looking 404 error page. That shows me about all I need to know about IIS, which is definitely not the happy part of Windows to me. After a couple of attempts I finally get to the correct page so how I need to fix my toggle buttons. The good news is that he saved a Gist so I will try to use it as-as. But wait, there is more, I read the comments and found out that this is all built-in for the current version of the Metro UI I am using. Before I move on I have to look up who Tim Heuer is and does. I see he is the Program Manager for UI platform (XAML) and tools at Microsoft, so he is a Microsoftie after all. That makes me feel better when I depend on his code to solve my problems!
I am beginning to think it is time to visit the local Barnes & Nobles bookstore during the Thanksgiving break and read up on Windows 8 now that I have a good feeling of how things work. I need to get beyond advanced beginning stage quickly and that for me would be my ticket. I can find all kinds of stuff on the web and the MSDN site but maybe a book that covers everything from start to finish would get me over the edge.
That means it is time to go back and understand two of the examples I got working that will help me with the JSON from the secure server API. The first example is Background Transfer that connects to a server in the background and transfers the data and then saves it in a file. The second example is Json Sample which processes JSON and saves it in objects. All I have to do is learn how they work and then combine that functionality into my project. How simple is that? Turns out it is going to be a lot of work but I also have the existing iPad code to use to help me on the model code. I jumped over the Safari and tried one of the URLs to retrieve the data and boom an error resulted. That cannot be good. I went over to my Windows laptop and tried the same URL in my modified Background Transfer app and I got an error but it was a bit different. I emailed all of this information to the developer in charge of the API. When I search globally for something in VSE it always show me a line number but I have no idea what line that is in the file I am looking at so I had to look up how to enable line numbers in VSE. I selected Options in the TOOLS menu in VSE and find the "Text Editor" menu on the left hand side. Then find "All Languages" under "Text Editor" and click on "General" and I see my "Line Numbers" is unchecked. Clicking on OK results in line numbers in my editor window! Of course I can always click on the line in the "Find Results" window and it takes me right to the match, but still I am old and cranky today and when I want to see line numbers I need line numbers.
This article is good as it describes the Windows 8 Application Lifecycle.
Today was a very frustrating day. When the API secure server was having issues, I switched over to create the UI to let the user decide how much data to load and how often to update the data if is a live data feed. First thing I had to decide was which layout to use for the page. Should it be a dialog or a page? It needs to be shown initially so I choose a page. For the layout I choose a split pane. On the left hand side are the choices and when selected the right hand side shows the form that the user fills in what data they want to see. Sounds very simple but I got stuck many times in this one page. First I wanted to show a slider and customize the labels displayed when the slide thumb is moved. Apparently I am not man enough for that task as I just had to give up after spending way too much time on that. Then I thought I would add a label to display the value when the thumb was moved as a one way binding. Not that easy for an advanced beginning like myself in the world of XAML and C#. I thought my experience in 9 years ago was relevant but the world has changed under me since that time. Things are way harder than I anticipated. Then I got hung up trying to configure the list on the left hand side as a bindable resource. All of the examples I looked at made sense until I tried to do the same thing. Finally I found a way to get it to work but I am not sure it is the right way. Then I switched to the second page where I had a custom date picker. I really dislike the basic date and time pickers supplied as part of Windows 8 Metro UI. It just looks horrible. I have some special requirements for what dates are selectable so that was a he change as well. I ran out of energy and time while juggling a couple of other work related tasks so at the end of the day I felt drained and wonder what I accomplished today for this project. I cannot have too many more days like this or I am going to be in serious trouble.
No comments:
Post a Comment