What's New in REAL Studio 2010 R4?

From Xojo Documentation

Here's a list of what's new:

  • Add Handler/Remove Handler - With these you can delegate responsibility for handling an event to another method.
  • OpenDialog Class - The OpenDialog class now provides an option to allow the user to open multiple files.
  • ListBox.ColumnTag - Like RowTag and CellTag, Listbox now has ColumnTag as well for associating hidden data with a particular column.
  • ListBox.AddRow - Listbox.AddRow now allows you to pass multiple parameters. Each parameter passed will be placed in the corresponding column.
  • JPEG Support for Console Apps - Console apps now support JPEG files.
  • Improved New Project Dialog - This dialog now appears when you launch Real Studio rather than Real Studio automatically creating a new project. From this dialog you can choose a template, choose a recently opened project or open another project.
  • Anti-Aliasing in Console Apps - Console graphics now support anti-alasiing.
  • Anti-Aliasing Option - You can now turn anti-aliasing on or off at runtime.
  • Database Parameter Binding - The Database class now provides a Prepare method that allows you the database engine to parse the SQL statement ahead of time. This provides two benefits. First, it makes using the same SQL query again and again faster because parsing is only done once. Second, it allows the backend database engine and opportunity to check the values you are using to make sure there is no SQL in the values themselves. This helps to reduce the chances of a SQL injection attack where a user enters a SQL statement into a field that you then include in your SQL Select.
  • SegmentedControl - This new control is like a group of buttons. You can make it so the user can press any button, have only one pressed at a time, or select as many at a time as they wish.

Important Changes

  • This release continues to support building applications for PowerPC but the IDE itself will no longer run on PowerPC.
  • Console apps no longer require QuickTime.
  • The StaticText control has been renamed "Label" to be more consistent with other development tools.
  • RBScript optimization is now done in the background so that it doesn't hang up the app while it's optimizing code.

We added 28 new features and have fixed 73 bugs:

Fixed
12 FolderItem.Child now raises an exception on Mac OS if the path contains invalid characters.
2241 Windows: HTMLViewer no longer disappears when HTMLViewer.Refresh is called (2010r4b1)
3526 The Cocoa MessageDialog now has proper keyboard shortcuts when used as a save dialog (matching other Cocoa applications).
8830 Checkboxes in Cocoa now support the indeterminate state. They also respect their initial values.
9639 MySQL Community Plugin: no longer depend on Intel libraries on Linux (i.e. fixes the undefined symbol _intel_fast_memcpy error)
10498 Linux: Multiline StaticTexts now centers and right justifies properly
10551 Checkboxes in Cocoa now respect their initial state. (2010r4a1)
10643 Cocoa: PagePanels no longer have a significant delay when switching items. (2010r4a1)
11431 StdIn.ReadLine/Read no longer block threads (2010r4b1).
11464 The debugger now stops more reliably under Cocoa. (2010r4a1)
11483 Controls in other controls no longer jump around wildly when parented in other controls.
11677 Cocoa: When a window with a PagePanel first opens, it no longer briefly displays the contents of every pane. (2010r4a1)
11733 Focus rings now appear in Canvases if the AcceptFocus and UseFocusRing properties are true in Cocoa (matches the Carbon behavior).
11771 MouseDrag event no longer fires continuously if the mouse is not moved.
11914 Simply switching tabs in a project does not mark it dirty
12044 Application Icon editor calculates correct data channel when accepting an image with translucency.
12060 Controls in the report editor now create properly when selecting them in the control list and dragging the bounds out on the report layout.
12156 The MessageDialog in Cocoa no longer has accessibility issues when presented as a sheet. Note: This was originally entered as a new feature but was changed to a bug so this release note may appear twice.
12157 Under Cocoa, the Window.Activate event now fires after the Window.Open event.
12269 Listbox: setting Listbox.CellCheck in code now fires the CellAction event.
12360 The Cocoa framework now strips Windows/Linux keyboard accelerators from StaticTextControls.
12634 Fixed a bug in SMTPSecureSocket which would not reset the state after finishing sending mail. An SMTP server will usually forcefully disconnect the socket, causing the state to be reset on the next connection. Some servers will sometimes not forcefully disconnect the client. SMTPSecureSocket will now disconnect when asked by the server, allowing future calls to SendMail to function properly.
12640 Setting a TabPanel's Value property now works in Cocoa.
12672 IDE: hidden items are no longer revealed in Autocomplete list
12758 Commands being dispatched with the build window as front most were not being handled properly which explains why this bug only manifested itself in builds and not runs. It has been fixed
12764 The "special/any" filetype works in Cocoa open dialogs.
12765 Bevel button subclasses can be added to window layouts again. This broke in a prior release (2010r4b2)
12803 The Cocoa framework now strips Windows/Linux keyboard accelerators from GroupBox, TabPanel, CheckBox, PushButton, and PopupMenu controls (2010r4b1).
12805 Local help db is versioned so each release, including separate beta releases, will check and update the db if necessary (2010r4b1).
12876 The table presented in Chapter 7 is no longer incorrectly formed. This was a general bug in the rendering code that mishandled the closing wiki table tag (2010r4b1).
12890 Default PushButtons that are placed on Canvases or ContainerControls no longer cause the application to deadlock under Cocoa (2010r4b1).
12969 The compiler no longer crashes if you specify that your class implements another class (instead of an interface) Instead, it gracefully errors (2010r4b1).
12980 Cocoa open and save dialogs now use extensions instead of HFS type codes.
12992 OpenGLSurface: the Render event is now called when the OpenGLSurface needs repainting on Windows (this change in behavior makes it consistent now with how it currently works on Mac/Linux)
12996 The Action event for DisclosureTriangles now fires in the Cocoa framework.
13021 A class that is defined outside a module and used as a moudle property properly autocompletes again (2010r4b1)
13038 You can once again get the Text property of a TextField in Cocoa.
13049 In the IDE when you uncheck the submenu item in the menu editor the sub menu items are actually removed. This did no happen previously. When you would run the sub menu would appear resulting in a surprising behavior.
13058 Lines now draw at the correct width in the Cocoa framework.
13059 Cocoa applications no longer crash if you add have a RectControl on the window.
13063 Masking now behaves the same in Cocoa as it did in Carbon.
13066 The Up and Down events of UpDownArrows now fire on the Cocoa framework. (2010r4a1)
13082 QuickTime MoviePlayer: no longer consumes more CPU usage than needed on Windows (probably cuts CPU usage by half)
13090 Windows: KeyDown event is now fired for read-only TextFields/TextAreas
13102 Sheets now get keyboard focus in the Cocoa framework, even if the maximize button is disabled.
13110 Windows: MouseWheel events no longer to to the wrong control (on Windows the MouseWheel events always go to the control that has the focus)
13114 Changing the size of a Window in the Cocoa framework no longer causes it to animate. (2010r4a1)
13127 RGBSurface: no longer has a public constructor since you cannot create a valid one anyway, and doing so leads to crashes
13136 Picture.Save now works with FolderItems with names longer than 28 characters. Note that this does not apply to PICTs, which still use FSSpecs.
13149 User MouseMove events now fire for plugin controls placed on windows, even if the plugin doesn't implement the MouseMove event internally.
13161 Console: creating an invalid sized picture no longer throws an assertion but an exception instead like we do in GUI apps
13163 A bug in the method editor that would occur if you used autocomplete to impelement an inherited method has been fixed.

