Entries in apesuite (17)

Monday
May282012

Apesuite Spotlight: The X Object

I just wanted to take a quick moment to point out a bit of the behind the scenes and non-visual utiltiy that Apesuite can bring to Firemonkey.

When we startied working on Apesuite we quickly realized how narrow the Firemonkey framework is in regards to cross platform APIs and system level access.  It was sometimes a case that the APIs were wrapped differently than we expected or not at all.  

To simplify acessing some of this information in a standard way regardless of the operating system, we wrote what we call the X object.  

To use the X object in your applications, all you have to do is include Ape.Utility.CrossPlatform to your uses clause.  Once you do you have access to the following functions:

System

  1. X.System.FontFamilies - Returns a list of system installed font family names for use with the Firemonkey TFont.
  2. X.System.DPI - Intended to be a cross platform inspection of the current DPI setting, though currently returns a hard coded value of 96. 
  3. X.System.DebugWrite - Writes to the Windows debugger api on Windows and to the terminal on OS X.
  4. X.System.DebugEnabled - Turns on and off the output written with X.System.DebugWrite

Files

  1. X.Files.OpenWithDefault - The provided filename will be open with the default application on the system. For example, if you supply an HTML file, the file may be opened with IE on Windows and Safari on OS X.. or whatever the registered default application is for HTML files.
  2. X.Files.PathFrom - Creates a path using supplied directory and file names to return a path built with the correct delimiter.

Environment

  1. X.Env.SearchPath - Returns the currently registered search path on the system.
  2. X.Env.AppFilename - Returns the "app" name of the application.  On OS X this is the application package in which the exe resides.  On Windows, this is the name of the folder in which the exe resides.
  3. X.Env.ExeFilename - Returns the actual filename of the running executable.
  4. X.Env.AppFolder - Returns the folder path to the executable, stopping at the level of the application package on OSX.
  5. X.Env.ExeFolder - Returns the full folder path to the executable.
  6. X.Env.TempFolder - Returns a writable temp folder path that can be used by your application.
  7. X.Env.HomeFolder - Returns the user's writable home folder.  On OS X this equates to /Users/username and on Windows,  C:\Users\username\AppData\Roaming or the appropriate path as set on the system.

This is just the start of what this object will eventually become.  As we find that we need access to something in a simple cross-platform way, we'll be extending this object appropriately.  In the meantime, feel free to use what is there when you are developing your firemonkey applications.

 

Sunday
May272012

Apesuite Beta 6 - Released

We are please to announce the release of Apesuite for Firemonkey Beta 6. This release is our biggest yet with tons of new components and features and marks a major milestone in the progress of the Apesuite beta.

Here is what is new since Beta 5:

  1. TSmartGrid - A powerful spreadsheet style grid component with over 130 built-in excel-comparible functions, extendable function framework, borders, cell spans, alignment, fonts, inline editing and more.
  2. TBrushEditor - A tabbed panel editor for a TBrush object.  Allows for changing Solid, Gradient and Bitmap brushes at runtime.
  3. TBrushEditorCombo - A version of the TBrushEditor that is shown as part of a combo box.
  4. TFillEditor - A simple TBrush panel editor that makes selecting colors very simple for the end user. Optionally the user can drill into a TBrushEditor to make more refined chagnes to the TBrush object.
  5. TFillEditorCombo - A version of the TFillEditor that is shown as part of a combo box.
  6. TFontComboBox - A combo box listing all available fonts for selection by the end user. The font text may optionally be rendered in the style of that font.
  7. TFontListBox - A list box listing all available fonts for selection by the end user. The font text may optionally be rendered in the style of that font.
  8. TFontToolbox - A Toolbox to be used with the TPagebar component which allows full configuration of a TFont object at runtime including font styles, color and typeface.
  9. TRectangleButton - A simple and lightweight button component based on TRectangle.  It is used in the TFillEditor but available for use in your applications.
  10. TCircleButton - A simple and lightweight button component based on TCircle. It is used in the TBrushEditor but available for use in your applications.
  11. TToolboxComboBox - A combobox styled to work well with a TToolbox and TPagebar.
  12. TToolboxSpeedButton - A speedbutton styled to work well with a TToolbox and TPagebar.
  13. TToolboxFontComboBox - A font slection combobox styled to work well with a TToolbox and TPagebar.
  14. TToolboxSpinbox - A spinbox styled to work well with a TToolbox and TPagebar.
  15. TToolboxBrushEditorCombo - A brush editor combobox styled to work well with a TToolbox and TPagebar.
  16. TToolboxFillEditorCombo - A fill editor combobox styled to work well with a TToolbox and TPagebar.
  17. TToolboxComboColorBox - A color combobox styled to work well with a TToolbox and TPagebar.
  18. TClipboard - A cross platform clipboard implementation that makes copy and paste operations extremely simple, even for complex and custom data types.

We've also added two new demos to show off some of our new components and features:

  1. ApesuiteGridDemo - A basic spreadsheet like application that shows off the TSmartGrid, TFillEditor, TBrushEditor, TFontComboBox, TFontToolbox, TClipboard and several other components.
  2. ApesuiteClipboardDemo - A very simple application that shows how to use TClipboard to copy and paste URLs and Images between applications.

