1. 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)

Discussion in 'Development' started by altair, Oct 11, 2017.

  1. altair

    altair New Member

    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,
     
  2.  
  3. RealHeavyDude

    RealHeavyDude Well-Known Member

    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.
     
  4. altair

    altair New Member

    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...).
     
  5. RealHeavyDude

    RealHeavyDude Well-Known Member

    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.
     
  6. altair

    altair New Member

    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.
     
  7. RealHeavyDude

    RealHeavyDude Well-Known Member

    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.
     
  8. altair

    altair New Member

    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. Cringer

    Cringer ProgressTalk.com Moderator Staff Member

  10. altair

    altair New Member

    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 ;)
     

Share This Page