Tag Archive for CA Plex

Search and Replace in CA Plex

Did you know that you can copy and paste Action Diagram code into a text editor such as Notepad or Notepad++.

This simple tip can be a real time saver when editing Action Diagrams in CA Plex.

Once you have the code in a text editor you can perform operations such as search and replace, or even run macros in Notepad++. For example if you need to add a number of new subroutines and want to include the recommended +Subroutine meta variable and associated edit points, you could do the following:

1. Paste the following boilerplate code into a text editor.

ª+1 Sub aaa
ª+2 +++Define Field: FIELDS/+Subroutine
ª+2 Edit Point Start aaa
ª+2 +If Field: FIELDS/+Subroutine
ª+3 Edit Point aaa
ª+2 Edit Point End aaa
ª+2 +++Undefine Field: FIELDS/+Subroutine
@@

2. Open the Search and Replace dialog in the text editor and replace the “aaa” placeholder with the name of your subroutine, e.g. “Process Results”.

ª+1 Sub Process Results
ª+2 +++Define Field: FIELDS/+Subroutine
ª+2 Edit Point Start Process Results
ª+2 +If Field: FIELDS/+Subroutine
ª+3 Edit Point Process Results
ª+2 Edit Point End Process Results
ª+2 +++Undefine Field: FIELDS/+Subroutine
@@

3. Select the code and copy the text.
4. Paste the copied text into your Action Diagram.

subroutine

5. Repeat the steps for any other subroutines you want to add.

Be careful not to modify any of the special characters, e.g. “ª+2” or “@@”.  The code you edit will be parsed by Plex when you paste the text, so it may report any errors if for instance you mistype a field name.

iOS App Tutorial for CA Plex / CM WebClient

Introduction

Developers that have started using CM WebClient 1.8 Mobile’s touch optimized templates usually find that creating a mobile web app deployment is straightforward. But while deployment as a web app is acceptable for some, other developers creating commercial and specialized applications often benefit from native deployment. For example, you may need to use the camera to capture pictures or scan documents, implement a signature capability, or access the phone contact database. CM WebClient supports this style of native application using Adobe/Apache PhoneGap. There is a Camera and Signature template available, and you are encouraged to create your own device templates and share on the WebClient Mobile Google Code project.

This tutorial is for Apple devices (iPhone / iPad), and also requires use of a Mac to run Xcode and to meet Apple licensing requirements. If you are targeting Android or Blackberry devices, you will need to follow a similar but different procedure for each device platform. I.e. your core code remains the same, but the PhoneGap native wrapper is different for each technology. PhoneGap has tutorials available for every supported platform.

Download and Install Software

For this part you need access to an Apple Mac. Point the browser from your mac to the Apple developer website, http://developer.apple.com. Download the latest version of Xcode and the iOS SDK’s. It is over three gigabytes, so you may want to have a couple coffees at this point. You may also want to take some time to sign up as a developer, either individually or within an organization. Organizational approvals can take weeks to process by Apple, so it is always better to do this well in advance of needing to upload your app for public distribution.

After you have installed Xcode, download the PhoneGap distribution from http://phonegap.com. This example is using version 1.3.

Run the installer

NewImage

Follow the steps on the installer wizard

NewImage

Create Your Xcode Project

Open Xcode and select “Create a new Xcode project”

New Project

Choose PhoneGap as the template for your new project

NewImage

Give your project a name and identify your company. Typically your organization / company id will be your domain name in reverse word order. It is important to deselect Automatic Reference Counting – otherwise build errors will result.

NewImage

Select a directory location for your project. A subfolder will be created beneath the directory you select to contain your project. It is recommended to also create a local repository for source code changes – that way you can easily revert if you make a mistake.

SelFolder

Next, enter project information. You can drag and drop application icons if you wish (you can do this later if you don’t have any  icons prepared).

NewImage

Keep scrolling down and enter iPad information as well as application launch images (splash screens). Do not enter Entitlements unless you know what to fill in.

NewImage

Hit the validate setting button to make sure all is ok

NewImage

You may get a window like this. Accept this recommendation.

NewImage

It is recommended to select the automatic snapshot option

NewImage

Configure and Run

You will now see the Xcode workbench. First we have to run the application once in order to create a “www” folder that contains the Phonegap startup code and resources. Select a simulator target and hit the run (play) button.

NewImage

You will see this error in the simulator – this is expected and is not an issue. It means that your app cannot find a start page.

NewImage

This next step is very important and must be done exactly as described. We need to create a folder reference in Xcode to our www and javascript resources. You do this by opening Finder and dragging the “www” folder beneath the project onto the Xcode project work space. You will see a green plus sign indicating the drag target is accepted. You will then be prompted to create a reference to this folder.

NewImage

Use the following settings

NewImage

Run your project again, and you should see that PhoneGap is now working. The HTML5 and JavaScript you see are running directly on the device, not served up by a web server.

NewImage

Connect your application

The next step is to connect your CM WebClient pages to PhoneGap. There are two parts to this.

First we need to add a whitelist entry to allow your app to access external resources. You do this in the PhoneGap.plist file.

NewImage