There were also several bug fixes and minor changes from the prior release.  The biggest breaking change that you may encounter is that we have renamed our TFlowLayout component to TFlowedLayout.

For those of you that have been looking for C++Builder support, I'm sorry to say that we did not get as far along that path as we wanted for this release.  The components do drop onto C++Builder forms and mostly compile, but there are some oddities in event timings in Firemonkey between C++Builder and Delphi that appear to be causing some AV's and make putting together usable demos for C++Builder fairly difficult.  We plan to put significant time into this before Beta 8 to make sure our components work across both equally well.  If you have significant C++Builder experience and are willing to come into the beta now, email me and i'll give you a good discount on the product in exchange for some help with our demos.

The Beta 6 update should be making it's way to the inboxes of our current customers any moment now.  New customers will also now receive the latest link when they make a purchase from this point forward.

If you have any questions or comments, please feel free to post them in the comments here or for current customers, you can use the email support channels as always.  

Thanks for supporting our products.

The Apesuite Team at Sivv...

Saturday
May262012

Apesuite Spotlight: Enhanced Firemonkey Clipboard

I just wanted to give you another preview of a new feature coming to Apesuite Beta 6.  

We had a lot of people complaining that our Grid Demo did not behave correctly when cut/copy/paste between applications such as Word and Excel.  We decided that due to the similarity of our component to applications like Excel and Numbers that this complaint would not be going away any time soon and that we should take a few extra hours to improve on our inter-application clipboard functionality.

Unfortunately, Firemonkey has a very simplistic interface that allows only a single string token to be saved to and retrieved from the clipboard.  This wasn't going to work for us as we need to store multiple formats to the clipboard.  To realistically handle most scenarios, we'd have to at least store tab delimited text for excel/numbers, rtf text for ms word, html for various html editors and browsers and of course, our internal copy and paste format that is respective of all metadata that would need to be replicated with the transaction.  

Our answer to this problem was to write our own system crossplatform clipboard object that works on multiple types of data and data formats and allows a clipboard that holds multiple formats at the same time.  

The functionality can be found via a global Clipboard funciton in the "Ape.System.Clipboard" unit. Here's a quick overview of how you can utilize this new feature:

Before adding anything to the clipboard you will want to make sure that there isn't anything else there:

Clipboard.Clear;

Then add some text to the clipboard by setting the Text property:

Clipboard.Text := 'This is my text';

Now if you want to add that same text with some HTML tags:

Clipboard.HTML := 'This is <b>my</b> text';

And say you had an image of your text that you also wanted to make available for a paint program:

Clipboard.PNG := MyImage.Bitmap;

Clipboard.TIFF := MyImage.Bitmap;

Now on the flipside, say you want to use consume items from the system clipboard.  To pull the text as a string:

str := Clipboard.Text;

or to grab your image back from clipboard:

if Clipboard.HasPNG then

  bmp := Clipboard.PNG;

  try

    MyImage.Bitmap.Assign(bmp);

  finally

    bmp.Free;

  end;

One of the most important aspects of clipboard usage is being able to define your own format.  We allow you to do this with the TypedText and TypedData properties:

Clipboard.TypedText['myformat'] := 'My|custom|format';

Clipboard.TypedData['myBinaryFormat'] := MyStream;

Of course, all of this is intended to work in both Windows and OS X.  

This new Clipboard functionality should open you up to coding more like a first class citizen of the operating system.  Please give this a try when you get your hands on Beta 6 and let us know what you think.

 

Wednesday
May232012

Apesuite Progress and New Firemonkey Grid Demo

The Apesuite Beta 6 release is coming along very smoothly and we expect to have it in our customers hands by this weekend.  We're essentially done adding new features for this beta and are just cleaning up a few odds and ends before it goes out.  Barring any unforseen circumstances, the update should be in the mail by Friday.

In the spirit of letting everyone in on the excitement, we have uploaded a new grid demo to play around with.  We are still looking for input on this release, so if you run into any glaring problems or have just general questions or feedback, please post them in the comments section of this blog entry.

The new demo can be downloaded here: http://bit.ly/Je5FHP

