Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>His tests include VCL, FireMonkey, Win32, Win64, Android, iOS, OSX and third party library.
The whole series is based in 12 blog posts as you can se below.
Again, congratulations Thomas for the fantastic job and time invested on that. I think everyone on the Delphi community will appreciate.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>CopyReaderToClientDataSet is part of the Data.DBXDBReaders.TDBXDataSetReader class until Delphi/C++Builder XE2, however in XE3 it changed a little bit, it became part of a new class called Data.DBXCDSReaders.TDBXClientDataSetReader.
I got several e-mails from my blog readers that downloaded some of my examples, when compiling with latest versions they got a error message saying the CopyReaderToClientDataSet method can’t be found.
The solution is simple, add Data.DBXCDSReaders.pas as part of the uses clause and replace all the TDBXDataSetReader by TDBXClientDataSetReader, which is the new home for CopyReaderToClientDataSet.
Enjoy!!!
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>The Update is available for registered users and you can find on the following links. Just a friendly remind that you need to Uninstall your current Delphi XE5 in order to install XE5 Update 2.
Below the complete list of bugs fixed on this Update.
|
Reference No |
Summary |
Component/s |
| [Indy] Access Virolation occues on OnValidatePeerCertificate for IPPeerCommon bug[HTTPS,SSL] | 3rd Party | |
|
120473 |
[iOS] SOAP fails in iOS when using SSL (“IOHandler value is not valid.”) | Blocker |
|
119873 |
TCameraComponent causes memory leak in Win32 | Blocker |
|
115697 |
TDump command crashes on DLL’s | Command Line Tools |
|
112826 |
TDump.exe shows strange output | Command Line Tools |
|
100328 |
TDump crashes on the x64 shell32.dll | Command Line Tools |
|
110887 |
TDump fails on some ‘foreign’ .dlls | Command Line Tools |
| Delphi XE5 cannot build OSX applications from the command line | Compiler | |
| [FM Mac OSX 10.9] Compile error XMLDocument using SDK 10.9 | Compiler, Compiler\C++ | |
|
120686 |
[Mavericks 10.9] C++Builder XE4 does not support OS X 10.9 | Compiler, Compiler\C++, Compiler\C++\BCC |
| Throwing a exception in virtual member function returning an AnsiString causes an AV and an abend under certain circumstances, in 32-bit C++ application | Compiler, Compiler\C++, Compiler\C++\BCC, Compiler\C++\BCC\Back End | |
|
120476 |
[iOS ARM][Android] E2581 Backend error: invalid linkage type for global declaration | Compiler, Compiler\Delphi |
| [dcc(ios/a)arm] Backend Error compiling constructor for generic classes | Compiler, Compiler\Delphi | |
|
118897 |
method overload resolution fails when passing @ parameter to overloaded methods mixing Pointer and specific pointer parameters. | Compiler, Compiler\Delphi |
| ShowMessage/Message Alerts not working in iOS 7 Simulator | Compiler, Compiler\Delphi | |
| [dccaarm][dcciosarm] Implicit finally block doesn’t execute if the exception is not catch in except block. | Compiler, Compiler\Delphi | |
| Crash by declaration error when declaring class function in record type | Compiler, Compiler\Delphi | |
| Internal Error URW1154 calling TValue.From() of System.Rtti | Compiler, Compiler\Delphi | |
|
72147 |
Invalid section table entries on empty sections | Compiler, Compiler\Delphi |
|
119197 |
subtraction of sets changes its params | Compiler, Compiler\Delphi, Compiler\Delphi\CodeGen |
| Integer computation error upon mixing Byte and Integer | Compiler, Compiler\Delphi, Compiler\Delphi\CodeGen | |
| When Currency is used in a generic record type you get an internal compiler error G1239 IN Zephyr and G1232 in XE4 | Compiler, Compiler\Delphi, Compiler\Delphi\Generics | |
|
118815 |
Generic method inlining (part 2) | Compiler, Compiler\Delphi, Compiler\Delphi\Generics |
|
118866 |
Cannot perform FillChar on Currency variables – E2197 Constant object cannot be passed as var parameter | Compiler, Compiler\Delphi, Compiler\Delphi\Messages |
|
93738 |
Internal Error URW1136 | Compiler, Compiler\Delphi, Compiler\Delphi\Messages |
|
118929 |
Totally broken package compiler for an iOS device | Compiler, Compiler\Delphi, Compiler\Delphi\Packages/Libs |
|
118523 |
[dcc32] Command-line build fails for user account with non-ASCII characters | Compiler, Compiler\Delphi, IDE\Build System |
| DataSnap : Memory leaks caused by TFDJSONDataSetsBase.FOwnsDataSet | Data, Data\DataSnap | |
| DataSnap: HTTP request may be broken when sending Delta | Data, Data\DataSnap | |
| [C++][DataSnap]Exception raised when trying to execute server method through proxy on OS X 10.9 | Data, Data\DataSnap | |
|
116417 |
[ISAPI] DataSnap Server as an ISAPI DLL get a 48KB limitation when receiving POST data | Data, Data\DataSnap |
| [OS X][DataSnap][FireDAC] Unable to find static library: DataSnapFireDAC.a | Data, Data\DataSnap, Data\FireDAC | |
| [DataSnap] TX509CertificateIndy.Verify is not operation as specification. | Data, Data\DBX | |
| Unable to load libsqlib.dylib | Data, Data\DBX | |
| DBX memory leak when running queries on NEXTGEN platforms | Data, Data\DBX | |
| FireDAC FDConnection does not autocommit | Data, Data\FireDAC | |
| FDExplorer resizing causes lost display of description column message | Data, Data\FireDAC | |
| Building a Mobile Application that contains a TFDPhysIBDriverLink component raises an error | Data, Data\FireDAC | |
| [SQLite] It can’t encipher by the specified encrypt parameter, so it can’t setup except aes-256 | Data, Data\FireDAC | |
| If XML containing MBCS is saved by SaveToStream, It is not copied correctly.. | Data, Data\FireDAC | |
| If XML containing MBCS is copied to TFDMemtable, Exception class EDOMParseError occurs | Data, Data\FireDAC | |
| FireDAC memory leak when running queries on NEXTGEN platforms | Data, Data\FireDAC | |
|
119995 |
“Not editing” error reported with LiveBindings when calling ApplyUpdates on TAdapterBindSource | Data, Data\LiveBindings |
|
118633 |
[iOS device/Android] With TSoapConnection, TClientDataset.ApplyUpdates raises “Exception in safecall method” in iOS device and Android | Data, Data\Midas |
|
118633 |
[iOS device/Android] gdb reports wrong file after step into | Debugger |
| Debugging not working with a FireMonkey Mobile app on Nexus 7 2013 | Debugger | |
| [Delphi] Access Violation when Inspecting or Adding a Watch with a function where an array is passed in as a var or const | Debugger | |
| Function call evaluation on C++ OSX apps is broken when using Mavericks | Debugger, Debugger\Evaluator | |
|
120506 |
[OSX 10.9] Mavericks Modules Debug Window doesn’t show framework dylibs anymore | Debugger, Debugger\Views |
|
119777 |
ReqMulti.pas has been removed from the product | File Delivery, Internet |
| [FMX/Android] TEdit causes SIGSEG if SetFocus method is called inside Forms’s OnCreate event. | FireMonkey | |
| [iOS] Sharing popup size is calculated wrong | FireMonkey | |
|
120259 |
Bugs in creating forms with TForm.CreateNew() – i.e. without a designer. | FireMonkey |
| Orientation switch breaks app or bars user after device activated again (after sleep) | FireMonkey | |
|
119176 |
[iOS7 iPad Simulator] App crash in iOS 7 iPad Simulator | FireMonkey |
|
118770 |
Bad text rendering on Android | FireMonkey |
| Poor application performance on Nexus 10 | FireMonkey | |
| [iOS] TMemo – sometimes when using LongTap to bring up the context menu on iOS, the cursor and context menu is moved up with one line | FireMonkey | |
|
118554 |
[iOS Device] iOS App crashes on iOS 6.1.3 (iPad) when Showing Forms – but not on Simulator | FireMonkey |
| TabletMasterDetail app takes over 10 seconds to load on Nexus 10 | FireMonkey | |
|
120566 |
When adding a TBindNavigator, an Access Violation occurs | FireMonkey |
|
118799 |
2D Empty app does not start on Samsung Galaxy Tab 3 | FireMonkey, FireMonkey\3D Components |
|
120517 |
TMemo.ScrollLayout could cause access violation | FireMonkey, FireMonkey\Components |
|
120827 |
[iOS7] With TMemo, unintentional letter appears when entering with Japanese keyboard. | FireMonkey, FireMonkey\Components |
| Date Picker mobile code snippet TCalendarEdit – decrements the date when you don’t change the date in the picker | FireMonkey, FireMonkey\Components | |
| Using German ß (00DF; LATIN SMALL LETTER SHARP S) in TListBoxGroupHeader raises EArgumentOutOfRangeException | FireMonkey, FireMonkey\Components | |
| On HTC one X(4.1.1) cannot be typed a set of numbers if the keyboard has the vktPhonePad type | FireMonkey, FireMonkey\Components | |
|
120515 |
TMemo.GoToTextEnd crashes at program startup and doesn’t move the horizontal scrollbar | FireMonkey, FireMonkey\Components |
|
120517 |
TMemo.ScrollLayout could cause access violation | FireMonkey, FireMonkey\Components |
|
119442 |
Mobile Code Snippets – Web Browser needs to be updated. Web Browser Top Margin should be 0 | FireMonkey, FireMonkey\Components |
| Problem changing the KeyboardType among different TEdit | FireMonkey, FireMonkey\Components | |
|
120136 |
[Android 4.3] TListView component scrolling performance is very slow (Samsung GALAXY Note 3) | FireMonkey, FireMonkey\Components |
| Listview scrolling performance slow on Samsung Galaxy Note 3 | FireMonkey, FireMonkey\Components | |
| Custom TabIcon support missing for iOS 7 | FireMonkey, FireMonkey\Components | |
|
119442 |
[iOS7 device] Web Browser positioned incorrectly in iOS7 | FireMonkey, FireMonkey\Components |
|
120007 |
[Android, iOS] Viewport3D does not fully display on a mobile form with TabControl | FireMonkey, FireMonkey\Components |
|
118859 |
[iOS] TMedia Volume cannot be changed in iOS | FireMonkey, FireMonkey\Components |
| TWebBrowser misaligned when Align set to alClient | FireMonkey, FireMonkey\Components | |
|
119891 |
[Android] Edit.SetFocus in Form.OnShow() will cause app crash when entering text | FireMonkey, FireMonkey\Components |
| TabControl does not fit the screen completely widthwise when it has exactly 6 TabItems | FireMonkey, FireMonkey\Components | |
|
119821 |
[Android] Performance of Delphi Apps on Google Nexus 10(Android 4.3) | FireMonkey, FireMonkey\Components |
|
119539 |
[iOS] TMediaplayer pause (stop) on iOS is rewinding | FireMonkey, FireMonkey\Components |
|
119447 |
[Android] Location demo on some Android devices not working | FireMonkey, FireMonkey\Components |
| Korean input problem with Tmemo on OS X | FireMonkey, FireMonkey\Components | |
|
119192 |
[Android] Uppercase national characters are drawn bad on Android | FireMonkey, FireMonkey\Components |
|
119162 |
[Android] password is shown on virtual keyboard | FireMonkey, FireMonkey\Components |
| TMemo very slow on Nexus 10 | FireMonkey, FireMonkey\Components | |
|
119703 |
Stretched property of TText control does not work properly when TText is a child component for some other component, not a form | FireMonkey, FireMonkey\Components |
|
118859 |
[iOS] TMedia Volume cannot be changed in iOS | FireMonkey, FireMonkey\Components |
|
120023 |
[Android] TGestureManager crash on app close. | FireMonkey, FireMonkey\Runtime |
| Throwing an exception and not catching it during any FMX component in an event have unexpected result | FireMonkey, FireMonkey\Runtime | |
|
119450 |
[iOS7] vertical touch co-ordinate is several pixels lower than the actual touch position. | FireMonkey, FireMonkey\Runtime |
|
119444 |
[iOS7 device] Keyboard does not completely disappear when hidden in iOS7 | FireMonkey, FireMonkey\Runtime |
| [NEXUS 10] SpeedButton – it takes too long until OnClick event is triggered | FireMonkey, FireMonkey\Runtime | |
|
118910 |
Keyboard shift/ctrl+arrow keys not working for FireMonkey objects on a form | FireMonkey, IDE, IDE\FireMonkey Designer |
| iOS 7 apps showing iOS 6 styled native controls (pickers/keyboard) on iOS Simulator | FireMonkey, PAServer | |
| FM C++ app with Mac OS X 10.9 SDK fails to compile | IDE, IDE\Build System, IDE\Deployment, PAServer | |
|
120029 |
[Android] lower case of file path in deployedassets.txt | IDE, IDE\Deployment |
| When starting RAD Studio XE5 (with android support installed) as the C++Builder personality it REMOVES the android SDK setting in the registry. | IDE, IDE\General | |
|
118105 |
Android apps deployed to emulator will not function, display black screen | IDE, Install |
|
118830 |
Error detected (LME288), [ilink32 Error] Error: Unable to perform link | Linker |
|
116888 |
Strange linker crash | Linker |
| Throw exception crash C++ Win64 app | RTL, RTL\C++, RTL\C++\Exception Handling | |
| Wrong behavior when executing code from a catch section on Mac OS | RTL, RTL\C++, RTL\C++\Exception Handling | |
| ARC Using Unsafe objects in records are not working properly | RTL, RTL\Delphi | |
| FM application crash at init in Android devices when the language is set to Norwegian (Norsk Bokmål) | RTL, RTL\Delphi | |
|
118726 |
Application crash with raising exception class Segmentation fault (11) | RTL, RTL\Delphi, RTL\Delphi\Other |
| SOAP: Double precision return values not correct for Android | RTL, RTL\Delphi, SOAP | |
|
119872 |
SOAP AsDateTime implementation is wrong | SOAP |
|
119741 |
[Android] Segmentation fault consuming web service | SOAP |
|
76053 |
C++ templates are translated as “Vorlagen” | Translation |
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>This update touch some areas like FireDAC, FireMonkey, Debugger, IDE and mainly ClientDataSet. Below a list of fixes related to ClientDataSet, which I consider critical errors and a blocker for anyone that was looking to migrate to XE5.
| Quality Central Reference No. | Summary | Component/s |
| 118951 | Numeric Filters on a TClientDataSet do not filter | Data, Data\Midas |
| 119028 | Linker error: TXMLTransformProvider libraries missing | Data, Data\Midas |
| 119164 | Attempting to use MIDAS (eg TClientDataset) in the simulator on iOS7 fails | Data, Data\Midas |
| 119432 | TClientDataSet.Locate method fails to work properly with XE5 midas.dll | Data, Data\Midas |
| Application stops when driver is missing | Data, Data\FireDAC | |
| [Phys]-300 on connecting using Oracle / MSSQL / etc drivers using Arch SKU at design-time | Data, Data\FireDAC |
For a complete list of the specific problems fixed in this update, click here.
You can download the update 1 installer or a new fresh ISO that includes Update 1:
That’s is, have fun.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>On the mobile development arena I asked about their company plans for mobile development in 2013, and the results are interesting:
Android is the first choice, most of Delphi Developers do business application and I see a natural choice on Android, the number of devices out there and the lower price point when compared with iPhone/iOS leads Android more in to the business application development. When we look international market iOS devices would cost at least 60% more then Android devices, different reality from iOS, where we can pay US$200 on an iPhone.
When asked about desktop development I made three questions, which I believe it’s correlated, here the questions:
The results showed a clear demand for desktop development, where 73% of the interviewees plans to develop new desktop applications, however when you cross that with the architectural questions, 70% would use N-Tier architecture and only 24% would consider Client/Server.
[one_half first]
[/one_half]
[one_half]
[/one_half]
There is also a significant number of companies (45%) considering to migrate existing desktop applications to the web, 34% not planning and 21% didn’t decide yet. That information leads to us think about the challenges to migrate legacy applications where you can see all kinds of situation. Talking with developers I see most of the time the following scenarios:
Years ago the software development world moved away rom the traditional Client/Server in to the distributed development. There are so many technologies and architectures for distributed systems out there (SOA, REST, SOAP, WebServices, etc.), which are supported for many languages and IDE’s, but bring the question “Which software vendor has the best implementation and support for distributed applications?”.
Looking forward to see your comments and what’s your choice to build distributed applications?
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Also, the computer needs to be running Mac OS X 10.6.7 Snow Leopard or higher, with 8GB of free disk space for installation. Essentially, that’s the exact same computer and specification requirements as Mountain Lion required—so if you installed that, you can be confident that Mavericks will run on your machine. — Apple Insider
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Android Studio is FREE and can download the early preview version here. I just installed on my Mac, the IDE supports Windows and Linux as well. I played a little bit during the last 2 days and I’m very impressed.
Today’s Android development is supported in Eclipse through the ADT (Android Development Toolkit plugin), and every developer can take advantage of the Eclipse ecosystem. I have been using Eclipse for Android development, but certainly I see space for improvement and more specific features related to Android development.
Android Studio is built on top of IntelliJ’s community version and now with Google Engineer working on that, just imagine what they will be able to produce. I just played few hours with Android Studio, their source code editor ROCKS it goes beyond of features already applied in other IDEs, the Designer is awesome and gives you a view of your application not only for one device, but for many others include tablets. Also, you can easily import your projects from Eclipse in to Android Studio.
Watch the following video and you will have a pretty good idea about what I’m talking about.
That’s it for now.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>iOS development is the major topic of course and bring the second version of FireMonkey to iOS, a lot of expectation on this topic specially after XE2.
Also there is a bunch of new stuffs to talk about, like:
RAD Studio XE4 now includes only Delphi, C++Builder and HTML5Builder. Delphi Prism is no longer part of RAD Studio, the name is dead and from now you have to refer to Oxygene from RemObjects. You can check the official communication from RemObjects here, where Marc Hoffman provide more details about the future related to .NET development with Oxygene (old Prism) and their support to iOS and Android development.
Trial is already available here or if you prefer download the full Delphi and C++Builder ISO here.
The Delphi XE4 documentation has a extensive list of What’s new in Delphi and C++Builder XE4, below the table of content:
That’s it for now.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>I just heard that next week Embarcadero is going to announce Delphi XE4, which is part of RAD Studio XE4 and will include C++Builder XE4 and HTML5 Builder.
An important change initiated last year related to Prism (Delphi for .NET) will affect RAD Studio this year, I think you won’t see Prism included in RAD Studio, of course REM Objects continue to develop their compiler and integration with Visual Studio, so you will have order directly from them.
Delphi XE4 will bring Embarcadero’s new ARM compiler and will allow Delphi developers to compile FireMonkey apps to iOS devices at this point. The project around this new compiler started years ago, I had the opportunity to talk about this project with many Delphi developers, so the new compiler is really new and a beginning that will allow to move Delphi language much easier to other platforms, as you already heard Embarcadero is already promising Android support and it suppose to come soon.
The iOS support is going to be better them what you saw in XE2 and you are expecting something way better. A very important point is the focus on iOS, trying to make everything you use for Windows available on iOS is not the way to go, so in XE4 you will see what is specific for iOS when developing for iOS and this is good.
Of course Embarcadero will promote FireDAC as a new feature in XE4, even it came recently on XE3 still a good point to talk about this, since FireDAC is way better them dbExpress. I blogged about that recently and you can read here.
I believe you will see InterBase for iOS on this release, even you already have SQLite on iOS devices I see a lot of space for InterBase on iOS, especially for developers that need protect their data on mobile devices.
Embarcadero will release all the SKUs and upgrade paths. Early this year they mention about to release iOS support as add-on, maybe you will be able to buy just this piece, let’s wait and see.
There is a webinar scheduled for next Wednesday April 24th and it will show this new release.
I will be back in the following days and will share my comments about this release.
I just published an article covering What’s new in Delphi XE4 after the official launch, you can find that here.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>
– I was very impressive with the amount of features, AnyDAC is everything dbExpress tried to be and never reached.
The reason I say that it’s because AnyDAC really allows developers to target multiples database without the workarounds required by dbExpress, like: Field Mapping when you persist the TFields. For long time AnyDAC allowed developers that use Delphi/C++Builder Professional edition to connect their application to Enterprise databases like Oracle, SQL Server, Sybase, Informix and others, something that was only possible through Enterprise and Architect edition, and much more.
Beyond that, there is a lot of specific database features supported by AnyDAC, which I consider very helpful in any database development, here some examples per database:
This is a small list of interesting things on AnyDAC, you can find more here.
AnyDAC is a step forward and worth the effort to migrate from dbExpress to AnyDAC, there are lot of feature needed by Delphi and C++Builder developers, many of these features has been requested for a long time and you will have when using AnyDAC.
You may ask what is going to happen with dbExpress? BDE is dead, but still around :), dbExpress is not dead and I don’t think will die soon, but there is no reason to keep two database access technology since AnyDAC is way better than dbExpress.
AnyDAC trial is available for download here.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>If you have a previous version of XE3 installed, you must uninstall it. In case you installed Platform Assistant before, you also need to uninstall it.
Update 2 is available for download on the registered user page, visit the following links:
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Let’s assume you defined the following edit text:
We would use the following code to access the edit text using findViewById.
class Main extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
EditText firstname = null;
firstname = (EditText) findViewById(R.id.fistnameEditText);
firstname.setText( "My first name is Barack");
}
}
In order to use @InjectView we have to extend from RoboActivity class (download the RoboGuice from here), we just need to declare our class fields using @InjectView, set each field to the correspondent view object declared on our R.Java, the code will look like this.
class Main extends RoboActivity {
@InjectView (R.id.firstnameEditText) EditText firstname;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
firstname.setText( "My first name is Barack" );
}
}
In layouts where we have multiple objects, it will became more visible the benefits of replacing findViewById per @InjectView, check out the following code where I add some extra controls to my layout.
class Main extends RoboActivity {
@InjectView (R.id.firstnameEditText) EditText firstname;
@InjectView (R.id.lastnameEditText) EditText lastname;
@InjectView (R.id.photoImage) ImageView photo;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
firstname.setText( "My first name is Barack" );
lastname.setText( "My last name is Obama" );
photo.setImageBitmap( null );
}
}
Hope this small tip can help you.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>The article is great and I recommend, reading the four questions raised by Adam will help you reflect on your work as a developer.
These questions can help you find new challenges on your current job, or even start looking for new challenges elsewhere, not only that but also help you become a better developer.
We just started a new year, now could be a good time to think about what you wanna for yourself and then start setting new goals.
Happy New Year to every one!!!
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>I prepared a short survey and I will appreciate if you can invest 5 minutes of your valuable time answering few questions.
My goal with this survey is to learn more about your software development plans for 2013 and identify potential and useful topics to all of you. Also validate some content ideas I have for 2013.
The survey is pretty straight forward, take less than 5 minutes and is very important to help to define the blog content for 2013.
Thank you,
Andreano Lanusse
PS: You can also access the survey directly from this link http://bit.ly/peal2013en
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>What I really like on this framework is the simplicity to create Web UI based on domain model, and data persist through a ORM.
Below a short video introduction to Grails, watch this video and you can have some initial idea about how it works.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>In order to start creating a Shell Extension in Delphi, you first need to create an ActiveX Library project and after that create a new Automation Object. In the example I use for this post, the project name is CloudUpload and the Automation Object is called TCloudUploadContext. The TCloudUploadContext class must implement the interfaces IShellExtInit and IContextMenu in order to integrate the Context Menu in Windows Explorer.
{ IShellExtInit Methods }
{ Initialize the context menu if a files was selected}
function IShellExtInit.Initialize = ShellExtInitialize;
function ShellExtInitialize(pidlFolder: PItemIDList; lpdobj: IDataObject;
hKeyProgID: HKEY): HResult; stdcall;
{ IContextMenu Methods }
{ Initializes the context menu and it decides which items appear in it,
based on the flags you pass }
function QueryContextMenu(Menu: HMENU; indexMenu, idCmdFirst, idCmdLast,
uFlags: UINT): HResult; stdcall;
{ Execute the command, which will be the upload to Amazon or Azure}
function InvokeCommand(var lpici: TCMInvokeCommandInfo): HResult; stdcall;
{ Set help string on the Explorer status bar when the menu item is selected }
function GetCommandString(idCmd: UINT_PTR; uFlags: UINT; pwReserved: PUINT;
pszName: LPSTR; cchMax: UINT): HResult; stdcall;
The ShellExtInitialize defines if the Context Menu will appear or not in Windows Explorer. In this sample the context menu only shows up if one file has been selected, otherwise no Context Menu. In case only one file was selected the FFileName variable will receive the name of the file.
function TCloudUploadContextMenu.ShellExtInitialize(pidlFolder: PItemIDList;
lpdobj: IDataObject; hKeyProgID: HKEY): HResult;
var
DataFormat: TFormatEtc;
StrgMedium: TStgMedium;
Buffer: array [0 .. MAX_PATH] of Char;
begin
Result := E_FAIL;
{ Check if an object was defined }
if lpdobj = nil then
Exit;
{ Prepare to get information about the object }
DataFormat.cfFormat := CF_HDROP;
DataFormat.ptd := nil;
DataFormat.dwAspect := DVASPECT_CONTENT;
DataFormat.lindex := -1;
DataFormat.tymed := TYMED_HGLOBAL;
if lpdobj.GetData(DataFormat, StrgMedium) <> S_OK then
Exit;
{ The implementation now support only one file }
if DragQueryFile(StrgMedium.hGlobal, $FFFFFFFF, nil, 0) = 1 then
begin
SetLength(FFileName, MAX_PATH);
DragQueryFile(StrgMedium.hGlobal, 0, @Buffer, SizeOf(Buffer));
FFileName := Buffer;
Result := NOERROR;
end
else
begin
// Don't show the Menu if more then one file was selected
FFileName := EmptyStr;
Result := E_FAIL;
end;
{ http://msdn.microsoft.com/en-us/library/ms693491(v=vs.85).aspx }
ReleaseStgMedium(StrgMedium);
end;
After the context menu handler is initialized via the IShellExtInit interface, Windows uses the IContextMenu interface to call the other methods of our context menu handler. In this case it will call QueryContextMenu, GetCommandString and InvokeCommand.
The Context Menu options (Amazon S3, Microsoft Azure) will be created through the QueryContextMenu method.
function TCloudUploadContextMenu.QueryContextMenu(Menu: HMENU;
indexMenu, idCmdFirst, idCmdLast, uFlags: UINT): HResult;
var
CloudMenuItem: TMenuItemInfo;
MenuCaption: String;
SubMenu: HMENU;
uId: UINT;
begin
{ only adding one menu CloudMenuItem, so generate the result code accordingly }
Result := MakeResult(SEVERITY_SUCCESS, 0, 3);
{ store the menu CloudMenuItem index }
FMenuItemIndex := indexMenu;
{ specify what the menu says, depending on where it was spawned }
if (uFlags = CMF_NORMAL) then // from the desktop
MenuCaption := 'Send file from Desktop to the Cloud'
else if (uFlags and CMF_VERBSONLY) = CMF_VERBSONLY then // from a shortcut
MenuCaption := 'Send file from Shourtcut to the Cloud'
else if (uFlags and CMF_EXPLORE) = CMF_EXPLORE then // from explorer
MenuCaption := 'Send file from Explorer to the Cloud'
else
{ fail for any other value }
Result := E_FAIL;
if Result <> E_FAIL then
begin
SubMenu := CreatePopupMenu;
uId := idCmdFirst;
InsertMenu(SubMenu, AmazonIndex, MF_BYPOSITION, uId, TClouds[AmazonIndex]);
Inc(uId);
InsertMenu(SubMenu, AzureIndex, MF_BYPOSITION, uId, TClouds[AzureIndex]);
FillChar(CloudMenuItem, SizeOf(TMenuItemInfo), #0);
CloudMenuItem.cbSize := SizeOf(TMenuItemInfo);
CloudMenuItem.fMask := MIIM_SUBMENU or MIIM_STRING or MIIM_ID;
CloudMenuItem.fType := MFT_STRING;
CloudMenuItem.wID := FMenuItemIndex;
CloudMenuItem.hSubMenu := SubMenu;
CloudMenuItem.dwTypeData := PWideChar(MenuCaption);
CloudMenuItem.cch := Length(MenuCaption);
InsertMenuItem(Menu, indexMenu, True, CloudMenuItem);
end;
end;
When you are in the Windows Explorer and you pass the mouse over one of the Cloud menu items a short help message is displayed in the Windows Explorer status bar, it is defined on the implementation of the method GetCommandString, which returns a string to the Windows Explorer to display.
function TCloudUploadContextMenu.GetCommandString(idCmd: UINT_PTR; uFlags: UINT;
pwReserved: PUINT; pszName: LPSTR; cchMax: UINT): HResult;
begin
Result := E_INVALIDARG;
{ Set help string on the Explorer status bar when the menu item is selected }
if (idCmd in [AmazonIndex, AzureIndex]) and (uFlags = GCS_HELPTEXT) then
begin
StrLCopy(PWideChar(pszName), PWideChar('Copy the selected file to ' +
TClouds[idCmd]), cchMax);
Result := NOERROR;
end;
end;
As the user clicks in one of the Cloud menu items, the method InvokeCommand will be called and start the process to upload the selected file to the Cloud selected. At this point we already have the file name and based on the lpici parameters we can identify what menu item the user clicked.
function TCloudUploadContextMenu.InvokeCommand(var lpici: TCMInvokeCommandInfo): HResult;
var
Item: Word;
begin
Result := E_FAIL;
if HiWord(Integer(lpici.lpVerb)) <> 0 then
Exit;
{ if the index matches the index for the menu, show the cloud options }
Item := LoWord(Integer(lpici.lpVerb));
if Item in [AmazonIndex, AzureIndex] then
begin
try
Upload(lpici.HWND, Item, FFileName);
except
on E: Exception do
MessageBox(lpici.hwnd, PWideChar(E.Message), 'Cloud Upload', MB_ICONERROR);
end;
Result := NOERROR;
end;
end;
In order for the COM object to be created whenever the CloudUpload is loaded, it’s necessary to create an instance of a class factory that specifically creates an instance of the shell extension object, the factory instance will be created on the initialization section, based on the following code, which is a replacement for the default code created by Delphi.
initialization TCloudUploadObjectFactory.Create(ComServer, TCloudUploadContextMenu, CLASS_CloudUploadContextMenu, ciMultiInstance, tmApartment); end.
Since the class factory will be responsible to register/unregister the DLL, the methods ApproveShellExtension and UpdateRegistry will be invoked, it will happen when you use the regsvr32.exe.
{ the new class factory }
TCloudUploadObjectFactory = class(TAutoObjectFactory)
protected
procedure ApproveShellExtension(&Register: Boolean; const ClsID: string);
function GetProgID: string; override;
public
procedure UpdateRegistry(Register: Boolean); override;
end;
{ TCloudUploadObjectFactory }
{ Required to registration for Windows NT/2000 }
procedure TCloudUploadObjectFactory.ApproveShellExtension(&Register: Boolean;
const ClsID: string);
Const
WinNTRegKey =
'SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved';
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if not Reg.OpenKey(WinNTRegKey, True) then
Exit;
{ register the extension appropriately }
if &Register then
Reg.WriteString(ClsID, Description)
else
Reg.DeleteValue(ClsID);
finally
Reg.Free;
end;
end;
function TCloudUploadObjectFactory.GetProgID: string;
begin
{ ProgID not required for shell extensions }
Result := '';
end;
procedure TCloudUploadObjectFactory.UpdateRegistry(Register: Boolean);
Const
ContextKey = '*\shellex\ContextMenuHandlers\%s';
begin
{ perform normal registration }
inherited UpdateRegistry(Register);
{ Registration required for Windows NT/2000 }
ApproveShellExtension(Register, GUIDToString(ClassID));
{ if this server is being registered, register the required key/values
to expose it to Explorer }
if Register then
CreateRegKey(Format(ContextKey, [ClassName]), '', GUIDToString(ClassID),
HKEY_CLASSES_ROOT)
else
DeleteRegKey(Format(ContextKey, [ClassName]));
end;
At this point we just need to compile the extension, for this sample the Win APIs and RTL methods are the same for both platforms, we don’t need any specific code. You can define the target platform through the Project Manager, by default your project target 32-bit Windows, right click on Target Platforms to add 64-bit Windows.
You can’t register 32-bit dll in 64-bit operation system, and you can not register 64-bit dll in 32-bit operation system. If you are using your develop machine to test, compile for the platform compatible with your OS.
First, you must Run as Administrator the application you are going to use to register the shell extensions even if you are the Administrator user.
32-bit shell extensions can be registered through the IDE, and command line (cmd) can be used to register 32-bit and 64-bit.
Here the cmd line to register and unregister:
– Run as Administrator the cmd;
– Register the extension using the following command line: regsvr32 <PATH WHERE IS LOCATED THE DLL>CloudUpload.dll
– To unregister the extension using the following command line: regsvr32 <PATH WHERE IS LOCATED THE DLL>CloudUpload.dll /u
After register the DLL you can open the Windows Explorer, select one file and right click, you will see the new menu “Send file from Explorer to the Cloud”. The following screenshot show the shell extension on my Windows 7 64-bit.
You can download he source code in 2 different ways:
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>This Hotfix addresses an issue with using Korean IME in FireMonkey and you can download here.
More information about Hotfix 1, 2 and 3 can be found here.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Rally today announces Rally For Impact
, the next increment of Rally’s social mission that aims to mobilize engineers to solve the world’s most pressing problems.
Please, take 5 minutes of your time and watch the following video, it will explain the Rally For Impact Mission and shows how an enginner in India was able to make a tremendous impact on people’s life.
If you have solved a social problem through engineering and want to share, let Rally for Impact know, they will love to know What caused you to change direction and pursue this issue? What challenges did you overcome? What help did you need to be successful? Visit the www.rallyforimpact.org and tell your story.
Share this great initiative with your friends and start following Rally for Impact on twitter and Facebook, just click the buttons below.
[quote style=”boxed”]Follow Rally For Impact on Twitter Follow @RallyForImpact [/quote]
[quote]Like Rally For Impact on Facebook
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>The following video is a very cool presentation that will give you an overview of the Scrum process and how organizations can streamline their SCRUM process through the use of the Rally application.
If you are starting in agile and want to learn more, this video will be a great start.
Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse
]]>