Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

New component...

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michal Bukovjan
to Tony Maro: Well that's not a surprise, really... They don't call it beta for nuthin! Mmm...…
Tony Maro wrote 22 lines
>if its a control which is expected to be part of the LCL >anyway, you can >send it into someone who can add to CVS. I think it should go >in CVS, since >Delphi, if not Kylix, has a DateTimePicker component.. > > Mmm... Probably not. It's a cool control, but the ultimate goal is to make it data aware once that's a possibility, so there would be major changes - or at least a new ancestor. I've also made it optional to "Americanize" dates (MM-DD-YYYY like any good human would do! ;-) and offer different separators (MM/DD/YYYY). I'll post the unit to my website soon and let you guys decide. It uses a Tcalender within it, and I'm not quite happy with how that component functions in some ways, so I might just copy over much of the Tcalendar code into a new object and start it fresh (or at least inherit a different object from it, but I think that may be dangerous considering the development status.) I haven't used Delphi since V4, and there was no datepicker in it. It's also still got an issue that I can't get fsstayontop or showmodal to work to make it stay on top!

So why not make both data and non-data aware control? On the other issue: if you are not satisfied about TCalendar, feel free to communicate what you need to change, or do it yourself, if possible, and send patches. Code duplication is not the best idea, IMHO - we should improve (or rewrite, if need be) what is available. We are aware that a lot of areas need improvements, TCalendar included.

Show quoted text 23 lines
>1.) Put the Source File in the LCL directory > > ..... Snip ..... >8.) make clean all > > Wow! Well, I will certainly try that (except the diff part - that's over my head. But I can always redownload the CVS if I screw it up.) But, I'd recommend accelerating the development of this feature. Think about all the user created components for Delphi. I think Lazarus is finally reaching a stage where user generated components could quickly take off. I'm already working to convert the components I wrote years ago. Well, all except the TDirectXPanel I did - LOL! If I'm using the CVS downloads and want to update - well there goes all my component install changes, I assume.

The patch things is not really difficult, really. If you want to make a patch of your modification against current CVS tree, just do this command from the toplevel directory:

cvs diff -u [files...] > my_patch_filename.patch

you don't have to specify filenames, you may specify directories as well, or nothing at all, in which case all subdirectories and files in current directory will be examined for differences against current CVS tree.

See:

http://www.tldp.org/HOWTO/CVS-RCS-HOWTO.html

or

http://linux.oreillynet.com/pub/a/linux/2002/06/13/cvs.html

or search Google.

And of course, if you need to apply your patch do a:

patch -p0 -i [my_patch_file.patch]

and that's about it.

Michal

Reply by email

Andrew Johnson

On Sat, 7 Sep 2002 19:15:48 -0500
"Tony Maro" wrote

Show quoted text 7 lines
I just finished a component that turns a common TEdit control into one with a drop-down calendar when double-clicked, aka MS Money. Everything works great, but I don't know how to make it appear in the VCL in Lazarus. Right now I have to create it at runtime. I've looked through the Lazarus sources, but have no clue where to start. Can someone point me in the right direction?

There isn't really a right direction yet.. To my knowledge Packages and Registering aren't really supported yet. To use it we have to include it in Lazarus, so either you modify your Sources and recompile to include it, or if its a control which is expected to be part of the LCL anyway, you can send it into someone who can add to CVS. I think it should go in CVS, since Delphi, if not Kylix, has a DateTimePicker component.. but as I haven't used it in awhile I am not positive. To modify your local sources to include it, you need to add it to the LCL, and then include it in the Lazarus File which registers it. I will give you the way I know how.. there may yet be an easier way, but I don't know.

1.) Put the Source File in the LCL directory
2.) Add it to the Uses section of lcl/allunits.pp
3.) Add it to the implicit units section of lcl/Makefile.fpc 4.) Run fpcmake in the lcl directory
5.) Add the file to the uses section of IDEComp.pp 6.) In IDEComp.pp, RegisterStandardComponents, insert a Register Line somewhere amongst the others listed, of the format :

  RegisterComponents('Misc',UnitName,[ComponentName]);

7.)You should probably make a diff of the lazarus directory which can reapply these changes later.. backups are good! ;-)

8.) make clean all

It should now be available... I know, rather convoluted, but eventually we'll have a better way of doing it I am sure.

Anyone out there who knows any more on this info than me, feel free to tell me!

Andrew

_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply by email

Tony Maro

I just finished a component that turns a common TEdit control into one with a drop-down calendar when double-clicked, aka MS Money. Everything works great, but I don't know how to make it appear in the VCL in Lazarus. Right now I have to create 've looked through the Lazarus sources, but have no clue where to start. Can someone point me in the right direction?

Thanks,

Tony

<<winmail.dat>>

Reply by email

Tony Maro
There isn't really a right direction yet.. To my knowledge Packages and Registering aren't really supported yet.

Well that's not a surprise, really... They don't call it beta for nuthin!

Show quoted text 5 lines
if its a control which is expected to be part of the LCL anyway, you can send it into someone who can add to CVS. I think it should go in CVS, since Delphi, if not Kylix, has a DateTimePicker component..

Mmm... Probably not. It's a cool control, but the ultimate goal is to make it data aware once that's a possibility, so there would be major changes - or at least a new ancestor. I've also made it optional to "Americanize" dates (MM-DD-YYYY like any good human would do! ;-) and offer different separators (MM/DD/YYYY). I'll post the unit to my website soon and let you guys decide. It uses a Tcalender within it, and I'm not quite happy with how that component functions in some ways, so I might just copy over much of the Tcalendar code into a new object and start it fresh (or at least inherit a different object from it, but I think that may be dangerous considering the development status.) I haven't used Delphi since V4, and there was no datepicker in it. It's also still got an issue that I can't get fsstayontop or showmodal to work to make it stay on top!

1.) Put the Source File in the LCL directory

..... Snip .....

8.) make clean all

Wow! Well, I will certainly try that (except the diff part - that's over my head. But I can always redownload the CVS if I screw it up.) But, I'd recommend accelerating the development of this feature. Think about all the user created components for Delphi. I think Lazarus is finally reaching a stage where user generated components could quickly take off. I'm already working to convert the components I wrote years ago. Well, all except the TDirectXPanel I did - LOL! If I'm using the CVS downloads and want to update - well there goes all my component install changes, I assume.

Considering I've never programmed in Linux before - mainly because I don't do C - I'm just eating this up! Sure there's still a few glitches and workarounds, but I'm already making usable software and components. Making it easier for users to make their own components might just be a huge shot in the arm for Lazarus. If a user didn't have a component he needed, he'd be more likely to go convert an old freeware Delphi component to his uses, too.

With this in mind, it might be nice to start two lists online - one of the "STANDARD" included components and one of the user created components with download links. Or at least a list of the STANDARD components so people won't bug the developers of Lazarus about someone else's component (well, maybe won't bug them as much.) You might want a standard warning too that if you inherit from any STANDARD component don't be surprised if a later update breaks your descendant.

-Tony

Reply by email

Mattias Gaertner
to Tony Maro
> There isn't really a right direction yet.. To my knowledge > Packages and > Registering aren't really supported yet.

Basic registering works.
Packaging is the problem. Maybe it is possible to use libs instead to get a basic packaging.

Mattias

Reply by email