KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

KiXforms Designer Open/Save Implementation

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Stevie
KiXforms Supporter
KiXforms Supporter


Joined: 04 Jun 2003
Posts: 109

PostPosted: Fri Jan 16, 2004 3:35 pm    Post subject: KiXforms Designer Open/Save Implementation Reply with quote

As of now the Designer is able to open existing scripts. Before I break my arm patting myself on the back there are a couple of issues regarding the implementation I've chosen.

First, the script must have specific comment tags to let the Designer know where the start and end of the UI control creation portion of the script is located. That is the only section that the Designer looks at to load the script.

When saving the script back, this tagged section is replaced with the new script generated by the Designer. The problem comes into play when you try to manually place additional lines into the control portion. Example:
Code:
$Button1 = $TabPage1.Controls.Button("Button1", 110, 30, 75, 23)
$Button1.OnClick = "MyFunction"
The OnClick event is not a property controlled by the Designer so when you manually add that event it will get overwritten when the script is saved.

As for events, I'm working on an exception so that any events added will be accounted for and placed back into the script. My question is what other types of items should also be accounted for and included? Again, worst case, any of these items would have to be placed outside the tags. The only downside to that is that information for a given control might exist in two places. Thoughts?
________
Expert Insurance


Last edited by Stevie on Thu Mar 17, 2011 9:15 am; edited 1 time in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Jan 16, 2004 4:25 pm    Post subject: Reply with quote

Well done Steve, no small feat to be sure.

An idea though ( it was suggested in a round about way over at Kixscript.com) What if make the OnClick event a property in the designer (in the XML) ? In the properties windows, we could just type in the function call "MyFunction()" and leave it at that. Then the developer can code MyFunction() later on in the script, outside of the designer tags.

If the OnClick property is described as a string in the XML, will the new designer be able to save and load it ?

-Shawn
Back to top
View user's profile Send private message
Stevie
KiXforms Supporter
KiXforms Supporter


Joined: 04 Jun 2003
Posts: 109

PostPosted: Fri Jan 16, 2004 4:44 pm    Post subject: Reply with quote

Oh sure. If it's defined in the config file then it will show up inside the tags. In fact, if you set the default value to "" then it will only show up in the tags only if you give it a name.

I like that idea. One upshot is that I don't need to bother making any exceptions for script inside the designer tags.

It's settled then. A couple of quick last minute things and I'll mail it to you as a quick QA process and if you give it a thumbs up I'll post it up.
________
Hot penny stocks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group