Next, add some JavaScript in the index.html file to access your dynamic content. For production applications, you will want to create some static web pages and a mechanism to check the online status. This is straightforward but beyond the scope of this tutorial.

NewImage

Run your app again from Xcode and you should be rewarded with your app on your device emulator!

NewImage

Congratulations, You Are Deployed!

You need some further steps to deploy your app to physical devices and to iTunes. Stay tuned for more blog posts, or contact us at CM FIrst for assistance if you are on one of our support plans.

 

Movie – Debugging on Devices with Firebug

Movie on how to turn on the iOS device JavaScript console and enable Firebug debugging

Debugging HTML5 Apps on iPhone/iPad

WebClient for CA Plex shields you from much of the need to delve into the internals of HTML5 and JavaScript on the iPhone / iPad platform. However, the fact is that sometime you have to debug the HTML and CSS directly on the device. This is a guide on how to do it.

There are two options available. The first is to turn the JavaScript debug console on. You can do this by visiting the device settings, and moving down to Safari. From Safari select Advanced Settings and turn on the JavaScript Console. This is sufficient for many issues.

NewImage

NewImage

Although the Apple debug console is certainly useful, sometimes you need more. One way is to use the Firebug, a popular JavaScript debugging platform.

You can debug using Firebug on your iOS device.

First, open Safari on your mobile device.

Next, create a bookmark in Safari on your iOS device for any webpage, and name that bookmark “Firebug.”

Following this, launch Safari and edit the Firebug bookmark, replacing the URL with the above text. Hit “Done,” and the bookmarklet should be created and ready to use.

In order to launch the Firebug console, visit a website on your iOS device and, once the website has loaded, open your Bookmarks in Safari and touch Firebug. After a few moments, the console should appear at the bottom of the webpage (as you can see in the above image).

javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+’NS’]&&F.documentElement.namespaceURI;E=E?F[i+’NS’](E,’script’):F[i](‘script’);E[r](‘id’,b);E[r](‘src’,I+g+T);E[r](b,u);(F[e](‘head’)[0]||F[e](‘body’)[0]).appendChild(E);E=new%20Image;E[r](‘src’,I+L);})(document,’createElement’,’setAttribute’,’getElementsByTagName’,’FirebugLite’,’4′,’firebug-lite.js’,’releases/lite/latest/skin/xp/sprite.png’,’https://getfirebug.com/’,’#startOpened’);

Following this, launch Safari and edit the Firebug bookmark, replacing the URL with the above text. Hit “Done,” and the bookmarklet should be created and ready to use.

In order to launch the Firebug console, visit a website on your iOS device and, once the website has loaded, open your Bookmarks in Safari and touch Firebug. After a few moments, the console should appear at the bottom of the webpage (as you can see in the image).

NewImage

NewImage

Webcast Replay – CA Plex, Mac, and Mobile Development

To view a recording of the webcast, click here:

https://www305.livemeeting.com/cc/cai/view?id=2F7GPS&role=attend&pw=kQ%2CM9%28%2BMg

 

CA Plex on the Apple Mac and iOS

See how CA Plex can be used to generate applications that run 100% on the Apple Mac (Java Swing with MySQL) or run iOS/Android devices using Xcode, Eclipse for Mac, WebClient, and PhoneGap.

 

WebClient 1.8 New Release Information

WebClient 1.8 has been in private beta since November 2011. We are readying a Release Candidate for January 2012, and General Availability February 2012.

There are several new features in the new release:

  • Mobile Touch Optimized Templates
    • iPhone, Android, BB6
    • HTML5 Sencha Touch based, with Adobe/Apache PhoneGap
    • Native capability including Camera templates
  • Core Product Enhancements
    • Accordion control, enabling Outlook style menus
    • New Claro theme, support for creating user defined themes
    • Auto scale CA Plex functions to browser size
    • Enhanced Grid, save placement, export to Excel, and more
    • Intellisense style interactive filtering
    • Initial Cloud Instance Definitions
    • Portlet Generations – Websphere Portal or Apache Pluto
  • Additional Features
    • FileOpen, Progress, Plex 7.0 …
    • New licensing – No more crypkey!

Please view the presentation below for more information:

If you are a current customer and wish to be part of the release candidate process, please drop us an email to info@cmfirsttech.com.

 

Welcome to the new cmWebClient blog

Welcome to the new cmWebClient blog. The old blog url will be retired shortly.

You can expect to see a lot of new posts in the coming days, as version 1.8 is readied for general availability.

Regards from the WebClient team at

 

CMFT Logo SML

WebClient i+ European Presentation

WebClient i+ was recently on display at the CA 2E/CA Plex user meetings in Sweden and Italy, along with demos of some upcoming new features like MDI (multiple document interface) support, new Ajax components like slider/progress bar, and Amazon Elastic Cloud (EC2) support. See the presentation below for more information.

Upcoming WebClient Events

WebClient will be on display at these upcoming regional CA Technologies events. Join us there to see the latest version of WebClient, as well as learning about other new CA Plex and CA 2E technologies. You can click on the links below to learn more and register for Chicago and Cincinnati. For the European events, please contact your local reseller.

 
 
© 2013 CM First Group - All rights reserved