Skip to content

Xojo Programming Blog Posts

Working with Files: FolderItem

Sooner or later your app will need to work with files, maybe to save the data generated with the app itself, to open the files created with other apps or because is the main purpose of the utility you are working on. Xojo gives you the class FolderItem fully loaded with a useful bunch of properties that allow you to examine the attributes of any file; for example, the creation or modification of dates, the file path (in several formats), if the file is an alias, etc. The FolderItem class also gives you the methods to do a lot of file operations without effort.

Comments closed

Do you still ASCII?

From time to time we get code that illustrates a problem a user is having when they rely on old-school ASCII. This problem can occur when using the Chr function to create a character.

One example we see reasonably frequently is code to create a string that contains a quote like:

 dim someString as String = chr(34) + "someValue" + chr(34)

This style is not necessary and may give unwanted results if you have an unusual string encoding. Instead, you can write this without the use of the Chr function. Here’s how:

Comments closed