Jump to content
Sign in to follow this  
IgorSavkic

Form designer improvements

Recommended Posts

Right now form and control definitions, properties and events are stored inside .sfm files. 

In new SMS IDE designer uses Chrome so there's a nice opportunity to update that part, my idea is to store control definitions inside regular html files and have events and SMS specific properties stored inside .sfm file. That would probably be a major upgrade but it would bring so much benefits, for example separation of UI design from code, UI would be handed to designer and I could focus on programming logic. It would also allow to reuse available online templates and libraries, which would shorten development time.

Alternative (perhaps easier to implement) would be build html importer, when you need a new form, select external .html file and IDE recreates it as standard .sfm file, unsupported controls could be mapped to neareast SMS equivalent (for example UL/OL lists would be mapped to ListBox) or to standard div/panel.
 

Share this post


Link to post
Share on other sites

It's an interesting idea, that we could you a static html page as a start point. I think the challenges would be to identify the controls from the "alien" html and tie them to functionality. With simple buttons and edits it's easy, but more advanced, dynamic components are harder (like UL/OL-lists to ListBox)

Share this post


Link to post
Share on other sites

>  I think the challenges would be to identify the controls from the "alien" html and tie them to functionality. With simple buttons and edits it's

> easy, but more advanced, dynamic components are harder (like UL/OL-lists to ListBox)

I would use attributes for that, for example to associate one div to label:

<div ID="OBJ1" data-class="TW3Label" data-comp-name="lblMyLabel"> and from there's it's easy to lookup lblMyLabel control in .sfm file and recreate it properly.

ListBox  itself shouldn't be a problem, treat UL/OL as simple string ListBox and have a loader function to go through all li elements and call LB.Add for them.

ListBox using custom components (for example another form) for items would use custom attributes to write what's necessary for it, and items for it would be added in runtime anyway so no problem of keeping those kind of items serialized to html.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×