Very Hot Topic (More than 25 Replies) What I'm working on (Read 3063 times)
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
What I'm working on
Nov 23rd, 2005 at 8:13pm
Print Post Print Post  
The other day I offhandedly remarked on the 2.0 feature I was working on. I got a couple of replies here on the forum and a few email replies as well. So I thought I'd keep those interested up to date.

If any of you want to post about what you're working on - feel free.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #1 - Nov 23rd, 2005 at 8:23pm
Print Post Print Post  
Well, I wrapped up a few details with the human readable /editable macros I was working on. I'll probably have to revisit them to make the event names a little less long. But they work and Sesame can still read the 1.1.3 binary (non-editable) macros and translate them into something editable using a text editor.

I put in a new command line option "-user_param" that allows you to pass in your own command line parameters. There is an .ini file entry for it as well. You can have up to 1024 of them. Then there is a SBasic functions that can retrieve them by index. So basically, you can start Sesame, like so:
Code
Select All
sesame -user_param Hello -user_param Goodbye Customers.db
 



And then in SBasic:
Code
Select All
var aa as string

  aa = @UserParameter(1)
  writeln("This is first: " + aa)
  aa = @UserParameter(2)
  writeln("This is Second: " + aa)
 



The result would read:
Code
Select All
This is first: Hello
This is second: Goodbye
 



Today, I also changed the button-bar buttons in SDesigner so they match the 2.0 buttons in Runtime.

I also added an optional parameter to @ASynchShell, so that you can specify a "verb" - like "open", "print", or "edit" and then the OS will use that verb with the file association to do the appropriate thing with the file or command. If you leave it off or set it to blank (""), it does the "open" verb - as it always has.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #2 - Nov 24th, 2005 at 5:27pm
Print Post Print Post  
Well, I know its Thanksgiving...but, since a customer just asked for it, I'm adding an automatic way to check if a LE value is unique for that LE in Sesame 2.0.

Basically, you set one of the LE attributes in Designer to be "Unique". I've set up what we need in Designer and on the database engine. I still have to set up some stuff in the Runtime user interface to detect the condition and call the engine to make the check, and then notify the user if the value is not unique.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: What I'm working on
Reply #3 - Nov 24th, 2005 at 5:34pm
Print Post Print Post  
Mark

Sounds like when you are done, we will all have a lot to be thankful for.

Happy Thanksgiving to you and anyone else "checking in."
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #4 - Nov 25th, 2005 at 7:00pm
Print Post Print Post  
Well I got the unique LE stuff working and wrapped up. Remember to use it sparingly - it does have to check with the engine when the user changes (and leaves) an LE.

Today I'm working on entry templates. You know, like (###) ###-####. I have the runtime side of it working pretty well. I still need to manage the delete key a little better. But the normal keys, the left and right cursor keys, and the backspace are all working as they should. I still need to put in a provision for it in SDesigner. The backend portion (on the engine) where we store the actual template has been in there since before 1.0 - just waiting for me to get around to it.

On a human interest note - my wife is off at her bookstore (she has a used bookstore in town). And wouldn't you know it, her furnace has decided not to work. Its about 20 F degrees out on the biggest retail shopping day of the year. Brrrrrr! To make matters worse, the landlady is out of town and its (more or less) a holiday.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: What I'm working on
Reply #5 - Nov 25th, 2005 at 8:01pm
Print Post Print Post  
Quote:
I still need to manage the delete key a little better.

I know what you mean. The delete key was the trickiest part for me to deal with when I made my own custom template code for a Zip Code LE.

I'm sure you're dealing with machine code or something else other than SBasic, but this is the SBasic code I ended up with to get it to work properly.

Code
Select All
[Global Code]
stat sElementLength as int


[Zip Code :: On Element Immediate Change]
var vPos as int
var vStr as string

vPos = @CursorPosition(ThisElement)
vStr = @Num(ThisElement)

if vPos = 6 and (@Len(vStr) > sElementLength)
	vPos = 7

if @Len(vStr) > 5
	vStr = @Lt(vStr, 5) + "-" + @Mid(vStr, 6, 4)

ThisElement = vStr

CursorPosition(ThisElement, vPos)

sElementLength = @Len(@Num(vStr))
 

  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #6 - Nov 25th, 2005 at 8:20pm
Print Post Print Post  
Yeah, like all of Sesame, it is written in C++. Basically, the designer supplies a template, then as the user types, the entire value of that LE is scanned against the template. If it doesn't match the template condition, the character is replaced by the template character.

So far I have:
# = any numeral
@ = any alphanumeric
* = any character at all
> = stop "templating" - allowing anything after this point