The inherited method would, if it had parameters, leave the parameters inthe method name position which resulted in a compilation error.

13202 Picture.Open on a Nil FolderItem no longer crashes but throws a NilObjectException instead
13206 Properties once again show up in the expected order
13322 Mac Mach-O is now clearly labelled as Mac Carbon Mach-O in the constant editors
13323 The SpotlightQuery class now works under Cocoa, instead of throwing a SpotlightException.
13324 The AddressBook classes now work under Cocoa.
13328 CocoaListboxes now support indeterminate checkboxes.
13329 PopupMenu.RowTag no longer leaks on the Mac (2010r4b1)
13352 Properties list should no longer sometimes be hidden when opening projects. This was particularly prevalent in the project list view
13409 Cocoa: GetOpenFolderItem no longer returns an invalid FolderItem.
13419 Layout of events, methods, properties are in alphabetical order in columns instead of across rows
13460 Windows: Timer no longer leaks memory
13474 Local reference update on major and minor releases as it should
13480 Fixed an assertion at runctl.cpp:2343.
13523 Several RBScript memory leaks have been fixed.
13557 Saving works as expected - web apps are still subject to demo mode restrictions for some editions
13560 RbScripts no longer crash the second time they are run if they contain classes (2010r4b3)
13593 REALSQLDatabase: SQLSelect with no results now returns a Nil RecordSet
13621 ContainerControls no longer crash under Cocoa (2010r4b3)
13717 Documentation for record set record count has been updated (2010r4b1)
13763 Windows: StaticText no longer leaks (2010r4b1)
13767 Cocoa: ListBoxes no longer crash trying to draw checkbox cells
13782 REALSQLDatabase: no longer raises an UnsupportedFormatException when retrieving dates/times that are NULL
13806 Segmented controls now show the mac style and selection type properties as expect and honor the settings at run time
13810 Console Graphics: Picture.GetData can now export JPEG data (2010r4b2)
13847 Cocoa: the framework no longer crashes if you attempt to draw a string with an invalid font (2010r4b2)
13854 UPdating data in the database editor no longer generates "Not an Error" messages when used with the REAL SQL database (2010r4b2)
13884 Hard crash on Mac OS X by dragging a few controls and set the build target to Cocoa fixed (2010r4b2)
13885 Cocoa: controls get MouseUp events again, which was broken in a previous beta.
13913 Resize handles for the segmented control are placed properly around the border of the control in the form editor not inset as they had been.
13961 Searches in the online documentation now include the user guide and real sql documentation namespaces by default
14058 Toolbar: removing an item from the Toolbar no longer crashes on Windows
New
2672 OpenDialog class now allows for multiple file selections.

