PDA

View Full Version : Important Changes in Beta 1



Stephen W. Meeley
6-May-2015, 06:11 AM
Our next build of 18.1 is going to contain a number of very nice improvements to the mobile/touch navigation interface. These changes are going to make it lot easier to understand and work with the new framework style. We want to give you advanced notice of these changes.

The main simplification involves a change in the NavigateForward interface. This has an impact on compatibility. If you’ve already started building some of your own views, this is going to require some minor changes in your code.

The NavigateForward method will no longer require that you pass the eNavigateFrom type (nfFromMain, nfFromParent, nfFromChild, nfUndefined) as a parameter. Instead the cWebView class will just figure this out for you based on the view being navigated to and the view/ object being navigated from. We had originally felt that this from-type needed to be explicitly passed to give the developer maximum flexibility when navigating between views. What we realized is that this flexibility was an illusion. The framework has certain expectations about what relationships between views should be and when they were stretched (i.e., you exercised your flexibility) things just didn’t work right. This would result in problems that were hard to track down. In some cases you’d get errors, in some cases you’d get odd behaviors and in other cases it might work. What we also found is most of times passing the unexpected from-type was usually just an unintended error – we even had a few of those on our sample. Now we figure this out for you. You still use the from-type, when deciding what to do with a new view, but that from-type is now determined by the framework.

This is where compatibility changes with the previous alpha comes in. You must change any views you created during the alpha process. Here is what the change will look like.



// old code passes navigate from-type as a parameter
Send NavigateForward of oZoomOrder nfFromMain Self

// new code passes does not pass the from-type and will determine this based on context
Send NavigateForward of oZoomOrder Self // new code


NavigateForward now passes a different number of parameters (one instead of two). To change your code, you will need to find all occurrences of “Send NavigateForward” and remove that extra parameter. The next build will also have some test code that will count the number of parameters passed to NavigateForward and warn you if you have old style code. These changes should be pretty easy to make.

There will be a couple of other lower level changes that should make things easier to use and might be of interest.

The tWebNavigateData struct now has a member “bSaveBeforeNavigate” that can be set if you want to make sure you’ve saved your data before navigating forward. We needed to do this when moving from the ZoomOrder to the ZoomOrderDtl. The code to do this was really complicated and was something we knew we wanted to revisit after Synergy. We did and now it’s really simple (just one line: Move True to NavigateData.bSaveBeforeNavigate) . The wizards will be changed to take advantage of this simpler method. The samples have been redone with these changes and they are now a lot simpler.

The tWebNavigateData used to have an sData member which was used to pass custom data back and forth between views. At Synergy Sture Andersen wanted something that could pass more custom data between views and he suggested using a name-value pair array. This sounded like a good idea. We’ve replaced the sData member with a name value array member and provided an interface to use this. This allows you to pass complete sets of data back and forth which makes it more straight forward when navigating between non DEO based views. Previously we had thought you should just use web-properties for this, but this feels a lot better. We thank Sture for this suggestion.

All of these changes came about based on forum feedback and our experience at Synergy. Having to prepare material and stand in front of a group of developers and explain how things work is a great way to learn what is easy and what is hard. After the conference we took this experience and found ways to make things easier and more flexible. We thank you for providing us that feedback. Hopefully the changes you will need to make in your existing alpha views will be well worth the effort in the long run.

Best regards,

Your Development Team

Samuel Pizarro
7-May-2015, 07:43 PM
Once again, Congratulations for the hard work! :-)