Recent

Author Topic: Cocoa - sigh  (Read 14214 times)

Cubud

  • New member
  • *
  • Posts: 8
Cocoa - sigh
« on: June 16, 2007, 11:52:38 am »
I bought a book on Cocoa for Mac OS X.  I thought that if FPC was such a pain I could at least try this instead.  Unfortunately by page 30 I have already decided not to continue....

http://mrpmorris.blogspot.com/2007/06/cocoa-falling-at-first-hurdle.html

So then......

Is anyone willing to help out a complete MAC OS X newbie to get Lazarus working?  I had problems with getting it to work.

Cheers


Pete

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Cocoa - sigh
« Reply #1 on: June 16, 2007, 03:37:52 pm »
Quote from: "Cubud"
Is anyone willing to help out a complete MAC OS X newbie to get Lazarus working?  I had problems with getting it to work.


Objective C and the Cocoa framework is what Apple wants programmers to use but you're certainly not the first person who didn't find Obj C to his liking.  Plus they're not cross-platform tools.

You should be able to get Lazarus installed by following these instructions:

http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips

If you have specific problems please post your questions here.

Thanks.

-Phil

Cubud

  • New member
  • *
  • Posts: 8
E: Sub-process /sw/bin/dpkg returned an error code (1)
« Reply #2 on: June 16, 2007, 04:10:43 pm »
Here is my specific problem......

Setting up orbit (0.5.17-16) ...
Setting up passwd (20051118-11) ...
/sw/var/lib/dpkg/info/passwd.postinst: line 6: update-passwd: command not found
/sw/bin/dpkg: error processing passwd (--configure):
 subprocess post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of gnome-libs-shlibs:
 gnome-libs-shlibs depends on passwd (>= 20011007-1); however:
  Package passwd is not configured yet.
