Jump to content

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.
 

Link to post
Share on other sites
  • Administrators

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)

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.

 

 
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...