Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Multiline Text element with Carriage Return (Read 1952 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Multiline Text element with Carriage Return
Apr 28th, 2007 at 9:36am
Print Post Print Post  
Multiline text box element with carriage return in it, takes long time to exit. Hour Glass comes up and for a time being it seems computer has frozen. Tried with several other applications, the same delay in exiting such element persists.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #1 - Apr 28th, 2007 at 11:46am
Print Post Print Post  
I've never seen this. What do you mean by "exit"? What is the value in the text box when you see this behavior?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Multiline Text element with Carriage Return
Reply #2 - Apr 28th, 2007 at 4:34pm
Print Post Print Post  
Hi Erika,
I am struggling with proper display in text element with text in text box is more than what it displays. That brought to me experiment with multiline text box. Initially it seemed, it was helping but I still could not pin down as to how to make it display the beginning part and not the end part.

It is not really just the multiline text element with carriage return but it struggle when it try to execute xlookup ( ) from the element with key value that contains @NL ( ). I have eliminated that by putting conditional statement.

If @in (ElementName, @NL ( ) < 1 then
     {
              xlookup (  )
     }

I understand that one does not normally do xlookup () from element value that contain @NL ( ) but in given circumstances it happened to interfere the normal flow.

Unfortunately, I was testing this on the various element that happened to xlookup ( ) statement.

I profusely apologize for reacting a little too quickly. However, I am still faced with the problem of proper display of beginning of text uniformly in the small text box elements. What are the rules of this display? It seems to display ok sometimes but not other time... and I know there is no random actions with computers!

Will appreciate your help.

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #3 - Apr 28th, 2007 at 7:49pm
Print Post Print Post  
Bharat_Naik wrote on Apr 28th, 2007 at 4:34pm:
However, I am still faced with the problem of proper display of beginning of text uniformly in the small text box elements. What are the rules of this display? It seems to display ok sometimes but not other time... and I know there is no random actions with computers!


Both Mark and I have seen the issue you describe on occasion, but we can't seem to make it happen now. We know it does occur, but we can't find the right combination of circumstances. Can you tell us how to reliably create an example of this so we can work on fixing it? Simply having a long value in a text box doesn't do it.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Multiline Text element with Carriage Return
Reply #4 - Apr 29th, 2007 at 1:27am
Print Post Print Post  
Erika, I have worked to eliminate this. At times it looks random but I know better. Following are the definite rules to produce and make it to display right at least for the time being.

1. The text box has to be smaller than the text it displays.
2. If it is read only element where you cannot go in and condition 1 is right, it will display the end
3. If the previous element in the tab order lookup the value and condition one is right or it is multiline text box - the cursor will go to the end and if you go forward with out changing value, the display will remain as it is - that end is displayed without the beginning even when you leave the element.

How the case 3 can be temporarily corrected?
a. If you make any change in the element before go to next element
b. Take the cursor before the first letter in that element and then go to other element.

4. This seems to have relevance with where does the the cursor ends up when you navigate. When the cursor lands at the end position after doing lookup (or may be calculation) and you move forward without changing, that produces the fertile ground for such display problem.

5. Creating text box multiline does not resolve this problem.

I hope I am clear about the above. Using above, I could always produce it predictably.

I hope others will also experiment with this to nail down the culprit. In the meantime, I am looking forward to some workaround method without making some drastic changes in the application. Thanks for looking into this.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #5 - Apr 29th, 2007 at 11:58am
Print Post Print Post  
Thanks, Bharat. That info should help us track this down.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Multiline Text element with Carriage Return
Reply #6 - Apr 29th, 2007 at 11:59am
Print Post Print Post  
On Element Change Event
Code
Select All
CursorPosition (ThisElement, 0)
 



As a workaround the above code works to correct the display even in the element where you do not ever go and just used to display the text, even readonly element. 

One might wonder why do I have to place the longer text when I want to see just the beginning part of the text. The main reason I have to do this as merge-print with wordmerge in Sesame does not allow me to perform conditional merge that I could do with Q&A.

Growth_Weight: 90th percentile compared to the same age group

What I want to see is 90th but I need to merge the whole value, as the patient is more than 15 years of age I do not need this growth parameter.

If I just merge just 90th, because of inability to conditional merge as it stands now with Sesame, in above 15 years age group - the merge data will be null but ....

*merge* percentile of as compared to the same age group (This will create a problem, when if value is null, I want the whole line to be eliminated.  It will print "Percentile of as compared to the same age group"

I could only do that if I have whole field with everything in the  mergefield that way nothing will be printed when value is null in the field.

==========

In the element where you pass through right after lookup ( ) command executed and cursor falls at the end of the line or the last character in the case of multiline element, the following will work as workaround.

On element Enter Event
If @CursorPosition (ThisElement) > 0 then
     {
             CursorPosition (ThisElement, 0)
     }

If you add text or modify the current element then display corrects itself anyway. The above will work even if you do not have to change anything.

What is the shortcut key to bring the cursor to the beginning of the text in the element in the multiline element?
     





  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #7 - Apr 29th, 2007 at 12:22pm
Print Post Print Post  
Bharat_Naik wrote on Apr 29th, 2007 at 11:59am:
The main reason I have to do this as merge-print with wordmerge in Sesame does not allow me to perform conditional merge that I could do with Q&A.


While the WordMerge code included as a sample simply merges the list of fields, it can certainly be adjusted to respond to different conditions to a far greater degree than Q&A was able to do. You can output whatever values you need to the merge file based on whatever conditions you require. If you are merging to Word, you can also edit your Word fields to respond to conditions.

WordMerge is written to be generic, so it does not include conditions that would only apply to specific forms, but that doesn't mean you can't adjust it to be specific to your needs.

I'm not sure which version of WordMerge you have, but as an example, here is a way to adjust one version of the PrintCurrentRecordOnly() routine to respond to a simple condition.

Original Code
Code
Select All
While F[n] <> ""
{
	vHeader = vHeader + F[n]   + "^"
	vData   = vData   + @(F[n]) + "^"
	n = n + 1
} 



Adjusted Code:
Code
Select All
While F[n] <> ""
{
	vHeader = vHeader + F[n]   + "^"
	  If F[n] = "Growth Weight"
	  {
		    If @F[n] = ""
		    {
			    vData   = vData   + "Not Applicable" + "^"
		    }
		    Else
		    {
			    vData   = vData   + @(F[n]) + "^"
		    }
	  }
	  Else
	  {
		  vData   = vData   + @(F[n]) + "^"
	  }
	n = n + 1
} 



I know the above is not your exact case. The point is that you can adjust to whatever your exact case happens to be.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Multiline Text element with Carriage Return
Reply #8 - Apr 29th, 2007 at 2:20pm
Print Post Print Post  
Thanks Erika. I will look into this a little closer. I have not worked to deal with my printing as of yet, but did test successfully to print out certain forms using the very first wordmerge that required every field to be hard coded.  I will keep in mind that wordmerge can be modified to suit my requirements. Thanks again.

What is the ShortKey to go to the beginning and go to the end of the text in the multiline element? (not just beginning of line and end of the line.)
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #9 - Apr 29th, 2007 at 2:44pm
Print Post Print Post  
Bharat_Naik wrote on Apr 29th, 2007 at 2:20pm:
What is the ShortKey to go to the beginning and go to the end of the text in the multiline element? (not just beginning of line and end of the line.)


ALT-Home and ALT-End.
  

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



Posts: 2530
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #10 - Apr 29th, 2007 at 4:35pm
Print Post Print Post  
Bharat,

I changed the behavior in 2.0 so that a text element that is changed in programming does not display the end of the string, but displays the beginning. I am a bit hesitant in that this appears to be intentional and meant to meet a requirement, possibly to allow the user to easily see any changes that are being made to their data by the programming.

The "fix" will be in the next Beta release of Sesame 2.0.
  

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


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Multiline Text element with Carriage Return
Reply #11 - Apr 29th, 2007 at 4:55pm
Print Post Print Post  
Mark, Thank You.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Multiline Text element with Carriage Return
Reply #12 - Apr 29th, 2007 at 5:35pm
Print Post Print Post  
Mark, at one time we would move from element to element and whole text in the element would be marked (selected)  and if you want to add something, you use right arrow and keep typing. I liked that as an option. When did we do away with?
« Last Edit: Apr 29th, 2007 at 6:37pm by Bharat_Naik »  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #13 - Apr 29th, 2007 at 6:44pm
Print Post Print Post  
Bharat_Naik wrote on Apr 29th, 2007 at 5:35pm:
Mark, at one time we would move from element to element and whole text in the element would be marked (selected)  and if you want to add something, you use right arrow and keep typing. I liked that as an option. When did we do away with?


I'm not sure. I keep copies of all the revisions at work. I'll check on Monday.
  

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



Posts: 2530
Joined: Nov 22nd, 2002
Re: Multiline Text element with Carriage Return
Reply #14 - Apr 29th, 2007 at 9:12pm
Print Post Print Post  
Bharat_Naik wrote on Apr 29th, 2007 at 5:35pm:
Mark, at one time we would move from element to element and whole text in the element would be marked (selected)  and if you want to add something, you use right arrow and keep typing. I liked that as an option. When did we do away with?


Are you aware that you can turn this off and on by pressing the Insert key?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print