Search found 1438 matches
- Thu Jun 16, 2016 3:41 pm
- Forum: Talking LiveCode
- Topic: Moving button unwanted behaviour
- Replies: 28
- Views: 17076
Re: Moving button unwanted behaviour
Hey, you might look at "relayer" in the dictionary too. As far as "top" goes, its likely that while moving, you pull it out of the group, then you set it back to where it was, inside the group. My method did the math to find the right layer number, but it looks like with relayer you can do.. relayer...
- Thu Jun 16, 2016 3:11 pm
- Forum: Talking LiveCode
- Topic: Moving button unwanted behaviour
- Replies: 28
- Views: 17076
Re: Moving button unwanted behaviour
Yep, what klaus said. A couple additions.. When you officially start to move the button, you might want to save its current layer so that you can revert after drag. Also, to keep from layering your way out of the group you can find the correct number to relayer to by getting the layer of the owner o...
- Tue Jun 14, 2016 8:42 pm
- Forum: Talking LiveCode
- Topic: Moving button unwanted behaviour
- Replies: 28
- Views: 17076
Re: Moving button unwanted behaviour
Gotta go to town, but off the top of my head you probably need to do something simple like... on mouseDown pBtn if pBtn is 3 then put "No" into MovedYN put the millisec into MovingDelay end if end mouseDown And in your mousestilldown.. Since the dictionary says its sent "periodically" you probably d...
- Tue Jun 14, 2016 6:50 pm
- Forum: Talking LiveCode
- Topic: Moving button unwanted behaviour
- Replies: 28
- Views: 17076
Re: Moving button unwanted behaviour
Ok, here it is. Added a constant for the delay, added sMoving as the actual "are we going to move this" flag. added sMessage so that the switch to hand cursor can be cancelled if the mouse leaves the rect of the button before time. -- there is still a problem with this method, but it should be easy ...
- Tue Jun 14, 2016 6:35 pm
- Forum: Talking LiveCode
- Topic: Moving button unwanted behaviour
- Replies: 28
- Views: 17076
Re: Moving button unwanted behaviour
I tweaked the code similar to what mrcoollion did, plus added a timer that changes the cursor to the hand after the delay so that there is a visual cue that the button is now held by the cursor. If interested I'll post the changes. Slightly more complicated but the visual feedback seems to work well.
- Sun Jun 12, 2016 3:17 pm
- Forum: Databases
- Topic: Standalone Database Issue
- Replies: 11
- Views: 9676
Re: Standalone Database Issue
IF you want to save some data locally, thats easy enough. You can save a preferences stack to a writable location that contains the properties, and since its external to the standalone is writable. YOu can also use a simple text file, or an xml file or even an sqlite database. Now, as far as the dat...
- Sun Jun 12, 2016 2:58 pm
- Forum: Internet
- Topic: How do I test if an « open socket » is working or not?
- Replies: 3
- Views: 5282
Re: How do I test if an « open socket » is working or not?
In your repeat loop you put the result into rs. Every time you do that, it overwrites the previous value. If you want to keep a list of results look at "after" or "before" rather than into... something like repeat however you need --do your stuff here put the result & cr after rs end repeat delete t...
- Sun Jun 12, 2016 2:23 pm
- Forum: Talking LiveCode
- Topic: Moving button unwanted behaviour
- Replies: 28
- Views: 17076
Re: Moving button unwanted behaviour
Just for completeness, if you ever have need to use your initial method to move things around, you were close. Here's a version (super simple) that works. -- there is still a problem with this method, but it should be easy enough to fix.. -- if you click the button and drag the mouse away before 2 s...
- Mon May 09, 2016 10:11 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Basket help
- Replies: 48
- Views: 24173
Re: Basket help
Look in the card script. There is a command "addItem"
Find the "If" block that sets the background color for even lines and remove the whole block.
Find the "If" block that sets the background color for even lines and remove the whole block.
- Mon May 09, 2016 9:57 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Basket help
- Replies: 48
- Views: 24173
Re: Basket help
Your button keeps using 1 as theLineNo rather than getting the current number of records in the datagrid, adding 1, and using that to insert the new record. I don't have time to look it up again, but I think if you go back to one of the previous posts in this thread, I gave code that will do that. (...
- Mon May 09, 2016 8:45 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Basket help
- Replies: 48
- Views: 24173
Re: Basket help
Yeah. Any of the number of available fields. The entry level of knowledge for the datagrid is pretty high, it might be easier to just use a regular old field, or table field, or scrolling list field or.... Livecode is really good at processing text. It should be relatively simple to use a text field...
- Mon May 09, 2016 7:02 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Basket help
- Replies: 48
- Views: 24173
Re: Basket help
Have you considered using something other than the datagrid for your display?
- Mon May 09, 2016 6:50 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Basket help
- Replies: 48
- Views: 24173
Re: Basket help
change your chicken button so that it puts "5" into the array for cost. (no currency symbol)
In the message box, type "set the dgdata of grp "yourdatagrid" to empty.
click the chicken button.
In the message box, type "set the dgdata of grp "yourdatagrid" to empty.
click the chicken button.
- Mon May 09, 2016 4:36 am
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Basket help
- Replies: 48
- Views: 24173
Re: Basket help
https://www.dropbox.com/s/btro3ye1rxjvxms/datagridexample.livecode?dl=0 There are 3 custom columns in the linked stack above. Cost has a behavior script that prepends the monetary symbol to the cost. Don't include the symbol in the data you use to set the datagrid. The quantity behavior.. well, look...
- Sun May 08, 2016 7:09 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Basket help
- Replies: 48
- Views: 24173
Re: Basket help
Edit: so much for the pics. Edit: fixed the pics Ok. Here is a very basic walkthrough. Create a new datagrid. Name it as needed using the property inspector. Create your columns in the property inspector. Choose your "Quantity" column in the columns pane of the property inspector. Click the "+" butt...