New features in this update are:

  1. Cell Spans - Cells can span x number of columns and y number of rows.  In practice, this works very similar to Excel's Merge and Center, though by default we do not alter the alignment when cells span multiple columns.
  2. Formula Support - Cells now evaluate Excel-style formulas when rendering the display text. Much like in Excel, cells that begin with an '=' are assumed to be formulas and will attempt to be evaluated. 
  3. Extensible Function Framework - Custom formula functions can easily be supplied to the grid allowing the grid fomula framework to fit exactly with your needs.  All functions are self documenting and can be queried at runtime to provide hints to your users about available features.  Provided in beta 6 is a nice collection of Excel comparable functions as follows: 
      • Logical Functions - AND, OR, NOT, IF, TRUE, FALSE
      • Math Functions - ABS, ACOS, ACOSH, ASIN, ASINH, ATAN, ATAN2, ATANH, CEILING, COMBIN, COS, COSH, DEGREES, EVEN, EXP, FACT, FLOOR, GCD, INT, LCM, LN, LOG, LOG10, PI, MOD, ODD, POWER, PRODUCT, QUOTIENT, RADIANS, RAND, RANDBETWEEN, ROUND, SIGN, SIN, SINH, ROUND, ROUNDDOWN, ROUNDUP, SQRT, SQRTPI, SUM, SUMSQ, TAN, TANH, TRUNC
      • String Functions - ASC, CONCATINATE, LOWER, UPPER, TRIM, CHAR, CLEAN, CODE, DOLLAR, EXACT, FIND, LEFT, LEFTB, LEN, LENB, MID, MIDB, PROPER, REPLACE, REPT, RIGHT, RIGHTB, SEARCH, SUBSTITUTE, T, TEXT, VALUE
      • Date Functions - DATE, DATEVALUE, DAY, EDATE, EODAY, HOUR, MINUTE, MONTH, NOW, SECOND, TIME, TIMEVALUE, TODAY, WEEKDAY, WEEKNUM, YEAR, YEARFRAC
      • Engineering Functions - BIN2DEC, BIN2OCT, BIN2HEX, DEC2BIN, DEC2HEX, DEC2OCT, HEX2BIN, HEX2DEC, HEX2OCT, OCT2BIN, OCT2DEC, OCT2HEX
      • Information Functions - ISBLANK, ISERR, ISERROR, ISNA, ISLOGICAL, ISNUMBER, ISTEXT, ISNONTEXT, ISREF, ISEVEN, ISODD, ISN, TYPE, COLUMN, ROW, HYPERLINK
  4. Find and Replace - The grid has a Finder interface which can be used to perform search and replace on cell contents and formulas. Supports features like Scan Columns vs Rows, Ignore case and match entire cell.
  5. Printing - There is now technically print support built into the grid, but we have been unable to test it.  Firemonkey's printer selection errors out on each of our test machines and does not allow us to get far enough to test.  Let us know if it works for you.
  6. Paste from Dataset - Paste data from a dataset at any location in the grid. Optionally overwrite existing data or move existing data either down or right.  (Live Bindings did not make this release)
  7. Named Ranges - It is now possible to name a range of cells for reference.  The range can be used in formulas, selections or for printing.
  8. Multiple Bug Fixes, Refactorings and speed improvements.

In addition, the new demo has been updated to show off all of the new features and includes two custom functions (SMILE and FIBONACCI) to show how easy it is to add your own functions.  It also shows an example of how to use the grid as a name/value pair editor in the new data connection screen.

We still have work to do before getting Apesuite to RC, but we getting close to having the full range of new components for our initial production release.  As such, we will spend the next few betas working on rounding out missing features and implementing enhancement requests for our existing components. 

As a side note, for those of you looking for C++Builder support...  while this release does install and compile on C++Builder, we're seeing some general instability when pulling together some of the C++ demos.  If you are adventurous and want to help us debug through some of those issues, now would be a good time to get involved.  We are going to make it a point to fix C++ problems before the Beta 7 and have cleaned up completely for the RC.

We are really proud of the work we've done in Apesuite.  Buidling complex components on an immature framework can be quite the chore and Firemonkey, while beautiful and fun at times can often be completely infuriating.  Even so, we've learned to appreciate the real power of the framwork and are excited about what the Firemonkey future holds for the Apesuite products and Sivv in general.

This really is a great time to code in Delphi.

Friday
May112012

Apesuite Beta 6 - Preview Demo

We are working hard on finalizing Beta 6 of the Apesuite package for Firemonkey.  
 
As part of this process we'd like to get some early feedback on a few of our new components coming out in Beta 6.  The following is a link to a demo download that includes binaries for Windows and OS X.  We would appreciate it if you could download it and start playing around with it.
Featured in the demo are the following new components:
  • TSmartGrid - A very versatile and flexible spreadsheet style grid component that aims for inline editing, advanced styling with fills and borders, excel-style navigation and selection, low memory footprint (theoretically), importing and exporting of multiple formats and fast (well as fast as Firemonkey will allow, which is still pretty slow at the moment).
  • TFontComboBox - A cross platform combo box that lists the fonts available on the system.
  • TFontToolbox - A toolbox for our TPageBar component that makes it easy to set all font settings.
  • TFillEditor - A panel that provides an editor for a Firemonkey TBrush (Fill, Stroke properties).
The feedback we are most interested in has to do with the SmartGrid navigation, selection, formatting and editing. 
  1. Are there any keybindings that seem to be missing?
  2. Is there any action that doesn't feel natural or consistent with other sheet type editors (mac or windows)?
  3. Is there some specific performance bottleneck you are running into?
  4. Is there a specific feature that you would like to see implemented in this component?
If you could provide feedback to us quickly, that would be great.  We're trying to finalize our feature set to iron out as many quirks as possible before beta 6 release. As I said in our recent blog post, we're aiming for beta 6 release this month and would like it to be sooner rather than later. Your help will be crucial to making that happen.
 
Non-customers can provide feedback in the comments of this blog post and customers can use the official support channels.
 
Thanks in advance for taking a look.