Johnno's Workbench - Tips, Tutorials, Domino, XPages, Java, Mobile, Appcelerator, etc

31 Mar 2015
1

Appcelerator workaround for ACS Publish “Request is not recognised” error

This is a workaround when getting a ‘Request is not recognised” Error when trying to publish a Node.ACS App to the Appcelerator Cloud.

The problem seems to be with the latest version of Node.ACS (In my case version 1.0.23) not compatible with the public Appcelerator Cloud platform. As per this post, it’s recommended to downgrade to version 1.0.21. This worked for me.

To downgrade your version of Node.ACS, do the following:

  1. Open Terminal
  2. Enter the following command: “sudo npm install -g acs@1.0.21
  3. Provide administrator password if requested
  4. Restart Titanium Studio (Just in case)
  5. Once Titanium Studio is restarted, select Node.ACS app and Deploy.

That’s it. Hope this helps.

John

9 Mar 2015
13

XPages Best Practice: Don’t add ids to controls if they are not required

This is a quick best practice tip and what will most likely become an involved discussion around ids for XPages controls.

I had to think carefully before posting this, but decided to do so as I know it would prove beneficial to the online community either way.

One of the recent items I’ve added to my “best practices” list, is to not use ids for XPages controls that do not require it. A great example of this are label controls. 99.9% of the time, I require no programmatic handle on any of my label controls. What most should know by now is that if you assign an id of “label1” to the label control, this id gets converted to something along the lines of “view:_id1:_id2:_id11:label1” when the HTML page gets rendered to the user. I’m hoping by now you start understanding my concern?

Let’s say you had about 20 controls that make up your XPage that don’t require ids….that’s at least about 500 bytes of data the user has to download just for these id names. NOTE: This is before compression has taken place. (This could be 100 bytes after compression is applied)

See below example XPage. All it contains (other than the defaults that Domino provides) is 20 label controls with an id name of “label1“. The size of the HTML page is 633 bytes (post compression).

Screen Shot 2015-03-09 at 12.07.12 PM

See below 2nd example of the same XPage, except there are no ids assigned to these 20 labels. The size of the HTML page is 567 bytes (post compression).

Screen Shot 2015-03-09 at 12.05.16 PM

For most of you (i’m guessing), the difference in size is probably too small to action, but for me, it forms part of a drive to deliver the best online, mobile and browser experience possible to my clients and users.

Ok people, bring on the discussions….I’m ready!! :)

11 Feb 2015
0

IBM Domino Designer Tip: Change measurement for notes-based designs

This is a quick tip for those who want to change the unit of measure in IBM Domino Designer from inches to centimeters.

Inches are a default for IBM Domino Designer when setting up table designs and the like in Notes, but I prefer to use centimeters. To modify the measurement, do the following:

  1. Open Domino Designer
  2. Click on “File\Preferences”
  3. Select “Regional Settings”
  4. Select which Unit of Measurement you want to use
  5. Click on “Ok”
  6. Restart Domino Designer

 

 

9 Oct 2014
0

Webstorm Tip: Use Key Promoter to help you find Keyboard shortcuts

For me, there are too many keyboard shortcuts to memorise in Webstorm IDE? Thanks to a nifty plugin, these shortcuts can be learnt on the fly.

Overview

What Key Promoter does is monitor your mouse clicks on Menus and Toolbars inside Webstorm. If a shortcut exists for where you mouse-clicked, Key Promoter will show you the Keyboard Shortcut command that you can use for that same action.

Firstly, where to find references to Keyboard Shortcuts

Note: The below instructions are for Mac, but Windows will be very similar.

  • Top Menu > Help > Default Keymap Reference
  • Top Menu > Preferences > Keymap
  • Keyboard: CMD + SHIFT + A (For Mac)
  • Keyboartd: CTRL + SHIFT + A (For Windows)

To install Key Promoter

Note: The below instructions are for Mac, but Windows will be very similar.

  • Go to the Webstorm Preferences: Top Menu > Preferences
  • Search for “Plugins”
  • Click on “Browse Repositories”
  • Search for “Key Promoter”
  • Click on Install Plugin
  • Restart Webstorm

