How To - Displaying Content in Internet Explorer
Many programmers have realized the benefits of using a browser ActiveX control within an OpenInsight form. HTML provides an easy way to deliver rich, flexible, and dynamic content. For example, this is a popular technique for building application dashboards.
There are occasions when an ActiveX browser control will not be ideal (or work at all.) A recent project required OpenInsight to display some rather complex reports that were created on-the-fly via a web service. In and of itself this was not a problem. We were able to make our request and get back the report within an XML wrapper. However, the HTML content included various elements that precluded the use of an ActiveX control, such as various dependencies upon the document object model (DOM). Therefore, another method for displaying HTML was required.
Did You Know - Using the SRP Editor for Code Presentation
Therefore, the programmer only needs to select their code, right-click, and click on the 'Copy as HTML Code' menu item. Using this results in a block of HTML code that you can now paste into a document that supports HTML formatting, including many blog pages... Missing In Action...SRP Splitter Control
It has been a long-standing policy of SRP to not announce a product before it is ready for public release. At any given time we have a dozen products in the works but some will inevitably be put on the back burner as priorities get shifted. We would rather not build up expectations on what might eventually be vaporware.
However, on occasion the "cat gets out of the bag." In this situation, it was the result of having updated the SRP OLE Help documentation for the SRP Splitter Control and including it with some of our more recent download links. This has invited inquiries about the control and concerns over its omission from our control suite.
As might be assumed, we have an SRP Splitter Control in the works. In fact, it is close to being finished. While it is designed to overcome the known bugs (some of them being showstoppers) of the native OpenInsight split bars it will not automatically slide controls on the form. This will have to be done by the programmer during the OnSplitterMove event. Visually speaking we believe the SRP Splitter Control will be an improvement. It supports our very flexible color fill pattern (i.e. gradients, vertical or horizontal directions, and custom borders) and the control can be any vertical or horizontal size as needed. Thus, it won't force itself to occupy the entire height or width of the form nor will it interfere with other SRP Splitter Controls that might be on the same form.
We do not yet have pricing or licensing information available. However, when we do it will be posted on our Product News page. Stay tuned!
SRP Utilities Update, Version 1.2.1
Recently a customer reported that a rather simple dynamic array (@FM/@VM) was failing to sort correctly using the SRP_Sort_Array function. Actually, that was an understatement. It wasn't that the array failed to sort...the array became almost unrecognizable. What made this even more interesting was that this customer was having great success with much larger arrays. A mystery indeed.
After debugging the code it didn't take long to identify the problem. Some fields in this array had more values than others. An underlying assumption of our logic was that all arrays will have the same number of minor delimiter elements. Well, obviously this isn't always the case so we updated the SRP_Sort_Array to support this situation. We were gratified that even despite this nuisance our customer was quick to comment that "It’s the first time I have used these utilities, and they are good, easy to use, and fast." This was exactly our goal. If you haven't tried this free utility then we encourage you to download a copy from here.
SRP Mail, Version 1.2 and SSL
One of the lesser known but increasingly important features of the SRP Mail utility is support for SSL and custom port settings. As customers begin to utilize free (or low cost) powerful email service providers (e.g. Google) the need for SSL support becomes critical. The ability to encrypt email used to be a luxury, due to the increased bandwidth requirements, but now it is becoming standard operating procedure for business and enterprise email. SRP enhanced their venerable SRP Mail utility to accommodate the ever increasing demand for this feature.
SSL (i.e. Secure Socket Layer) is being superseded by TLS (Transport Layer Security). In either case it is very easy for the programmer to support these protocols. Simply specify the appropriate port number and set the SSL flag to a 1 as demonstrated below:
$insert SRPMAIL_INSERTS
Config = ''
Config<1> = SendUsing_Port$
Config<3> = 465 ; // <-- Port setting.
Config<4> = 'mymail.somedomain.com'
Config<5> = 1
Config<6> = 'myusername'
Config<7> = 'password'
Config<8> = 1 ; // <-- SSL/TLS flag.
Message = ''
Message<1> = 'Subject Line'
Message<2> = 'myemail@somedomain.com'
Message<3> = 'myfriend@somedomain.com'
Message<4> = ''
Message<5> = ''
Message<6> = ''
Message<7> = 'TEXT'
Message<8> = 'Hello World!'
Message<9> = ''
Message<10> = SRPMail_Importance_Normal$
rv = SRP_Send_Mail(Message, Config)
SRP Mail v1.2 is a free upgrade to existing SRP Mail customers. Both upgrading customers and those interested in evaluating the product can download it (without registration) here.
What's Under the Hood - Showcasing the SRP Utilities (Part 1)
Recently a customer reported that they were having trouble installing the SRP Set MinMaxInfo utility. Immediately I began to get suspicious and through a quick Q&A session discovered that the customer was attempting to install this from the three year old installer which is still available from our Downloads page. This served as a helpful reminder that our Downloads page is seriously outdated. Not only do we no longer support the original installer for the SRP Set MinMaxInfo utility, we no longer provide that as a stand-alone utility! Instead we have bundled it within our feature rich (but still free) SRP Utilities.
We realized that perhaps many OpenInsight developers might not be aware of this product. Although it was unveiled during one of our 2008 Revelation Users Conference presentations we never updated our website to make it available to the community at large. This was somewhat on purpose as it is customary for conference materials (or product in this case) to remain exclusive to conference attendees for a period of time in order to encourage more people to participate. It is now time to showcase the many tools that comprise the SRP Utilities package. To kick things off we will focus on some very useful Array functions.
The SRP Utilities help document summarizes the Array functions quite nicely:
The dynamic array is the corner stone of the BASIC+ language. Simple array manipulation is elegantly and efficiently handled by the OpenInsight engine. However, there are a few tasks that become inefficient due to complexity or limits of the interpreted language. SRP Utilities offloads much of this to the SRPUtilty.dll for easy, fast processing.
There are several array manipulation functions at your disposal. The SRP_Clean_Array function quickly removes blanks and duplicates from your array. Need to prepare a two-dimensional array for use with V119? Use SRP_Rotate_Array to turn a LIST into an ARRAY, and use SRP_Reorder_Array to rearrange your columns. Both function perform at incredible speeds not possible in the BASIC+ function. Better yet, forget using V119 and use SRP_Sort_Array instead. Doing so will eliminate the need to prepare your data altogether. And it's fast!
So, whether you want to save time writing code that manages your dynamic arrays or whether you want to save processing time managing your dynamic arrays, the suite of SRP Utilities Array functions will provide you exactly what you need. Please note that the SRP Utilities installer (like all SRP product installers) will provide you a repository definition to make it easy for you to deploy with your own RDK updates!
(Edit: Of course...what good would it be to describe the SRP Utilities if we didn't provide a way to get them? You can get the installer here.)
SRP Editor Update, Version 2.3.2
A customer reported to us that our "Auto Indent" feature was more nuisance and less feature when attempting to use a keyword as a GoTo label. Although we cringe at the use of keywords for labels (and variables) we thought we had already gone down this road and fixed the problem. However, upon further review we discovered that our fix was added for the GoSub command. Since our internal programming standards basically forbid the use of GoTos we must have overlooked this and omitted the fix for both situations.
Needless to say the latest update resolves this for both conditions. Even if this isn't something you care about we recommend that you upgrade to the latest SRP Editor which can be downloaded from here. It's a free upgrade for all v2.x customers.
SRP Utilities Update, Version 1.2
SRP Utilities 1.2 has been released. It includes three new methods designed to make life easier for the OpenInsight developer: SRP_COM, SRP_Extract_XML, and SRP_Save_Screenshot.
SRP_COM was developed when a client of ours needed COM support within 7.0. If you find yourself in a similar situation, SRP_COM can make life much easier. This one method can instantiate COM objects, manipulate that object's properties and methods, and pass object references between one another.
SRP_Extract_XML uses the XPath query language to extract XML fragments or data from an XML document or larger fragment, all in a single line of code. We all know how well suited BASIC+ is for string manipulation, and creating XML files is easy. However, parsing them usually requires a lot of assumptions or a third party solution. Sometimes, we just want to point to some data and pull it out. SRP_Extract_XML does exactly that provided you are willing to learn how to use the XPath query language. As the name implies, it allows you to access XML data using a syntax similar to what we use for directory paths.
SRP_Save_Screenshot allows you to programmatically take screenshots of OpenInsight windows. This need came to our attention when one of our clients, whose employees like to send screenshots to each other on a daily basis, requested an easier way to do this. While the client had fancy tools such as SnagIt, they still wanted to be able to do it all in one motion. With the help of this handy little function, our clients simply use a keystroke to have a screenshot of a window automatically embedded within an email or sent directly to a printer.
All these functions are documented in the SRP_Utilities.chm included with the SRP Utilities installer, which you can download here. If you have any questions, comments, or feature suggestions regarding our free SRP Utilities, don't hesitate to call or email us.
SRP Tree Control Soon to Be Released - Preview on YouTube.
One of SRP's most anticipated new ActiveX controls, the SRP Tree control, is scheduled to be released to the general public in the next week. A special "teaser" has been prepared and posted on YouTube. Enjoy!
