Archive for December, 2012

CodeRage 7 C++ Replays

Friday, December 21st, 2012

Almost all CodeRage 7 C++ replays are available on the CodeRage 7 C++ web site.

We’re working on the remaining ones. ;)

Enjoy!

MVP Nuggets #3

Monday, December 17th, 2012

Alan Fletcher did a write-up on "Cross-platform development the FireMonkey way"

Zarko Gajic wrote several articles, including:
"Have a Delphi Function Return Multiple Results / Values"
"Intercepting Keyboard Input with Delphi - Implementing a Keyboard Hook"

Juan Antonio Castillo wrote an article on "7-zip and Delphi" - Spanish - English (Google)

Vladislav Bajenov wrote an article "Working with IMAP in Synapse" - Russian - English (Google)

Brian Long compiled a list of resources and links from the Developer Direct webinars

He also summarized a lot of "Embarcadero’s C++ stories"

Enjoy!

Submitting a C++Builder XE3 application to the Mac AppStore

Tuesday, December 11th, 2012

Yesterday, I filled a hole in the schedule with an impromptu session on visualization of mathematical functions. At the end I also showed how to submit the application to the Mac AppStore.

At the end I ran into an error saying "Invalid Binary" and I filled in the details for my contact information that it asked me for.

However, this didn’t solve the entire problem.

You also need to turn off Dynamic RTL and Run Time Packages. Unless you code sign them manually on the Mac side.

Finally, in order to bypass an issue with the Incremental Linker for Mac, you will need to turn off the Incremental Linker.

Doing these three things in addition gave me a successful submission to the AppStore.

:)

C++Builder R&D sessions at CodeRage 7 tomorrow

Tuesday, December 11th, 2012

Don’t miss these R&D sessions tomorrow (Wednesday) at CodeRage 7:

9am PST - Migrating C++Builder Code to 64-bit

This session will cover differences between the Embacadero Win32 and Win64 C++ compilers, comparing keywords, macros, extensions and standards conformance of bcc32 and bcc64. The focus will be on strategies to port existing C++ Projects (ActiveX, WebBroker, SOAP, etc) and writing new code in a way that works for both Platforms.

Bruneau Babet - Embarcadero

12pm PST - C++Builder 64-bit Windows Compiler: Supporting the Delphi Extensions Including RTTI

The C++ language standard provides a naming convention to identify language extensions using the double underbar (__) in front of any extensions. This session will discuss the language and runtime extensions added to the new C++Builder 64-bit Windows compiler to support Delphi language, types, components and enhanced RTTI.

Eli Boling - Embarcadero

