LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
	Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
			
		
		
			- 
				
																			 Cyberqat
- Posts: 24
- Joined: Thu Jun 10, 2010 5:38 pm
						
						
													
							
						
									
						Post
					
								by Cyberqat » Tue Mar 17, 2015 4:30 am
			
			
			
			
			I'm trying to write an IDE tool that I can drag and drop onto a stack.
The drag is working but putting a dropEnter in the stack's script doesnt seem to allow a drop.
code below:
Image being dragged:
Code: Select all
on dragStart
   set the dragData["text"] to empty
   set the dragImage to the id of me
   set the allowableDragActions to "copy"
   set the dragAction to "copy"
   pass dragStart
end dragStart
Stack I am trying to drop on
Code: Select all
on dragEnter
    set the dragAction to "copy"
    pass dragEnter
end dragEnter
 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 Simon
- VIP Livecode Opensource Backer
  
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
						
						
													
							
						
									
						Post
					
								by Simon » Tue Mar 17, 2015 7:52 am
			
			
			
			
			Are these 2 different stacks?
Not a substack of a main stack?
There may have to be a "on mouseEnter" on the second stack.
Simon
			
			
									
									I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 bn
- VIP Livecode Opensource Backer
  
- Posts: 4189
- Joined: Sun Jan 07, 2007 9:12 pm
						
						
													
							
						
									
						Post
					
								by bn » Tue Mar 17, 2015 9:49 am
			
			
			
			
			If you are planning on something akin the revPalette for tools then I "stole" some code from from stack "revTools" card 1 "on mouseDown"
http://livecodeshare.runrev.com/stack/757/GridDrawer
it is from stack 
The behavior part is my addition.
Kind regards
Bernd
 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 Cyberqat
- Posts: 24
- Joined: Thu Jun 10, 2010 5:38 pm
						
						
													
							
						
									
						Post
					
								by Cyberqat » Tue Mar 17, 2015 6:00 pm
			
			
			
			
			Yes this is inter-stack.
Thanks for the code example, I'l look it over!
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 Cyberqat
- Posts: 24
- Joined: Thu Jun 10, 2010 5:38 pm
						
						
													
							
						
									
						Post
					
								by Cyberqat » Sun Mar 22, 2015 10:42 pm
			
			
			
			
			Wow thats some complex code.
I wish they had made this a bit simpler.  It seeme like there aught to be an easier standard solution for making components...
			
			
									
									
						 
		 
				
		
		 
	 
	
				
	
				
		
		
			- 
				
																			 bn
- VIP Livecode Opensource Backer
  
- Posts: 4189
- Joined: Sun Jan 07, 2007 9:12 pm
						
						
													
							
						
									
						Post
					
								by bn » Tue Mar 24, 2015 7:00 am
			
			
			
			
			Hi Cybersquat,
that is Peter Haworth's example stack that I did not know. It is a lot easier than what Livecode uses in the IDE. 
your link is the same stack as the one in Livcodeshare:
http://livecodeshare.runrev.com/stack/614/DragExample
Thanks for posting this.
Kind regards
Bernd