Recent

Author Topic: Carbon Widgets - Drag & Drop  (Read 18401 times)

sygin

  • New member
  • *
  • Posts: 7
Carbon Widgets - Drag & Drop
« on: July 29, 2007, 05:13:20 pm »
Hi,

I am working on getting a native application working using Lazarus
and the Carbon widget set. I have got my application to work
but I need to implement very basic 'Drag & Drop' functionality.

I would like to be able to drag files from Finder and drop them onto
my application which would then list the files.

Is Drag & Drop working with the Carbon widget set?
Any help would be appreciated.

Thank you,
Sygin

PS: I really appreciate the effort going into Lazarus and the Carbon
widget set. The people involved are doing impressive things. Thanks

PPS: I now realize that this post is in the wrong place.  :(

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2680
RE: Carbon Widgets - Drag & Drop
« Reply #1 on: July 30, 2007, 11:34:28 am »
dragging within an app works. Drag 'n drop from other apps I don't know. I think there isn't even an generic/common solution yet defined for it in the LCL.

About the wrong place... maybe, but this is the most related to carbon. Maybe we should add [using lazarus]-[widgetset]-[..] sections.
Since this is indeed no installation section.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Tombo

  • New Member
  • *
  • Posts: 21
Carbon Widgets - Drag & Drop
« Reply #2 on: July 30, 2007, 01:14:40 pm »
Hi,
I am working on this issus (see http://wiki.lazarus.freepascal.org/Drop_files_event).

Tom

sygin

  • New member
  • *
  • Posts: 7
Carbon Widgets - Drag & Drop
« Reply #3 on: July 30, 2007, 03:55:46 pm »
Hi Marc and Tombo,

Thank you for the replies, much appreciated.

I am interested in helping out with the Carbon widget set, but am hamstrung by my inexperience.
Is there a mailing list for the Carbon widget set?
Any suggestions on how to start contributing?

Thanks,
Sygin

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2680
Carbon Widgets - Drag & Drop
« Reply #4 on: July 30, 2007, 06:27:49 pm »
iirc there is no specific carbon-lazarus mailinglist. You can use the main mailinglist for that.
For contributions I think Tombo has more overview of in what area you can have a look
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Carbon Widgets - Drag & Drop
« Reply #5 on: July 30, 2007, 06:36:30 pm »
Quote from: "sygin"
Any suggestions on how to start contributing?


If you don't know how to program in Carbon yet, there is a demonstration carbon for Free Pascal here:

http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/packages/extra/univint/examples/controldemo.pas?rev=7785&view=markup

I guess that the first step would be understanding how it works. Read the Apple docs for the related functions (google to find the docs), they are really good.

I consider Carbon a very good API. It's quite easy to use.

After that you can look for any features from LCL that you use and aren't yet implemented. Implement it and send a patch to us (there is a tutorial on the wiki about how to create a Patch if you don't know how to).

You need to use the subversion Lazarus to help develop it (again instructions on the wiki).

crorden

  • New Member
  • *
  • Posts: 36
Carbon Widgets - Drag & Drop
« Reply #6 on: August 05, 2007, 12:00:00 am »
Tombo-

It sounds like you have outlined a great cross-platform solution. If you make any progress, I would be happy to beta-test your implementations.

-c

sygin

  • New member
  • *
  • Posts: 7
OnDropFiles
« Reply #7 on: October 15, 2007, 12:04:05 pm »
Hi,

I am very happy with the work Tombo has contributed to the Lazarus
project. Carbon is almost complete.  :)

Has anyone got OnDropFiles working with on the Mac?
I can get it working on the Linux platform with the GTK widget set.

Is there something I must set in the application bundle?

***** EDIT ******
I have managed to get it to work, needed to add filetypes to info.plist

I copied the needed info from the TextEdit bundle.

This is fantastic.
Thanks Tombo

***** EDIT END *****

Thanks
Sygin

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2680
RE: OnDropFiles
« Reply #8 on: October 15, 2007, 01:28:22 pm »
can you give an example in the wiki ?
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

windy

  • Full Member
  • ***
  • Posts: 186
RE: OnDropFiles
« Reply #9 on: October 15, 2007, 09:44:44 pm »
Hi
Does fpc 2.2 and Lazarus 9.23 for the MacOsx work with Carbonwidgets now?
I might try it out...following the Wiki guide :)

sygin

  • New member
  • *
  • Posts: 7
Current State of Carbon
« Reply #10 on: October 17, 2007, 12:23:02 pm »
Hi People,

I have recently written  set of applications for  Mac OS X and
am very pleased with the results. The Carbon widgets are very
usable and mostly complete.

The last thing I remember Tombo checking in was to to with
clipboard functionality.

I would suggest getting any version of Lazarus working and then
upgrading to the latest daily snapshot. The key is to get FPC 2.2.0
installed correctly. You can then compile Lazarus with it.

Get the latest from: http://www.hu.freepascal.org/lazarus/

There is a bit of dikking around with Fink and the installation
of a few libraries.

Once you have the latest Lazarus snapshot
working with FPC 2.2.0 you will be making great Carbon
applications with very little pain indeed.

Once again thanks Tombo, you rock!

Cheers
Sygin

PS: I will look into documenting my steps to get drag and drop working,
though at the moment it only works on the icon.

windy

  • Full Member
  • ***
  • Posts: 186
RE: Current State of Carbon
« Reply #11 on: October 18, 2007, 11:50:20 am »
Hi
I have tried to use the carbon widget set
steps I have taken:
downloaded and have in use FPC 2.2.1
and lazarus 9.23.1
snapshot download, 17th October

I set the IDE to be built, in the  build lazarus  options, and the rest to none

it built ok, IDE succesull
I then downloaded the script to create the .app, chomd it, etc, and the lazarus.app was created
but it wont run....and double clicking the lazarus program only gets the splash screen showing for a second
so i go back to a back up I made and start over

this time I try to compile and run a simple program....check box and button...it compiles...and It will run by double clicking it,...and it loosk great....but the terminal window shows and you can get any focus on the  program...maybe I need to create a .app bundle for that test program?
i will try that///

humm, double clicking my project1.app file.....it says it can not run it because it might be damaged or incomplete......
something not right....or missing.....do I need to download and install something>?

thanks!!!!!!
so close!!

wait, I got it working!
just had to do things correctly when creating the application bundle!
wow!!!!, much better, and the form colours work now!

great work people working on the carbon interface!!!
question:is the carbon widget set also available for linux, or maybe qt?

 

TinyPortal © 2005-2018