1pm PST - Using the C++ Standard and Boost Libraries in your 32-bit & 64-bit Applications
The C++ Standard library is a set of classes and functions that are part of the ISO standard for C++. The Boost C++ libraries include a collection of portable C++ source libraries created by Boost community members (http://www.boost.org), some of which are now included as part of the C++ Standard library. In this session you will learn how you can use the C++ Standard and Boost libraries in your C++ applications for Windows and Mac OS X.

Lee Cantey - Embarcadero

Enjoy!

C++Builder XE3 64-bit and Update 1 for Delphi, C++Builder and RAD Studio XE3 released!

Tuesday, December 11th, 2012

Yesterday we released the 64-bit compiler for C++Builder XE3.

At the same time, we also released Update 1 for Delphi, C++Builder and RAD Studio XE3. More details in Tim’s post here.

Specific links: Delphi XE3 Update 1 C++Builder XE3 Update 1 RAD Studio XE3 Update 1

Fix List for Update 1

Enjoy!

MVP Nuggets #2

Friday, December 7th, 2012

Primoz Gabrijelcic led a workshop on Visual LiveBindings last week

Danny Wind wrotes an article "Why I Like FireMonkey"

Salvador Jover wrote a recap of the XE3 Tour that Danysoft hosted - Spanish - English (Google Translate)

I’d like to celebrate Salvador Jover in particular - he re-blogs and re-tweets just about anything that is Delphi related in the blogosphere! Thank you so much Salvador!

Zarko Gajic wrote about "Understanding Owner Drawing in Delphi"

He also wrote about "Understanding and Processing Keyboard events in Delphi"

He also wrote about "Understanding and Using Windows Callback Functions in Delphi"

Enjoy!

Components vs Children in FireMonkey

Wednesday, December 5th, 2012

You have probably iterated through the Components array many many times as a Delphi developer.

Consider this simple application:

It’s probably no surprise that listing the Components of the form like this…

procedure TForm2.Button1Click(Sender: TObject);
var
  i: Integer;
begin
  Memo2.Lines.Clear;
  for i := 0 to ComponentCount-1 do
    Memo1.Lines.Add(Components[i].ClassName+' (Name = "'+Components[i].Name+'")')
end;

…gives you the following output, which is very similar to the Structure View in the IDE, except that it doesn’t show the relationships between the components.

Listing the children, and the children of all children (recursively) is simply done by using this procedure:

procedure TForm2.ListChildren(Obj : TFMXObject; Level : Integer);
var
  i: Integer;
begin
  for i := 0 to Obj.ChildrenCount-1 do begin
    Memo2.Lines.Add(StringOfChar(' ',2*Level)+
                    Obj.Children[i].ClassName+
                    ' (Name = "'+
                    Obj.Children[i].Name+
                    '")');
    ListChildren(Obj.Children[i],Level+1);
  end;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
  Memo2.Lines.Clear;
  ListChildren(Self,0);
end;

The above code will give us a tree output with indentation to show us the children, grandchildren, etc, like this:

The list of children is much longer than you would possibly except at first. We see for instance that in FireMonkey a TButton consists of a TLayout, a TSubImage and a TText. The TSubImage and the TText in turn have 4 animations each to handle hover-in/hover-out and pressing/releasing. Likewise the TMemo holds scrollbars, a popup context menu, and much more.

The entire output from ListChildren follows below:

TSubImage (Name = "")
TButton (Name = "Button1")
  TLayout (Name = "")
    TSubImage (Name = "")
      TRectAnimation (Name = "")
      TRectAnimation (Name = "")
      TRectAnimation (Name = "")
      TRectAnimation (Name = "")
    TText (Name = "")
      TColorAnimation (Name = "")
      TColorAnimation (Name = "")
      TColorAnimation (Name = "")
      TColorAnimation (Name = "")
TMemo (Name = "Memo1")
  TLayout (Name = "")
    TSubImage (Name = "")
      TRectAnimation (Name = "")
      TLayout (Name = "")
      TSmallScrollBar (Name = "")
      TSmallScrollBar (Name = "")
      TScrollBar (Name = "")
      TScrollBar (Name = "")
    TBrushObject (Name = "")
    TBrushObject (Name = "")
    TFontObject (Name = "")
  TScrollContent (Name = "")
    TPopupMenu (Name = "")
      TPopupMenuContent (Name = "")
        TMenuItem (Name = "")
          TMenuItemContent (Name = "")
        TMenuItem (Name = "")
          TMenuItemContent (Name = "")
        TMenuItem (Name = "")
          TMenuItemContent (Name = "")
        TMenuItem (Name = "")
          TMenuItemContent (Name = "")
        TMenuItem (Name = "")
          TMenuItemContent (Name = "")
        TMenuItem (Name = "")
          TMenuItemContent (Name = "")
TEdit (Name = "Edit2")
  TLayout (Name = "")
    TSubImage (Name = "")
      TRectAnimation (Name = "")
    TLayout (Name = "")
    TLayout (Name = "")
    TBrushObject (Name = "")
    TBrushObject (Name = "")
    TFontObject (Name = "")
  TPopupMenu (Name = "")
    TPopupMenuContent (Name = "")
      TMenuItem (Name = "")
        TMenuItemContent (Name = "")
      TMenuItem (Name = "")
        TMenuItemContent (Name = "")
      TMenuItem (Name = "")
        TMenuItemContent (Name = "")
      TMenuItem (Name = "")
        TMenuItemContent (Name = "")
      TMenuItem (Name = "")
        TMenuItemContent (Name = "")
      TMenuItem (Name = "")
        TMenuItemContent (Name = "")
  TContentEdit (Name = "")
    TClearEditButton (Name = "ClearEditButton1")
      TLayout (Name = "")
        TSubImage (Name = "")
          TRectAnimation (Name = "")
          TRectAnimation (Name = "")
          TRectAnimation (Name = "")
          TSubImage (Name = "")
            TRectAnimation (Name = "")
            TRectAnimation (Name = "")
            TRectAnimation (Name = "")
TButton (Name = "Button2")
  TLayout (Name = "")
    TSubImage (Name = "")
      TRectAnimation (Name = "")
      TRectAnimation (Name = "")
      TRectAnimation (Name = "")
      TRectAnimation (Name = "")
    TText (Name = "")
      TColorAnimation (Name = "")
      TColorAnimation (Name = "")
      TColorAnimation (Name = "")
      TColorAnimation (Name = "")
TViewport3D (Name = "Viewport3D1")
  TDummy (Name = "")
    TDummy (Name = "")
      TCamera (Name = "")
  TSphere (Name = "Sphere1")
  TCube (Name = "Cube1")
TTextureMaterialSource (Name = "TextureMaterialSource1")

Enjoy!


Bad Behavior has blocked 512 access attempts in the last 7 days.

Close