Normal Topic Program Editor Syntax Coloring (Read 1094 times)
Frederick_JH
Junior Member
**
Offline


Open Sesame . . . the
magic portal awaits!

Posts: 52
Joined: Jan 26th, 2004
Program Editor Syntax Coloring
Feb 6th, 2006 at 11:48pm
Print Post Print Post  
Hi  all!

I am not sure if anyone else has suggested this as a feature addition to Sesame so I thought that  before I send it to Lantica I would see if anyone else is interested  in this.

I have programed  in other  computer  languages using editors that color code syntax, keywords and the like so  that you  can spot mistakes and follow the programming easier.  The two editors that I have used the most that do this are Kate and Elvis.

Is anyone else interested in something like this? Has this been suggested before?
  

Frederick Henderson*Radio HRGS*Roatan*Bay Islands*Honduras
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Program Editor Syntax Coloring
Reply #1 - Feb 7th, 2006 at 12:53am
Print Post Print Post  
Yup, its been suggested.

We would certainly like to have it there as an option. The main difficulty is that the SBasic will need to at least partially parsed dynamically as the user is typing. The editor widget does support syntax highlighting we just need to hook into it with SBasic's syntax.
  

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: Program Editor Syntax Coloring
Reply #2 - Feb 7th, 2006 at 6:45am
Print Post Print Post  
Hello Frederick......
Do you mean something like this?



I have been planning on making this available as an Editor product, until I saw the presentation of Version 2 at the National Users Conference in October.  At that time, I felt that many tools that I wanted to provide might be provided by the all- powerful Version 2.  So I have stopped development until I see what still needs to be done.

In the meantime, this is an example of what I have been able to work with using some homegrown tools.
  



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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Program Editor Syntax Coloring
Reply #3 - Feb 7th, 2006 at 2:28pm
Print Post Print Post  
Bob,

I have a button that assigns a code to a record much the way your "Record=" code does.  However, mine reads
Code
Select All
vNextNum = @ToNumber(@XLookupR(@FN, "99999999", "Code", "Code")) + 1 



I notice that my 99999999 is in quotes but yours is not.  Is there a difference in performance?  Is one preferred over the other?  What would be the conditions that would require one method over the other?
  

**
Captain Infinity
Back to top
IP Logged
 
Frederick_JH
Junior Member
**
Offline


Open Sesame . . . the
magic portal awaits!

Posts: 52
Joined: Jan 26th, 2004
Re: Program Editor Syntax Coloring
Reply #4 - Feb 7th, 2006 at 4:31pm
Print Post Print Post  
Hi Bob and all!

Yes, this is exactly what I would like. Bob is this a product that you have created from scratch? How far along where you when you stop development?

Another question has anyone out there made a Sesame synax file for an out board editor that would work on programing exported from Sesame?  If anyone has this I would be interested in it.

Another feature that I would be interested in, in the program editor is a indicator as to the line postion you are currently at. Sometimes with long lines of  code the messages do not  display out to the point where the arrow points to the problem spot. Has anyone suggested this feature yet?

Thanks!

FJH
  

Frederick Henderson*Radio HRGS*Roatan*Bay Islands*Honduras
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: Program Editor Syntax Coloring
Reply #5 - Feb 7th, 2006 at 6:04pm
Print Post Print Post  
For Frederick ------

Syntax highlighting was good up to 1.01.

Has clip library with all commands thru 1.01, alphabetical or in groups as defined in Sesame documentation.  Library clips include syntax with user defined friendly terms, quotes where needed, etc. Double click to insert at cursor.
Examples:
Code
Select All
@MOD(dividend,divisor)
vs.
@MOD(x,y) 

And
Code
Select All
@REPLLAS(SourceString,"LookFor","ReplaceWith")
 vs.
@REPLLAS(m,x,y) 



Can create your own code library
User defined code can be added to library for double-click insertion...
Example:
Code
Select All
//Divide by Zero error
IF DivisorField = 0 Then {
	@MsgBox("DivisorField cannot be 0.","","")
	ThrowFocus(DivisorField)
	} 

And
Code
Select All
//May be inserted on FormEntry and edited for specific elements on this form
//Prevents Auto Creation of New Record in Search/Update Mode
IF @ISNEW THEN {
	IF @UPDATE THEN  {
		// Retreat to the last existing record
		RESULTSETCURRENTPOSITION(@RESULTSETTOTAL() - 1)
		}
	}


//Does Auto Fill of History Tracking Elements and Makes Next Record Number
IF @ISBLANK(Record) THEN {
	IF @ISBLANK(AddedBy)   THEN { Addedby = @USERID }
	IF @ISBLANK(AddedBy)   THEN { AddedBy = "Not Logged In" }
	If @ISBLANK(AddedDate) THEN { AddedDate = @DATE }
	If @ISBLANK(AddedTime) THEN { AddedTime = @TIME }
	Record = @TN(@XLOOKUPR(@FN,999999,"frmName!Record","Record")) + 1
	}

//Makes Some Elements Read Only During Initial Data Entry
IF @ISNEW THEN { READONLY(CertainElements,2) }

//Makes Some Elements Invisible Only During Initial Data Entry
IF @ISNEW THEN { Visibility(CertainElements,0) }

//Prevents Key Element(s) from being Changed by Accident.
IF NOT @ISNEW THEN { READONLY(KeyElement,2) }
 



Has Regular Expressions for Search/Replace.
Can Search/Replace in all modules at once, in all forms at once.

Can create and save macros.  But like Sesame, macros cannot be edited.

Line numbers can be turned on/off on screen and printing.
Lines can be bookmarked, and reversed.

Editor has up to 4 screens synched scrolling.
Does word wrap on/off
Does block select

Handles data import/export files also.
================================
For Infinity:
Sample was provided for sample of syntax highlighting, not for code sample.  Section was taken randomly to show many different highlight features.

Are quotes better in position two, the "key" code?   I am not sure.  The Sesame Programming Guidel shows no quotes on page 39.  The sample shown was looking for a number in a number field.  Is yours looking for a number in a text field?

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Program Editor Syntax Coloring
Reply #6 - Feb 9th, 2006 at 8:10pm
Print Post Print Post  
Quote:
Another feature that I would be interested in, in the program editor is a indicator as to the line postion you are currently at. Sometimes with long lines of  code the messages do not  display out to the point where the arrow points to the problem spot. Has anyone suggested this feature yet?


The cursor position is displayed in the 2.0 Programming Editor. You can even type in a position and hit enter to move to that position, same as the Line box works in the current version.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Frederick_JH
Junior Member
**
Offline


Open Sesame . . . the
magic portal awaits!

Posts: 52
Joined: Jan 26th, 2004
Re: Program Editor Syntax Coloring
Reply #7 - Feb 9th, 2006 at 11:23pm
Print Post Print Post  
Good to hear that it is in the elusive 2.0.   Grin

  

Frederick Henderson*Radio HRGS*Roatan*Bay Islands*Honduras
Back to top
 
IP Logged