Home » Developer & Programmer » Forms » Going about with creating reusable components (Forms 6i)
Going about with creating reusable components [message #350779] Fri, 26 September 2008 05:47 Go to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hi guys,

Since I had some free time lately, I was making fun with Forms and trying to setup a DatePicker application. Pretty cool in fact and I eventually managed to set it up neat and sexy...but it still remains a simple forms application with an .fmb extension. I was wondering how I could actually make this thing portable to other forms, like I could drag and drop it on another form just like an OLE or bean object.
I have uploaded a screenshot of this little application so you may have an idea. As you can see there's this text item on the main canvas for which a click on the button labelled '#' will open the second canvas with the calendar grid (actually a plain datablock) from which to choose dates from.

I would be glad if someone could tell me this is all possible and I would also prefer a pure Forms solution as far as possible.

thanks in advance,
Didz (Didier)

[Updated on: Fri, 26 September 2008 05:49]

Report message to a moderator

Re: Going about with creating reusable components [message #350951 is a reply to message #350779] Sun, 28 September 2008 01:34 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

You can create an Object Group(MYOBJGRP) and store all the canvases,blocks,windows etc. you have used in your form. Create an object Library(MYOBJLIB.olb) and copy this object Group there are save the library. when ever you want to use your program ,subclass this olb to the form.see attached pic.
  • Attachment: 1.JPG
    (Size: 155.20KB, Downloaded 550 times)
Re: Going about with creating reusable components [message #351010 is a reply to message #350951] Sun, 28 September 2008 23:38 Go to previous message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hi Mudabbir,

thanks a lot and this solution looks great. How's been your week-end by the way? Mine was cool.

anyway I have some questions though regarding the portability of the behavior of the application. You proposed that I move all the required blocks, canvases, programs units and so forth to an object library so I can reuse the Datepicker in another application.
Somehow, I believe that there are two major shortcomings to this solution:

1] Logic implemented in PRE-FORM and the like triggers will have to be dealt with in another way (this is feasible actually)

2] The Text Item and Push button actually making up the Datepicker cannot be 'extended' rather than being shipped with the underlying canvas. To be clearer, it's just like I believe (I might be mistaken) it cannot be possible for my datepicker be implemented in another application as a sole component that I would drag and drop just like a pushbuton or some of the kind. Maybe this solution would be more appropriate for a standard dialog like a login page or a feedback form rather than a component like a DatePicker extending a normal TextIem with the capabilities of popping-up a calendar on demand.

...see what I mean? Confused

Anyway thanks a lot and this doesn't mean I'm dumping your proposal; it's still worth.

cheers mate,

Didz
Previous Topic: How to use right key(-->) move the focus on the third button?
Next Topic: when i run the form in form9i i am getting eror
Goto Forum:
  


Current Time: Sun Feb 09 07:51:04 CST 2025