Added a MultiSelect As Boolean property on the OpenDialog class which is OFF (False) by default. ShowModal still returns a FolderItem, but in the case of a MultiSelect OpenDialog the FolderItem returned will be the first selection. To obtain a list of all the FolderItems selected we've added an Item(zeroBasedIndex As Integer) As FolderItem property along with a Count As Integer property.

9765 A segmented control class has been added to the desktop framework. It is supported for all targets, but not all features are supported on other platforms:

- on Carbon, only an icon or text can be specified, not both - MacControlStyle is only supported on Cocoa

Class SegmentedControl
dim selectionType as integer
dim macControlStyle as integer
dim items() as SegmentedControlSegment

Event Sub Action(itemIndex as integer)
Sub SizeToFit()
End Class

Class SegmentedControlSegment
dim selected as boolean
dim enabled as boolean
dim title as string
dim helpTag as string
dim icon as picture
dim width as integer
End Class
11388 Listbox: added ColumnTag( column As Integer) As Variant property
12211 The search field on the language reference will search the online wiki
12731 RBScript optimization is now done on a background thread, so that REALbasic threads will continue to be responsive.
12760 Dialogs have been updated to indicate that the minimum versions is now Windows XP and higher
12877 Make External has an ellipsis as it should
12961 Console apps on the Mac no longer require QuickTime (i.e. we no longer link against the QuickTime framework)
13069 ObjCExceptions now populate the message property based off of the NSException's reason (if it's an NSException).
13148 Listbox: Addrow now takes additional parameters, these are used to populate the cells for that row
13169 Added WebImageView.ProtectImage property. When true, the user will be unable to drag the image. This is a design-time only property.
13193 Graphics: Added an AntiAlias As Boolean property used to draw smooth lines and shapes, including text where applicable. This property is true by default and works for Mac (Carbon and Cocoa), Windows (GDI+ must be enabled) and Console graphics. It has no effect on Linux currently (2010r4b2)
13201 The segmented control has been implemented and can be used in Carbon, Cocoa, Windows and Linux.
13232 Console apps: now supports loading/saving JPEGs
13269 "Build for current platform" builds for Mac OS Intel since the IDE is no longer available as UB or PPC
13296 A new function (REALCopyPictureCGImage) has been added to the plugins SDK to get the CGImageRef of a picture. Note that this function only works under the Cocoa target.
13300 Web projects obey intended restrictions based on edition of REAL Studio in use
13311 Database items now show the external badge
13339 A new template has been created for the wiki called "Ctor" ( or constructor in many OO abbreviations)

The template had to be called something not already in use. It may require additional tweaking as Dave works with it.

13372 The subscript operator can now be overloaded by classes. To use it, implement Operator_Subscript in your class.

The ReDim statement can now be overloaded by a class. To use it, implement Operator_Redim in your class.

For example:

Class OneBasedArray
Sub Constructor(bounds as integer = 0)
redim mArray( bounds - 1 )
End Sub

Function Count() As integer
return mArray.ubound + 1
End Function

Sub Operator_Redim(newSize as integer)
redim mArray( newSize - 1 )
End Sub

Function Operator_Subscript(index as integer) As variant
return mArray( index - 1 )
End Function

Sub Operator_Subscript(index as integer, assigns v as variant)
mArray( index - 1 ) = v
End Sub

Private mArray() As Variant
End Class
13402 The AddHandler and RemoveHandler statements have been added to the language. These allow you to add event handlers to objects at runtime.

Note that you can only have one handler attached to an event at one time. Attempting to add more than one handler will result in a RuntimeException.

13434 Added Label class to replace StaticText class (which is now deprecated)
13740 The new project dialog now has open recent and open existing buttons along with a revamped look (2010r4b2)
13776 The project list now has "show on disk" in the contextual menu when a REAL SQL database is selected (2010r4b2)
13785 Added Close method to WebControl to allow disposal of dynamically created controls.
13827 The New Project dialog responds to cmd-O (2010r4b2)

Has updated buttons as well

13934 Added WebObject.Page property. Controls can use this to determine which page a control is on.
13958 The "Loading" progress dialog no longer tries to show the full path to the project being loaded as this path could easily exceed the dialogs width and not show anything useful. It now shows just the name of the project being loaded
Changed
14071 Issues with pre-rendered database pages have been corrected in this release of the database