Is there a way to determine if a client is running mobile

I just got my project hooked up with the mobile module for the first time, and am viewing it on the iPad. I am having problems with some of the functionality, as the controls that work so well on the PC with a mouse are not that great on the iPad using a fat finger.

For instance, a dropdown that has over 1000 devices listed in it shows a scroll bar, which on the PC is easy to drag down to the range of devices in which the one you desire is located and can be selected with a click. But on the iPad, I can’t drag the scrollbar at all, and can only click and hold the down arrow to slowly move down to the device I desire. That takes quite a while if it is way down the list.

So I’m thinking I can do this another way for the mobile client, and leave the PC client alone. But I don’t want two projects. I would rather just have another window for the mobile client that uses another method to select a device. My windows are selected via a script that fires whenever a user selects a menu option. Is there some way to detect that the user is on the mobile client so the script could select the correct window for that client?

Yes, there are two ways to get this info. There is a system tag “[System]Client/System/SystemFlags” and a system function “system.util.getSystemFlags()”. Both return the same value, you just need to check the right bit. You can leanr more about them in the user manual.

Robert, thanks for the info about the system.util.getSystemFlags. The user manual says to see the examples for tips on how to extract the information in this bit field. Unfortunately, there are no examples. I searched for system.util.getSystemFlags and got the same page of the manual.

So I tried something and it appears to work. I thought I would share with others in case it helps. I added a label named lblSystemFlags and a button. On the button mouseReleased event script, I placed this code…

event.source.parent.getComponent('lblSystemFlags').text = '' if system.util.MOBILE_FLAG & system.util.getSystemFlags(): event.source.parent.getComponent('lblSystemFlags').text = 'Mobile' else: event.source.parent.getComponent('lblSystemFlags').text = 'Not Mobile'

which does a bitwise AND of the mobile flag bit and the system flags. When I click the button on the client running on my PC, the label text is ‘Not Mobile’. When I click the button on the iPad, the label text is ‘Mobile’.

You can also use the System tag and some bitwise operators to create a Client Tag (expression) that will tell you if it’s a Mobile client.

Good deal, Robert. Thanks again for your help.