Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.
	Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
			
		
		
			- 
				
																			 quailcreek
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
						
						
													
							
						
									
						Post
					
								by quailcreek » Fri May 22, 2015 8:09 pm
			
			
			
			
			Hi,
I'm doing this in iOS but I don't think that should make a difference. What I want to do is replace a cr with a soft cr in a container. Right now I'm just replacing the cr with a space but that doesn't follow the users intent. I've looked at shiftKey in the dictionary but I'm not sure. Thanks for any help. 
Code: Select all
replace cr with space in tUserNotes
Tom
MacBook Pro OS Mojave 10.14
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 mwieder
- VIP Livecode Opensource Backer
  
- Posts: 3582
- Joined: Mon Jan 22, 2007 7:36 am
- 
				Contact:
				
			
						
						
													
							
						
									
						Post
					
								by mwieder » Sat May 23, 2015 12:26 am
			
			
			
			
			OK - I'll bite... what's a 'soft cr'?
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 quailcreek
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
						
						
													
							
						
									
						Post
					
								by quailcreek » Sat May 23, 2015 12:38 am
			
			
			
			
			I think it's also called a sticky return. I MS work you hold down the shift key and press return. I allows the text lines to stay in one paragraph.
			
			
									
									Tom
MacBook Pro OS Mojave 10.14
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 FourthWorld
- VIP Livecode Opensource Backer
  
- Posts: 10065
- Joined: Sat Apr 08, 2006 7:05 am
- 
				Contact:
				
			
						
						
													
							
						
									
						Post
					
								by FourthWorld » Sat May 23, 2015 12:47 am
			
			
			
			
			In LiveCode, when a field's dontWrap is false (the default) 0x11 can be used to create the appearance of a new line without creating a new paragraph (v5.5.4 and later).
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 quailcreek
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
						
						
													
							
						
									
						Post
					
								by quailcreek » Sat May 23, 2015 1:02 am
			
			
			
			
			Hi Richard,
The don't wrap is false on the fld. I'm not sure what you mean by 0x11 can be used. Is that ASCII?
			
			
									
									Tom
MacBook Pro OS Mojave 10.14
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 FourthWorld
- VIP Livecode Opensource Backer
  
- Posts: 10065
- Joined: Sat Apr 08, 2006 7:05 am
- 
				Contact:
				
			
						
						
													
							
						
									
						Post
					
								by FourthWorld » Sat May 23, 2015 1:44 am
			
			
			
			
			Yes.  In LiveCode you can get that character with numToChar(11).
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 quailcreek
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
						
						
													
							
						
									
						Post
					
								by quailcreek » Sat May 23, 2015 2:04 am
			
			
			
			
			Thank you, Richard. That worked perfectly... as I'm sure you knew it would. 

Tom
MacBook Pro OS Mojave 10.14