Webstorm

Test Key Promoter

After restarting Webstorm, you can test Key Promoter by performing the following mouse actions below:

  • Clicking on the Changes Tab at the bottom of the Webstorm IDE

Webstorm2

  • Clicking on the Git Update Project icon on the top right of the Webstorm IDE

Webstorm3

Closing

I trust this tip will help you be more productive when developing? Stay tuned for more.

Cheers for now
John
3 Oct 2014
7

Appcelerator fix for Ti.Map on iOS after upgrading to Titanium 3.4.0

This is a quick tip on how to get Ti.Map working again on your iOS7 builds after upgrading Titanium to SDK 3.4.0.

Quick Note

For the sake of those who just want to know how to fix the problem and not why it occurred, I will commence this post with the fix and then after that explain what I assumed happened.

Also, thanks to Tim Poulsen and Boydlee, please see below Option 1 on how to resolve this issue best. I’ve kept my option as Option 2

How to fix the issue – Option 1 (Thanks to Tim and Boydlee)

  • In Titanium Studio, open the tiapp.xml file in your mobile project
  • Under the Modules section, double click on the entry “ti.map”
  • Change the version to 2.0.2 (Which seems to be the version that will work with SDK 3.2.0 and up)

TiMap5

How to fix the issue – Option 2

  • In Finder, navigate to “Library > Application Support > Titanium > modules > iphone > ti.map
  • Starting with the latest version of Ti.Map, open the relevant folder (e.g. 2.0.5)

TiMap

  • Open the manifest file using TextEdit
  • Check the mindsdk property. If it says 3.4.0, then it will only work for iOS 8 Builds

TiMap2

  • If you want to still develop for iOS7 and use Ti.Map globally for all your apps, then you will need to delete the version of Ti.Map relevant to the above-mentioned
  • In my case, I needed to delete the 2.0.4 and 2.0.5 folders. Now, my latest version of Ti.Map is 2.0.2

The error I was getting

I mentioned in a previous post of mine, that the reason I upgraded Titanium Studio to version 3.4.0, was because Xcode 6 silently installed itself on my machine. When I upgraded Titanium to 3.4.0, I got the following error message when trying to run a build for an iOS7 app that makes use of the Ti.MAP module:

TiMap3

 

My assumption of what happened

So, here’s a shot in the dark of what happened. When upgrading to Titanium Studio 3.4.0, Appcelerator saw that I had the Ti.Map module (which Appcelerator developed) and immediately downloaded the latest version (2.0.4 or 2.0.5), which I assume is required for iOS 8 development.

The truth is, I can’t remember what version of Ti.Map I installed last, but I do know that it was working. When I opened the modules folder on my Mac, the latest version was 2.0.4.

At this time I thought that maybe I downloaded 2.0.4 a while ago, and during the update of Titanium Studio this module was modified accidentally by the update.

My first attempt to fix the problem

First thing I did was check on Github what the latest version of Ti.Map was. I noticed 2.0.5 was released and downloaded that to my modules folder.

Sadly this did not fix the problem. I still received the same error as before.

My second attempt to fix the problem

I got a bit clever and opened the manifest file for version 2.0.5. I noticed that the minsdk parameter had a value of 3.4.0. I changed this to 3.2.3.

The good news is that my app was successfully running again. The bad news is that when launching any window that made use of the Ti.Map module I got the following error:

TiMap4

It was here that I finally made the assumption that Ti.Map 2.0.4 was automatically downloaded, as it contains code that only works in XCode 6.

My third attempt which finally fix the problem

What I did next was started from the latest version of Ti.Map, and checking backwards which version had a minsdk lower or equal to 3.2.3. In my case, it was version 2.0.2 of Ti.Map. So I deleted the 2.0.4 and 2.0.5 folders, reran my iOS7 build and Boom. Everything is working again.

I hope this helps everyone. I welcome any input that would assist in understanding what happened here.

Cheers for now
John