Re: [lazarus] Philip Hess' Carbon IDE WIKI idea

2007-10-15 Thread Adriaan van Os

Philip,


I believe the "carb" resource has been deprecated for years.


Are you kidding, any Apple technology older than three months is "deprecated".


I stand by my statement that all OS X GUI apps should have an .app
bundle. It's just too good of an idea and almost all developers
recognize that, as evidenced by all the apps that use bundles.


Well, you should really be programming in Objective-C. Didn't you know that Pascal is a very 
old-fashioned language, once designed for teaching on nowadays only suitable for kids and loosers ?


After twenty years of Mac programming, I really can't take Apple recommendations serious anymore. I 
remember too many "thou should's" from the past.


Regards,

Adriaan van Os

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


RE: [lazarus] Philip Hess' Carbon IDE WIKI idea

2007-10-15 Thread Hess, Philip J
Adrian,

I believe the "carb" resource has been deprecated for years. Apple also
strongly suggests using an app bundle rather than embedding resources
such as the Info.plist file inside the executable file.

Some time back I looked at all of the apps in my Applications folder.
The only ones that didn't have .app bundles were the Microsoft Office
programs (Word, Excel, PowerPoint). In fact, these are still old-style
PEF format executables rather than the new-style Mach-o executables. The
next version of Office for the Mac (Office 2008) will use Mach-o since
PEF isn't suppported natively on Intel OS X (except under Rosetta
emulation). I suspect Office 2008 will also use .app bundles for its
apps too.

I stand by my statement that all OS X GUI apps should have an .app
bundle. It's just too good of an idea and almost all developers
recognize that, as evidenced by all the apps that use bundles.

Thanks.

-Phil



