Archive for the ‘xCode/Mac/iPad/iPhone/iOS/cocoa’ Category
Posted by jpluimers on 2014/09/30
I recently bumped into the NTCore website by Daniel Pisti.
At a client without my own VMs, I wanted to create a DebugBreak like function in Delphi, which I remembered from my Turbo Pascal days to be something like Inline($CC). So searching for both Delphi and INT 3, I found an EXE injection page at NTCore.
In Delphi, you can do this with a procedure like this, which cannot be inlined because it has an asm block:
procedure DebugBreak();
asm
int 3
end;
(Reminder to self: sort out what to do here to break on an iOS device; Xcode has an alternative)
The site has information about system internals and software security posted as articles until 2009, when he switched to blog posts. Besides that, he has written a bunch of interesting articles at CodeProject. Read the rest of this entry »
Posted in Delphi, Development, Pascal, Power User, Software Development, Turbo Pascal, Windows, xCode/Mac/iPad/iPhone/iOS/cocoa | 3 Comments »
Posted by jpluimers on 2014/06/25
Both TextMat 1.5 and 2.0 will ask you this upon the first time use:
“Textmate.app would like to access your contacts”
According to their Troubleshooting / MountainLion browse — TextMate Wiki it is valid, but the way they phrase it any sensible user should answer “No way!”.
If you ever want to reverse a decision to such an addressbook question, the only way is to reset it for all the times you answered it:
Perform “tccutil reset addressbook” in a Terminal window as shown in the man page tccutil section 1.
What TextMat should have done instead is customize the text of the question in order to show the intent. This isn’t difficult, as explained on Red Sweater Blog – Can I Get Your Address? by Daniel Jalkut:
In the info.plist, edit the value of the NSContactsUsageDescription key, as suggested by a Tweet from Cabel Maxfield Sasser.
Daniel points to the documentation PDF, where it indeed is stated when you read it very carefully: the detailed text indicates it is for iOS only, but in fact it is there in Mac OS X 10.8 and up as well.
It is also inside the Information Property List Key Reference: Cocoa Keys: the key tells it it for iOS 6+ and OS X 10.8+, but browsing to NSContactsUsageDescription only indicates iOS 6.
–jeroen
via Twitter / voidspace: “Textmate.app would like to ….
Posted in Apple, Development, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 2 Comments »
Posted by jpluimers on 2014/02/25
Posted in Apple, Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.9 Mavericks, Power User, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 3 Comments »
Posted by jpluimers on 2013/05/09
Posted in .NET, C++, Cloud Development, COBOL, CommandLine, Delphi, Development, Fortran, iSeries, Java, Pascal, RegEx, Scripting, Software Development, Web Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 3 Comments »
Posted by jpluimers on 2013/05/08

