• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Question Smartobject Into A Classic Dialog Window (non-smartwindow)

#1
Hi,


I would like to know if it is possible to insert a SmartObject into a a "container" which is not "smart".

In my case I would like to insert the pure4gltv SmartObject into a dialog (not a smartWindow).
The dialog (a screen designed as a Dialog-Box) is an already existing screen.
It contains treeView / ImageList OCXs, which I would like to replace by a pure4gltv smartObject.

It seems that the Progress AppBuilder prevents me to drag and drop the SmartObject in my Dialog (the mouse cursor / point is displayed as a "cancel" or "forbidden" icon).

Is there a way to put a SmartObject in a dialog / window screen ("non-smartWindow") ?
Is it possible to just add a "container" inside my dialog-box so i can place my SmartObject in it ? If so, How to proceed ?
Or am I obliged to transform my current dialog-box screen into a "smart dialog" ? If so, How to proceed ? (again :) )

Thanks in advance.


Regards,
 

RealHeavyDude

Well-Known Member
#2
Hi Altair,

the standard containers miss the functionality to instantiate the smart objects - their frames can only handle widgets. When you drop a smart object on a smart window or smart dialog you might notice that the AppBuilder will automatically maintain the read-only "adm-create-objects" procedure for you. It will maintain code that will run other smart container functionality to construct, reposition and resize the smart object you've dropped on the container. That is because smart objects are not widgets, they are persistent procedures. All of this functionality is missing in a dialog or window.

In theory it should be possible to include the "smart" functionality into a dialog or window - but I've never done something like this, means, your milage may vary ...

In short, yes it should be possible, but, no, I don't think it can be easily achieved.

Heavy Regards, RealHeavyDude.
 
#3
Ok.

I'd take a look on the differences between an empty "SmartDialog" and an empty "Dialog" source codes generated by the AppBuilder, and yes I see this adm-create-objects plus many pre-processor constants and includes...
It seems to be a lot to add into the standard dialog, which more look like dirty "Do-it-yourself" work... but I'll give it a try.

Also I've tried to play with the smart container "SmartFrame", but even this I am unable to put it on a standard "Dialog" screen (therefore, I don't see the use of smart container...).
 

RealHeavyDude

Well-Known Member
#4
The smart frame is a persistent procedure too. You can only drop it onto a smart window or smart dialog for the very same reason.

There is a fundamental difference between widgets - which ABL built-in objects - like a fill-in or a combo-box, and smart objects of the ADM2/Dynamics framework - which are all persistent procedures. While you can run any smart object yourself persistent in any ABL code, all the supporting functionality is missing and you need to roll it yourself. This is possible, but it takes some deep knowledge of the ADM2/Dynamics framework in order to do so.

Heavy Regards, RealHeavyDude.
 
#5
Thanks,
I was thinking SmartFrame was a container to accomodate / integrate SmartObject within classic Window / Dialog screen. No

I've tried, and finally achieved to put the Smart Object inside my "normal" Dialog screen : I've added the 2 includes form ADM2, the adm-create-objects procedure, comments, preprocessors tags and also variables.
The amount of work and research to achieve this and the result (do not look that good but seems to work to some extent) does not worth the effort from my point of view :-(

I may look for an other alternative (maybe .NET : to replace the OCX TreeView in my case). If this is not satisfying I will revert to the SmartObject in the normal Dialog exercise.
 

RealHeavyDude

Well-Known Member
#6
The amount of work and research to understand frameworks instead of hardcore coding each bit and byte is always a trade off. For one, in the case of ADM2/Dynamics most Progress customers I knew abandoned them for that very reason. Secondly, Progress was notorious for not providing sufficient documentation on them leaving their customer with a very, very steep learning curve.

Heavy Regards, RealHeavyDude.
 
#7
Ok. I'll give up the SmartObject option. Don't want to go for an unspported feature for future development.
Maybe .Net is the best / more future-proof option ?
Is it possible to integrate a .Net widget in an existing classic ABL .w ? (OpenEdge 11.5.1, I can work with OpenEdge Developer Studio as well).
 
#9
Ok, thanks.
In my case, the existing .w screen is already included in an other bigger .w screen (a "container"), so maybe it can get more tricky than expected if I only replace the widget it self :/
Is it possible to mix ABL widget + ABL widget together in a .Net Form ? By replacing ABL container, then I keep ABL widget in the .Net form and add a .Net widget ?
I won't be able to rewrite from scratch all the code base I need to modify. I would like to minimize as far as possible the change to bring (scope is only to replace one widget in each existing .w screen, not migrating to brand new screen).


PS : we are going out of subject. If needed I can close this topic and fork to a new one more specific to .Net usage ;)
 

Osborne

Active Member
#10
Regarding this question?:
Is it possible to mix ABL widget + ABL widget together in a .Net Form ? By replacing ABL container, then I keep ABL widget in the .Net form and add a .Net widget ?
Do you want to have an ABL widget that is not a window in a .NET form? If so, then this is not possible:

Progress KB - Can .NET controls be placed on ABL frames?
It is not possible for .NET forms to parent ABL Widgets. The single exception to this is the ABL Window widget.
However, if you create a simple ABL window, add the ABL widgets to that and then embed/parent the ABL window you can have ABL and .NET widgets existing in the same .NET form. Post #4 has a simple example where an ABL button and .NET button appear in the same window:

Question - Label Name in the button
 
#11
Regarding this question?:

Do you want to have an ABL widget that is not a window in a .NET form? If so, then this is not possible:

Progress KB - Can .NET controls be placed on ABL frames?
No, I would like to have in the same screen / container (so whatever possible : ABL Window, ABL Dialog, .Net Form) both ABL widgets and .Net widgets/controls.
Quite the same as of the OCX in the past, but here using .Net (and taking account of the constraints of .Net).
(sorry, in my previous post I said "mix ABL widget + ABL widget together " :confused: )

However, if you create a simple ABL window, add the ABL widgets to that and then embed/parent the ABL window you can have ABL and .NET widgets existing in the same .NET form. Post #4 has a simple example where an ABL button and .NET button appear in the same window:

Question - Label Name in the button
This looks like what I want to achieve. I will take a look at it. thanks :)