-Original Message-
From: Adriaan van Os [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 2:09 AM
To: lazarus@miraclec.com
Subject: Re: [lazarus] Philip Hess' Carbon IDE WIKI idea

Hess, Philip J wrote:

> All Mac GUI apps should have an .app bundle. Here's how I created one
for the Carbon-based Laz IDE:

An .app bundle isn't an absolute requirement, it suffices to add a to
'carb' resourse to the 
executable, e.g. through a carb.r file that gets compiled with
/Developer/Tools/Rez

#include 

type 'carb' {
};

resource 'carb'(0) {
};

To make it nicer, you can add a 'plst' resource

Read 'plst' (0) "Info.plist";

Regards,

Adriaan van Os

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Philip Hess' Carbon IDE WIKI idea

2007-10-14 Thread Adriaan van Os

Hess, Philip J wrote:


All Mac GUI apps should have an .app bundle. Here's how I created one for the 
Carbon-based Laz IDE:


An .app bundle isn't an absolute requirement, it suffices to add a to 'carb' resourse to the 
executable, e.g. through a carb.r file that gets compiled with /Developer/Tools/Rez


#include 

type 'carb' {
};

resource 'carb'(0) {
};

To make it nicer, you can add a 'plst' resource

Read 'plst' (0) "Info.plist";

Regards,

Adriaan van Os

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


RE: [lazarus] Philip Hess' Carbon IDE WIKI idea

2007-10-14 Thread Hess, Philip J
Jim,

All Mac GUI apps should have an .app bundle. Here's how I created one for the 
Carbon-based Laz IDE:

1. First made copy of GTK-based Lazarus in case Carbon-based IDE doesn't work. 
Can use Finder or command line:  cp -p lazarus lazarus-gtk

2. Started GTK-based Lazarus, then in Configure "Build Lazarus":
- Set everything to None, except Laz IDE.
- Set LCL interface to carbon.
- Unchecked Restart box since we don't want to start unbundled executable.
- Entered this in Options: -k'-framework' -k'carbon'
- Clicked Build button.

3. Exited GTK-based Lazarus.

4. Created .icns file. I just posted lazarus.icns to BugTracker, but you can 
also create this yourself with Icon Composer from mainicon.ico (in images 
folder).

5. Created app bundle with script:

./create_app_mac.sh lazarus Lazarus

This will create Lazarus.app (with proper uppercase first char) and if it finds 
lazarus.icns will copy icon file into bundle. If the bundle has an icon file 
you'll see this on the dock when it's run.

Script is available from:

http://web.fastermac.net/~MacPgmr/Lazarus/

6. Double-click Lazarus in Finder to start Carbon-based IDE. You can also drag 
and drop it onto Dock to start it from there.

Thanks.

-Phil



-Original Message-
From: James Chandler Jr [mailto:[EMAIL PROTECTED]
Sent: Sun 10/14/2007 4:45 PM
To: lazarus@miraclec.com
Subject: [lazarus] Philip Hess' Carbon IDE WIKI idea
 
Hi Phil

The wiki sounds like a good idea.

Adriaan van Os helped us get a middle-sized PC Lazarus app moved into  
an xcode project. The carbon components this project uses, are  
working great. The low-level message loop is behaving nicely, doing  
what one would expect it to do responding to keyboard, mouse,  
updating controls, all that good stuff.

The stuff our program exercises, include Main Menu (with check-items,  
and numerous hierarchical menus), Right-click menus, TForm,  
ShowModal, multiple TPanels in a TForm, TButton, TSpeedButton,  
Multiple TPaintBox in a TPanel, TScrollBar, TBevel, TLabel with  
default Black Text, TLabel with Colored Text/Background, TComboBox,  
TProgressBar, TMemo, TEdit, TProgressBar, TOpenDialog, TTimer.

Dunno if every feature of each mentioned control is perfect (since I  
haven't tested every available feature of each control), but they are  
working exactly as they should in our use of each control.

We still need to do some work on it, but here are some screenshots:

http://www.errnum.com/html/MacACWScreenShots.html



Have done Mac programming a long time, off'n'on, but am very ignorant  
of a lot of modern Mac details, especially the unix and command-line  
tools.

Maybe I'm doing something wrong, but when I double-click  
startlazarus, it runs the IDE from the Terminal. A lot of things seem  
to work, but no top menu (except the Terminal top menu), and the  
message loop doesn't seem to be fully running.

For instance, clicking on a lot of the buttons will open an  
appropriate window, but once the window is open, it doesn't do much  
and can't be dismissed.

Am not complaining. Far from it. Am only describing it, in case the  
current IDE version is supposed to be doing more and I haven't done  
something necessary to get it running better.

Do the developers generally run 'all command line all the time', or  
do they work on the IDE project in an XCode project?

Does the IDE ultimately need to be built into a bundle to become  
double-clickable with a menu and fully functional message loop and such?

The carbon application.run loop is already so well-behaved on our  
middle-sized program, that it seems that the code ought to be pretty  
close to 'prime time' to run the IDE pretty fully (albeit with  
perhaps some initially missing features and bugs to clean up)?

Its looking great. Congrats to all the folks who programmed this.

jcjr

On Oct 14, 2007, at 12:48 PM, Hess, Philip J wrote:
> Tom is right. Almost everything is implemented and working with the  
> Carbon widgetset. Even printing works. For now, you can use the  
> Unix CUPS-based printer dialogs and TPrinter implementation. The  
> dialogs aren't native like the Open, Save, etc. dialogs, but they  
> do work fine now. The TPrinter implementation does use the Carbon  
> API and is limited to the 4 font families built into the Postscript  
> interpreter (Courier, Times, Helvetica, Symbol, which are very  
> similar to the TrueType Courier New, Times New Roman, Arial,  
> Symbol) but it does print correctly.
>
> One thing that's needed now is testing of the integration of Carbon  
> with large, existing apps. For example, the Laz IDE is a good test  
> of integration. The Laz IDE can be compiled with the Carbon  
> widgetset and it actually works pretty well. There are a few big  
> issues still and a lot of little cosmetic ones with IDE dialog  
> sizes (too small to fit some of the controls with Carbon), but you  
> can try it out and see the future.
>
> I'm thinking of creating a wiki page devoted to getting t