Lucida Console Sample (thanks Wikimedia!)
I’m in search to see if there is a better programmers font than the monospaced Lucida Console mainly to be used in Visual Studio, Delphi, the Windows console, Xcode and Eclipse. What I love about Lucida Console design is the relatively large x-height combined with a small leading (often called “line height”). This combines very readable text, and a lot of code lines in view. Lucida has two small drawbacks, see the second image at the right:
- The captial O and digit 0 (zero) are very similar.
- Some uppercase/lowercase character pairs are alike (because of the large x-height)
But, since the font hasn’t been updated for a very long time, lots of Unicode code points that are now in current fonts, are missing from Lucida Console (unless you buy the [Wayback] most recent version that has 666 characters from Fonts.com) Well, there are dozens of monospaced fonts around, so I wonder: which ones do you like? In the mean while, I’m going to do some experimenting with fonts mentioned in these lists:
A few fonts I’m considering (I only want scalable fonts, so raster .fon files are out):
I have tried Adobe Source Code Pro about half a year ago. That didn’t cut it: problem with italics in Delphi, and not enough lines per screen. [Wayback] New Open Source monospaced font from Adobe: Source Code Pro.
–jeroen
Posted in .NET, Adobe Source Code Pro, Apple, Delphi, Delphi 2007, Delphi XE3, Development, Encoding, Font, Lucida Console, Mac, Mac OS X / OS X / MacOS, Power User, Programmers Font, Software Development, Typography, Unicode, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Windows, Windows 7, Windows 8, Windows Server 2008 R2, Windows XP, xCode/Mac/iPad/iPhone/iOS/cocoa | 43 Comments »
Posted by jpluimers on 2012/08/15
A few weeks ago, Bill Karwin did a must watch webinar on the prevention SQL Injection titled “SQL Injection Myths and Fallacies“.
Bill Karwin (twitter, new blog, old blog, Amazon) is famous for much work in the SQL database community, including InterBase/Firebird, mySQL, Oracle and many more.
He also:
Anyway, his webinar is awesome. Be sure to get the slides, watch the replay, and read the questions follow up.
Watching it you’ll get a better understanding of defending against SQL injection.
A few very valuable points he made: Read the rest of this entry »
Posted in .NET, .NET 3.5, .NET 4.5, .NET ORM, ASP.NET, Batch-Files, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Cloud Development, COBOL, CommandLine, Database Development, Delphi, Delphi for PHP, Delphi x64, Delphi XE2, Development, EF Entity Framework, F#, Firebird, FireMonkey, History, InterBase, iSeries, Java, JavaScript/ECMAScript, Jet OLE DB, LINQ, LLBLGen, MEF, Microsoft Surface, Mobile Development, PHP, PowerShell, Prism, Scripting, SharePoint, SilverLight, Software Development, SQL, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 7, VB.NET, VBS, Visual Studio 11, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Web Development, Windows Azure, WinForms, WPF, XAML, xCode/Mac/iPad/iPhone/iOS/cocoa | 1 Comment »
Posted by jpluimers on 2012/06/27
Today exactly a month ago, Allen Bauer (Chief Scientist at Embarcadero) asked a really in depth question about debugging the startup sequence of iOS apps on a device not originating from Xcode on Stack Overflow indicating on what Embarcadero is researching.
Last week, he also answered the same question using manual steps for GDB. Not easy, but it works.
For a development tools company, getting your tools to work on a new platform is hard, and in this case it seems exceptionally hard.
I’m really looking forward to see what kind of cool tools come out of this, as the current developemt platform choices (Xcode or MonoTouch) can really use more competition to make it easier for us developers.
Exciting times ahead (:
–jeroen
via: xcode – Debug iOS application on device without symbols – Stack Overflow.
PS: I really love the comment by Danny Thorpe on using Periscope breakout switches – I remember those NMI days well (:
Posted in Debugging, Delphi, Development, GDB, iOS Development, Mobile Development, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 4 Comments »
Posted by jpluimers on 2012/05/29
Just a few notes on things I told Delphi cross development students over the last nine months or so.
For Mac OS X apps:
- The Platform Assistant Server that ships with Delphi XE2
For iOS apps:
Steps:
- Become a registered Apple Developer
- Download and install xCode 4 when you run on OS X 10.7 Lion or higher, or
Download and install xCode 3 when you run on OS X 10.6 Leopard
- Download and install FreePascal 2.4.4
xCode includes the iOS SDK
–jeroen
via: Developer Tools Overview – Apple Developer.
Posted in Delphi, Delphi XE2, Development, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 1 Comment »
Posted by jpluimers on 2011/12/20
When developing applications for iOS using Delphi XE2, it uses a smart but convoluted FPC detour.
That results in a few things you should take into account when developing iOS applications:
- Do not use Unit scope identifiers (that’s why for instance the FireMonkey unit FMX.Dialogs is called FMX_Dialogs when building an iOS application)
So don’t do a “uses System.SysUtils”, but “uses SysUtils” and don’t name your units using Unit scope identifiers for now.
It would be so nice if Embarcadero shipped the tool that made all the FMX_* units out of the FMX.* units; that alone would make code sharing between non-iOS and iOS applications in Delphi a lot easier.
- Do not use Generics (though FPC supports them, the FPC mode that Delphi XE2 uses for iOS compatibility does not)
- Do not use new style RTTI or TValue (they are not supported by FPC)
- Do not use any other dataset than the ones directly descending from TDataSet (so anything TClientDataSet or IBX like is out) mostly because those depend on external C obj files, Unit scope identifiers or new style RTTI
- Do not spread your application sources over multiple directories
- Do not use the TMyDynamicArray.Create shortcut of initializing dynamic arrays, but use a wrapper function that uses Open Array parameters as Rob Kennedy explains on StackOverflow.
- Do not run dpr2xcode after you have changed any files it generated (believe me, you will change those). This basically makes you have to reinvent most of the dpr2xcode logic, which is a real pain, as I’m still in that process and not completed.
These are the things you usually want to manually keep track of:
– most of the manual changes are keeping the “YourProject.dpr” and dpr2xcode generated “YourProject.pas” in sync
– altering the PNG files to show different splash graphics / application icons
I will extend this list over time.
Note that this detour should be gone in a future Delphi version, but for now you need to take the above into account.
It means that you might feel like programming with one hand behind your back. Well, the Objective C and Xcode way feels very similar, but from a different perspective :)
–jeroen
Posted in Delphi, Delphi XE2, Development, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 2 Comments »
Posted by jpluimers on 2011/12/06
When you write applications, it is important to include both the CUA and the Windows/Apple keyboard shortcuts, and get the tab order of keyboard accessible user elements right.
Many modern applications seem to put less and less emphasis on the most efficient user input device: the keyboard.
You should: it makes your application much more pleasant to use.
I wrote about CUA before, but the Windows and Mac shortcuts are just as important.
A small table (please post a comment if you know additions):
Keyboard Shortcuts for the most common tasks.
| Function |
CUA |
Windows |
Mac |
| Copy |
Ctrl + Insert |
Ctrl + C |
Command + C |
| Cut |
Shift + Delete |
Ctrl + X |
Command + X |
| Paste |
Shift + Insert |
Ctrl + V |
Command + V |
| Delete before cursor |
Backspace |
|
Delete |
| Delete after cursor |
Delete |
|
Fn + Delete |
| Undo |
Alt + Backspace |
Ctrl + Z |
Command + Z |
| Redo |
|
Ctrl + Y |
Command + Y |
| Confirm the current task |
Enter |
|
Return |
| Cancel the current task |
Escape |
|
Escape |
| Next field |
Tab |
|
Tab |
| Previous field |
Shift + Tab |
|
Shift + Tab |
| Next pane |
|
Ctrl + F6 |
|
| Previous pane |
|
Alt + F6 |
|
| Next window |
|
F6 |
Cmd + ` |
| Previous window |
|
Shift + F6 |
|
| Application menu |
|
Alt + Space |
|
| Windows menu |
|
⊞ |
|
| Local menu |
Shift + F10 |
Local Menu |
|
Note that many Linux programs follow both the CUA and Windows settings.
References:
–jeroen
Posted in .NET, Delphi, Development, Keyboards and Keyboard Shortcuts, Power User, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | Leave a Comment »