Search found 1473 matches

by sturgis
Tue Jun 14, 2016 6:50 pm
Forum: Talking LiveCode
Topic: Moving button unwanted behaviour
Replies: 28
Views: 2676

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 ...
by sturgis
Tue Jun 14, 2016 6:35 pm
Forum: Talking LiveCode
Topic: Moving button unwanted behaviour
Replies: 28
Views: 2676

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.
by sturgis
Sun Jun 12, 2016 3:17 pm
Forum: Databases
Topic: Standalone Database Issue
Replies: 11
Views: 3060

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...
by sturgis
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: 1993

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...
by sturgis
Sun Jun 12, 2016 2:23 pm
Forum: Talking LiveCode
Topic: Moving button unwanted behaviour
Replies: 28
Views: 2676

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...
by sturgis
Mon May 09, 2016 10:11 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

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.
by sturgis
Mon May 09, 2016 9:57 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

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. (...
by sturgis
Mon May 09, 2016 8:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

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...
by sturgis
Mon May 09, 2016 7:02 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

Re: Basket help

Have you considered using something other than the datagrid for your display?
by sturgis
Mon May 09, 2016 6:50 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

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.
by sturgis
Mon May 09, 2016 4:36 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

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...
by sturgis
Sun May 08, 2016 7:09 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

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...
by sturgis
Sun May 08, 2016 5:01 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

Re: Basket help

It appears that you have run into one of the reasons I avoid the datagrid if at all possible. In technical terms, then datagrid in your stack is "Broken." I would suggest making a backup of your stack just in case, then delete the broken datagrid. I would even go so far as to answer "YES" when it as...
by sturgis
Sun May 08, 2016 3:53 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

Re: Basket help

First look here: http://lessons.livecode.com/m/datagrid/l/7311-how-do-i-customize-a-table-s-columns You'll want to create a custom column template for your quantity column. You'll also want to create a custom column template for your total column for that item. You'll want to script for the behavior...
by sturgis
Sun May 08, 2016 2:26 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 4103

Re: Basket help

When you "dispatch" you have to make sure livecode knows where to find the control you're dispatching to. If you only provide the control name, it looks at stack that the dispatch is being sent from. So if you have a button in one stack, and you want to dispatch to a control in another stack you nee...

Go to advanced search