/sw/bin/dpkg: error processing gnome-libs-shlibs (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gdk-pixbuf-shlibs:
 gdk-pixbuf-shlibs depends on gnome-libs-shlibs; however:
  Package gnome-libs-shlibs is not configured yet.
/sw/bin/dpkg: error processing gdk-pixbuf-shlibs (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gdk-pixbuf:
 gdk-pixbuf depends on gdk-pixbuf-shlibs (= 0.18.0-12); however:
  Package gdk-pixbuf-shlibs is not configured yet.
/sw/bin/dpkg: error processing gdk-pixbuf (--configure):
 dependency problems - leaving unconfigured
Setting up gtk+ (1.2.10-50) ...
* GDK: (gdk). The General Drawing Kit
install-info(/sw/share/info/gdk.info): creating new section `User Interface Toolkit'
* GTK: (gtk). The GIMP Toolkit

Errors were encountered while processing:
 passwd
 gnome-libs-shlibs
 gdk-pixbuf-shlibs
 gdk-pixbuf
E: Sub-process /sw/bin/dpkg returned an error code (1)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: E: Sub-process /sw/bin/dpkg returned an error code (1)
« Reply #3 on: June 16, 2007, 09:39:34 pm »
Where do you get this error?

Using Fink?

I followed the install instructions on my MacBook and everything worked perfectly.

ovidius

  • New Member
  • *
  • Posts: 21
RE: E: Sub-process /sw/bin/dpkg returned an error code (1)
« Reply #4 on: June 17, 2007, 12:29:58 pm »
Quote
I bought a book on Cocoa for Mac OS X. I thought that if FPC was such a pain I could at least try this instead. Unfortunately by page 30 I have already decided not to continue....


I am very sorry to be harsh, but for someone calling himself a professional developer you give up pretty soon. If you refuse to learn Cocoa, because the language of specific issues, okay (...you can certainly judge a language without using or knowing it ...)

But complaining in the Lazarus forum about fink does not seem very professional to me. Maybe you have installed the powerpc version of fink, too.

But being less ironic and more serious. If you have a Windows development background, then RealBasic is maybe the method of choice for you. It is very complete, cross plattform, easy to install and there is a large community for it with paid support. At the moment Lazarus is not ready for your needs on the Mac.

Just my two cents...

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: RE: E: Sub-process /sw/bin/dpkg returned an error code (
« Reply #5 on: June 17, 2007, 03:35:21 pm »
Quote from: "ovidius"
If you have a Windows development background, then RealBasic is maybe the method of choice for you. It is very complete, cross plattform, easy to install and there is a large community for it with paid support.


Lazarus has paid support too. I have already given such support to 2 different companies.

To be more specific, we are porting a large Delphi software that uses Graphics32 to the native Carbon interface provided by Lazarus.

And we are working hard to improve the Macintosh IDE, are there were very good advances recently, like being able to debug carbon applications from a bundle.

Further RealBasic is not related to this forum, please comment about it in the appropriate place, like RealBasic´s forum or I will moderate such posts.

ovidius

  • New Member
  • *
  • Posts: 21
Re: RE: E: Sub-process /sw/bin/dpkg returned an error code (
« Reply #6 on: June 17, 2007, 04:24:09 pm »
Quote from: "sekel"


Lazarus has paid support too. I have already given such support to 2 different companies.

To be more specific, we are porting a large Delphi software that uses Graphics32 to the native Carbon interface provided by Lazarus.

And we are working hard to improve the Macintosh IDE, are there were very good advances recently, like being able to debug carbon applications from a bundle.

Further RealBasic is not related to this forum, please comment about it in the appropriate place, like RealBasic´s forum or I will moderate such posts.


It seems that I did not may myself clear enough: I very much appreciate the work done in Lazarus for the mac and follow it closely. If I was not I would not read this forum or write here.

This was not a general suggestion to everybody but aimed as a reaction to the first posting on  this topic.

So, I am sorry.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: RE: E: Sub-process /sw/bin/dpkg returned an error code (
« Reply #7 on: June 17, 2007, 04:31:48 pm »
Quote from: "ovidius"
This was not a general suggestion to everybody but aimed as a reaction to the first posting on  this topic.

So, I am sorry.


No problem =)

Cubud

  • New member
  • *
  • Posts: 8
Re: RE: E: Sub-process /sw/bin/dpkg returned an error code (
« Reply #8 on: June 17, 2007, 10:03:32 pm »
Quote from: "ovidius"
I am very sorry to be harsh, but for someone calling himself a professional developer you give up pretty soon. If you refuse to learn Cocoa, because the language of specific issues, okay (...you can certainly judge a language without using or knowing it ...)


I don't call myself a professional programmer (I don't remember saying that), however, I AM a professional programmer.  I know this based on the fact that I am paid to write software as my profession.  My expertise is also sought worldwide, I am often offered jobs out of the blue, and people have traveled from other countries just to spend a day with me teaching them.  So, now that my curriculum vitae is over with I'd prefer the personal comments to stop so that we may concentrate on the problems instead.

The reason I am going to give up on Cocoa is that by page 30 I learned that all methods are Public and all instance variables are Protected.  Sorry but I don't like it, and I don't intend to write complex apps with tools I do not like.
 
Quote

But complaining in the Lazarus forum about fink does not seem very professional to me. Maybe you have installed the powerpc version of fink, too.


Actually I have MacPorts installed.  I need to know how to uninstall that before I can install fink, because I would they both implement the same command in a slightly different way.

Quote

But being less ironic and more serious. If you have a Windows development background, then RealBasic is maybe the method of choice for you.


I have evaluated it, it did not meet my needs.

Quote
At the moment Lazarus is not ready for your needs on the Mac.


So it isn't ready to write client/server desktop apps?  Really?  Why not?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: E: Sub-process /sw/bin/dpkg returned an error code (
« Reply #9 on: June 17, 2007, 11:52:39 pm »
Quote from: "Cubud"
Actually I have MacPorts installed.  I need to know how to uninstall that before I can install fink, because I would they both implement the same command in a slightly different way.


I think what's confusing us is the MacPorts. I don't even know what that is.

There's also a GUI frontend with fink if there's some reason why you can't run fink's apt-get command from a console.

I don't understand why you can't easily have both MacPorts and fink installed. If there's a problem with them installing to the same folder, then you could renaming your current /sw, install fink into a new /sw, etc.

Thanks

-Phil

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Re: RE: E: Sub-process /sw/bin/dpkg returned an error co
« Reply #10 on: June 18, 2007, 12:13:01 am »
MacPorts is another project that does the same thing as Fink. So I would say that having both installed at the same time can lead to problems.

To run Lazarus we need Gtk, not Fink specifically. So it should be possible to get Gtk from MacPorts and work with that. If MacPorts doesn't work, better try Fink or ask on the MacPorts website what to do.

About Fink, I used the GUI called Fink Commander and I liked it. Worked pretty well.

ovidius

  • New Member
  • *
  • Posts: 21
RE: Re: RE: E: Sub-process /sw/bin/dpkg returned an error co
« Reply #11 on: June 18, 2007, 01:21:47 am »
So am I going to be the bad guy again...

Quote

Actually I have MacPorts installed. I need to know how to uninstall that before I can install fink, because I would they both implement the same command in a slightly different way.


The first google hit for "uninstall macports" helps you with this one:

http://lists.macosforge.org/pipermail/macports-users/2006-December/000864.html

or just by looking at the MacPorts faq list

http://trac.macosforge.org/projects/macports/wiki/FAQ

But on the other hand you can install Fink and MacPorts at the same time and it will work for most things.  I have both installed for some time and the coexist rather well.

After all it should not be necessary to install fink at all:

You can install the MacPorts packages gtk1 and gdk-pixbuf which should do the job.

Quote
So it isn't ready to write client/server desktop apps? Really? Why not?

At the momentary state the LCl port to carbon is not complete. You can develop X11 apps with gtk, but it will not be the normal UI for mac users. So, in principle you will have to have everyone install Fink or MacPorts and start X11.

Before people fall over me again: This is no critique in the sense that it should be ready but is not, but just a description of the state now. There are people working on this and it really improves in a fantasic way, but I would not dare to say you should develop your Carbon apps with Lazarus this very day.

@sekel: You are very welcome to object here   :wink:

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: RE: Re: RE: E: Sub-process /sw/bin/dpkg returned an erro
« Reply #12 on: June 18, 2007, 08:30:16 am »
Quote from: "ovidius"
@sekel: You are very welcome to object here   :wink:


I would say it's worth trying it, and you can always fall back to gtk if carbon doesn't work, or also to qt if your application is GPL. Lazarus applications are not tied to a specific widgetset =)

While porting graphics32 to lcl-carbon I found very few non-implemented things, and graphics32 uses lot's of things like loading jpeg images, extensive use of Canvas, the examples use lot's of different controls, etc. Everything worked perfectly, with the exception of 2 examples from a total of 20. I was quite positively surprised.

I would say that if your project is small, there is a big chance that it will work without changes to lcl-carbon. If your project is big, commiting resources to implement the missing parts that you need will be worth it so your end application won't need Gtk.

There is a list of what is implemented here:

http://wiki.lazarus.freepascal.org/Roadmap#Widgetset_dependent_components

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: RE: E: Sub-process /sw/bin/dpkg returned an erro
« Reply #13 on: June 18, 2007, 06:36:16 pm »
Quote from: "sekel"
While porting graphics32 to lcl-carbon I found very few non-implemented things, and graphics32 uses lot's of things like loading jpeg images, extensive use of Canvas, the examples use lot's of different controls, etc. Everything worked perfectly, with the exception of 2 examples from a total of 20. I was quite positively surprised.


I agree. The parts of the Carbon widgetset that have been implemented generally work very well. The quality of the widgetet code looks very good too. I particularly like how the results almost all Carbon API function calls are checked and a debug message outputted to the OS X Console app if an error is detected. This makes tracking down bugs and crashes very easy.

I would recommend start using Carbon for everything that you can. It's going to be so much more satisfying than gtk or gtk2.

Thanks.

-Phil

 

TinyPortal © 2005-2018