Container, Part 1: Make your own control

One of the new controls in AppStudio 5 is the Container. It has a couple of uses: you can create your own controls with it, or you can use it as a container for other controls. We’ll deal with the first use in this article.

First, a bit of background. Late in Version 4, we introduced a new Generic control. We realized that a lot more could be done with it, so for Version 5 we enhanced it and renamed it Container.

Any page of HTML is made up of Elements. The specifications for HTML define a few dozen Elements. Examples are Paragraph (“<p>”), Input (“<input>”) and Button (“<button>”). Each of these has a whole bunch of parameters, grouped by Classes, Attributes and Styles.

Controls (also called Widgets) are structures made up of one or more Elements, with their parameters defined to provide a particular appearance or behaviour.

What AppStudio essentially does is create fancy HTML pages by making it easy to set up these Controls, then let you use them in your program. The Container gives you a control with complete control over its appearance.
Continue reading “Container, Part 1: Make your own control”

Simulate an Actual Device for Testing

Want to test how your app will look without have to download to a device? Recent enhancements to Chrome make this possible. Now it’s easy to watch the affect of different screen sizes and rotation on your app – all within the Chrome Debugger.

Run your app locally as usual. It will get started in Chrome. Open the Chrome Debugger by hitting F12 (option-command-J on Mac). See the phone shaped icon in the tab bar?

chromedebuggerdevice
Continue reading “Simulate an Actual Device for Testing”

AppStudio 5.0.7 released.

AppStudio 5.0.7 has been released. It has some new features as well as important fixes.

Probably the most useful is that a message now pops up if there is a runtime error in your code. Before, there was no way to know whether there was an error without opening the Chrome Debugger.

Screen Shot 2015-05-11 at 6.44.47 AM

You can turn this off with the new stopOnError project property.

Here is what else is new:

  1. Deploy: A message now appears if errors are encountered at runtime.
  2. Project Properties: New stopOnError property to hide runtime error messages.
  3. Controls: MsgBox appearance improved.
  4. Forms: Modal forms now have onhide and onshow events.
  5. EXE Files: Put on Start menu, not Startup files list.
  6. Code Window: False negative on location = fixed.
  7. DropBox: DataStore API is being deprecated by DropBox.

AppStudio 5.0.6 released.

This update has improvements to Form bounds, plus a number of fixes.

  1. EXE files: Icon handling improved.
  2. Forms: Bounds now in a group
  3. Forms: Bounds can now be percent, “auto” or a value.
  4. Deploy: Code is only minimized when requested.
  5. Design Screen: extra time during startup allowed for.
  6. Controls: Minor path error in jqxDateTimeInput fixed.

Project CSS: Advanced Styling

Styles are a powerful tool for shaping the appearance of your controls. To a large extent, AppStudio lets you avoid having to learn a lot about them: it just handles them for you. But if you want to do something special, it’s easy to add extra styling of your own.

The most common place to put a simple style rule is in the ‘style’ property of a control. This is very specific: it will only apply to that specific control. Where the concept of styles gets powerful is the ability to have style rules apply to groups of controls.
Continue reading “Project CSS: Advanced Styling”

AppStudio 5.0.5 released.

This release brings two related new features.

First, there are now a bunch of new properties to help you create Windows exe apps. You can now specify your icon, the window size, etc. That increased the number of project properties, making it a bit unwieldy, which was solved by…

Second, properties are now grouped. The exe properties have their own section in the Properties Editor, along with PhoneGap, bounds, borders and fonts. It’s now much easier to find the property you’re looking for.

Here is the complete list of what is new in this release:

  1. EXE files: Support added for localStorage.
  2. EXE Files: new properties for publisher, icon, title, height and width.
  3. EXE files: now run as a localServer
  4. Controls: jqxGrid was not initiated properly in jqWidgets 3.8.
  5. Deploy: fix encoding mode on LaunchIcon57.png.
  6. Deploy: jsmin fixed.
  7. jQuery: updated to 2.1.4
  8. Properties Window: Properties now have groups.
  9. Properties Window: Borders, Bounds, Fonts are grouped.
  10. Properties: for Chrome Packaged Apps removed.
  11. Samples: Grid sample cellrenderer fixed for jqWidgets 3.8.
  12. ToolBox: Function list was sometimes not refreshing.
  13. Translator: add some semicolons

Modal Forms

AppStudio 5 makes it easy to have Modal Forms in your app. A Modal Form pops up over your app, dimming out the rest of the screen. The user has to close the Modal Form before continuing with the app. It’s useful for messages, password input or confirmations.

modalform

Modal Forms are created just like any other form. They can have the same controls, colors and backgrounds. A few properties need to be set differently:

  • modal: True
  • fullScreen: False
  • left and top: value does not matter – form will be centered.
  • width and height: pixels, percentages or ‘auto’

At runtime, show and hide modal forms like any other form:

Modal1.show()

There are a number of options you can set when opening a modal form. Set these using object syntax: inside {} braces, put key, value pairs. For example, to fade in the modal form over 1 second with a completely opaque overlay, do this:

  Modal1.show({fadeDuration: 1000, opacity: 1})

For the full set of options, see the docs.

AppStudio 5.0.4 released.

Just a few new items this time. The first one is the most important. On April 27th, jqWidgets released their version 3.8.0. Unfortunately, this introduced a namespace conflict with one of the other libraries AppStudio uses. We went back and forth with them about the best way to fix this: the fix in the this release.

What’s new in 5.0.4:

  1. jqWidgets: Library conflict caused by jqWidgets 3.8 fixed.
  2. Samples: new PhoneGapFileSystem sample.
  3. Languages: locale files updated.
  4. Native Build Status: now shows a wait cursor.