and of course anything that does not match any of the characters above in the template is inserted as a constant. So if you wanted a US phone number, you could have a template:
(###) ###-####

with 3 numeral extension:
(###) ###-#### Ext. ###

with notes (like: "do not call after 10:00 p.m.")
(###) ###-#### >
Note: as long as the cursor is on or past the ">" the user can type whatever they like.

You could even create a templete like:
Home: ###-####  Work: ###-####

When moving around in the field (Left, Right, Backspace) the cursor will hop over any of the constants in the template. So, in these examples the cursor will hop over the words "Home:" and "Work:" In the examples above the cursor hops over the "(", ")", the space, and the "-". The constants cannot be deleted or moved.

Please remember though, that not all countries use all numeric postal codes, and not all phone number are 10 digits long. So use this with a real eye to the unexpected, though correct information.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: What I'm working on
Reply #7 - Nov 25th, 2005 at 9:53pm
Print Post Print Post  
Quote:
> = stop "templating" - allowing anything after this point

Great feature. This would be good for a phone number LE where you may occasionally want to add something like "Ext: 123" after the templated phone number, but don't want every record to display the "Ext:" if there is no extension.

That makes me wonder...
Would it be too complex to have a template feature that would only show the last part of the template if there were enough characters to justify it displaying, like in the example above? For instance, if more than 10 numbers are typed, the template would then display the "Ext:" and place the 11th number after it. But if only 10 numbers were typed, the "Ext:" would not be seen.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #8 - Nov 25th, 2005 at 11:29pm
Print Post Print Post  
Something like that would be neat. I'd also like to add a feature that says something along the lines of: "allow [n] number of instances of [x]". But in either case, it might be better in SBasic than in a little "mini-language" like a template codes.

I think it is important that the visible template in some way resemble the final result. I might allow something extra surrounding one or more templates. Lets say, we want the templates to be able to accept more than one format. That could be expressed as:

[(####) ###-####] OR [(###) ###-#### EXT ###]

In the case above, either template would be acceptable to the form. But what do you show the end user?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #9 - Nov 26th, 2005 at 1:10am
Print Post Print Post  
Well I got the SDesigner side of the entry templates working. I still have to figure out how to get it working with the new advanced selection options, where you can select by different LE attributes. So, at the moment you can't say, "select all the LEs that have this particular entry attribute". But, I'll get it.

Right now entry templates are only used by single line left justfied text LEs. I'll have to decide if I want the right justifieds, too. Since most of those are monetary or numeric and already do a bit of formatting on their own, it could get pretty tricky.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: What I'm working on
Reply #10 - Nov 26th, 2005 at 2:47am
Print Post Print Post  
Great template ideas Mark.

Do you think we can have an option about storage with or without template included?  Or perhaps both? 

Will make it easier for merges and reports providing option to use the raw data or to use the data with templates.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #11 - Nov 26th, 2005 at 2:57am
Print Post Print Post  
Quote:
Great template ideas Mark.

I hope so. In any case, thanks.
Quote:
Do you think we can have an option about storage with or without template included?  Or perhaps both? 

Hadn't considered it. Maybe. I'll look.
Quote:
Will make it easier for merges and reports providing option to use the raw data or to use the data with templates.

So, if your template is (###) ###-#### Ext: ###, which would normally return (for example): "(123) 456-7890 Ext: 981", you would like an option that would cause it to return: "1234567890981"?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: What I'm working on
Reply #12 - Nov 26th, 2005 at 2:22pm
Print Post Print Post  
  Quote:
So, if your template is (###) ###-#### Ext: ###, which would normally return (for example): "(123) 456-7890 Ext: 981", you would like an option that would cause it to return: "1234567890981"?

If it has to be only one or the other, I vote for the full template format, rather than the raw data only. Otherwise, every report would need programming (or a template feature in reports) to achieve readable information.

This is the reason I never use the Q&A templates. I always format these types of fields with programming, so that when I want to use them in reports or merge them into a document, they will display properly.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #13 - Nov 26th, 2005 at 3:08pm
Print Post Print Post  
I agree - if it has to be one or the other. I'd like to offer options without loading down designer with too much complexity, or making the template mini-language too hard to read or hard to remember.

Its one of several things I dislike about templates. They always seem to depend on a mini-language which must be memorized. Not only the designer, but the end user also has to have some pre-knowlege of the template format - otherwise they end up guessing and getting frustrated. In other words, they need to know that "#" means they can only type a number here.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #14 - Nov 26th, 2005 at 6:17pm
Print Post Print Post  
Well Carl, I got the feature you asked for in the templates. If any template codes appear after the stop templating code (">"), that portion becomes optional, and if it is not filled in - it is truncated off. So if you have:

(###) ###-### > EXT: ###

and the user fills in:

(123) 456-7890 EXT: ###
(note they didn't complete the extension)

Then the LE will display and return:

(123) 456-7890
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: What I'm working on
Reply #15 - Nov 26th, 2005 at 9:01pm
Print Post Print Post  
Quote:
So, if your template is (###) ###-#### Ext: ###, which would normally return (for example): "(123) 456-7890 Ext: 981", you would like an option that would cause it to return: "1234567890981"?
Yes, that is correct.

Combining that with your recent "optional" section after ">" would be perfect.

Developers/programmers will usually prefer the option to get raw data and do what they want with it.  But many end users  just want to select the formatted info and not need to learn how to use Left/Right/Mid, etc.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: What I'm working on
Reply #16 - Nov 26th, 2005 at 10:59pm
Print Post Print Post  
AWESOME!!! 8)

I knew you could do it. This will make for a much cleaner look if there no extension.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #17 - Nov 27th, 2005 at 2:13am
Print Post Print Post  
Quote:
Yes, that is correct.

Combining that with your recent "optional" section after ">" would be perfect.

Developers/programmers will usually prefer the option to get raw data and do what they want with it.  But many end users  just want to select the formatted info and not need to learn how to use Left/Right/Mid, etc.



Its certainly doable as a SBasic function. Having it as an option in SDesigner would be substantially more difficult unless I make it part of the template mini-language.


  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #18 - Nov 27th, 2005 at 5:52pm
Print Post Print Post  
Well, today - I'm back at the office. I'm working on two SBasic functions, one that can format a string based on a supplied template, and one that removes the template from a string, also based on a supplied template.

So:
Code
Select All
str = @TemplateString("(###) ###-####", "1234567890")
 


produces: (123) 456-7890

and:
Code
Select All
str = @DetemplateString("(###) ###-####", "(123) 456-7890")
 


produces: 1234567890
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: What I'm working on
Reply #19 - Nov 27th, 2005 at 6:00pm
Print Post Print Post  
OK Mark -

You're just doing too much so how about a real challenge?

Convert words (like some people like to use for memory retention purposes) such as 813-LAKEMOTEL  (813-LAK-EMOT) to numbers.   lol

JUST KIDDING!!!!

Don't you need a beta tester for version 2.0?   NOT KIDDING!!!!  lol
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: What I'm working on
Reply #20 - Nov 27th, 2005 at 6:07pm
Print Post Print Post  
Those look great, Mark!

I would think that should cover everyone's point of view. It wouldn't matter whether the data is in template format or not, these make it easy to change the data to the opposite format if needed.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: What I'm working on
Reply #21 - Nov 27th, 2005 at 10:21pm
Print Post Print Post  
Mark, once again you are spoiling us! Grin

1.  Only drawback that I see is that the user must know the existing template to use @DetemplateString, is that correct?  What happens if a template character(s) or position(s) is entered that is not correct?  Maybe it should just take a value of characters to be excluded from the returned value, like @DetemplateString("( -)",LEname) on a phone number element or @DetemplateString("-",LEname) on a US 9 digit zipcode element?,

Providing functions like this is the option vs. adding a new box to the Editor like Visibile, Initial Value?  If a new box was available, then @DetemplateString could just be passed the LE name and not require the user to know the value of the existing template.

2.  I am assumming that "12134567890" can be replaced by an LE name.

3.  And future version will allow us to pick from saved Template Specs like Retrieve Specs ?

Thanks again for your responses to our never ending requests.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #22 - Nov 27th, 2005 at 10:49pm
Print Post Print Post  
The template (as well as all other info about any LE) is available to be get or set using the Attribute and @Attribute functions. So, yes - usually one would:
Code
Select All
var template as string
var str as string

template = @Attribute(MyLE, ATTR_ID_ENTRY_TEMPLATE)
if(not @Error)
{
  str = @DeTemplateString(template, MyLE)
}
 



If, for example, you wanted to eliminate the dash, but not the parenthesis, you would use: "*###* ###-####" as the template, instead of: "(###) ###-####". Any position containing a "*" will accept whatever character is at that position in the source string. That way you do not inadvertantly eliminate characters that were allowed by the original template and entered (correctly) by the user.

Templates are a design time spec, like custom help, tooltips, formatting, etc... Not a runtime spec, like import, export, mass update, etc... So, no - the end user cannot edit, load, or save templates. Only the designer can do that.

But, the programmer, using the Attribute function, can dynamically alter/edit/disable/enable templates as well as all of the other LE attributes.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: What I'm working on
Reply #23 - Nov 28th, 2005 at 1:35am
Print Post Print Post  
I think I have got it.......Hope that you provide a number of examples in the documentation.  I think that this one will take some trial and error work to fully get a handle on it.

Thanks again Mark.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #24 - Jan 9th, 2006 at 3:31pm
Print Post Print Post  
The Cow (Mark),

You must be busy (as always) but I miss seeing this post updated. I know the post sort of morphed into other posts but those seemed to have faded also.

Hope all is well and was just wondering “What are you working on”


  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #25 - Jan 9th, 2006 at 3:58pm
Print Post Print Post  
Quote:
The Cow (Mark),

You must be busy (as always) but I miss seeing this post updated. I know the post sort of morphed into other posts but those seemed to have faded also.

Hope all is well and was just wondering “What are you working on”



Yup, just been too busy to post. Currently I am working on search optimization for relational databases.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: What I'm working on
Reply #26 - Jan 9th, 2006 at 6:56pm
Print Post Print Post  
Just wanted to mention that I've been enjoying this post, as well. As our applications continue to develop, it's great to know where Sesame is headed so we can plan our programming (and prioritize) accordingly.

Not to mention, its fascinating. Please keep up all the hard work Smiley

Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What I'm working on
Reply #27 - Jan 9th, 2006 at 7:22pm
Print Post Print Post  
I was enjoying the feedback as well.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged