livecode

Native Android scroller for Data Grid

╄→гoц情女王★ 提交于 2020-01-15 09:12:56
问题 I'm using the code below for native Adroid scroller for Data Grid and it works almost OK. Almost, because in one particular view in my stack it seems to be unreliable. Download the stack and check the following: Go back and forth 3-4 times clicking between "My Categories" and "My Selection" then at some point the scrolling does not work in the "My Categories" view. I then have to restart the app and it works OK. What do you think it depends on? The code is: on openCard local tScrollerRect,

A script to draw, fill and group triangles in Livecode?

梦想的初衷 提交于 2020-01-06 02:24:07
问题 Appreciate any help in coming up with a Livecode script chunk to draw and fill a group of equilateral triangles. I'm working on an open source app that helps people create and share stories with a fractal pattern. A key challenge is drawing triangles that will represent the following elements of a story: Attractor Challenge Opportunity (a state change to resolve the tension) Strategy Test Decision Each of the six standard story elements above will be displayed in the app as an equilateral

How to increase the speed of the native Android scroller for the Data Grid

北战南征 提交于 2020-01-05 15:23:12
问题 I'd like to use Android native scroller for a Data Grid displaying about 700 records. The scroller code below is in the card that has the Data Grid on it. The card script is: on openCard dispatch "ResetList" to group "DataGrid 1" if text of fld "view" of cd "main" is "Favourites" then send "mouseUp" to btn "favourites" of cd "home" end if RefreshAllLines local sScrollerID,isScrolling ## Create scroller now: create_scroller end openCard on closecard delete_scroller end closecard command create

How to delete a row in datagrid

╄→гoц情女王★ 提交于 2019-12-24 15:30:10
问题 How to delete a row in datagrid. I am using the following code and it's not working(first two lines are working and the 3'rd line is not working) how i change my code. put the dgHilitedLines of group "DGP" into theLine answer theLine DeleteLine theLine 回答1: Did you try using the index instead of the line? put the dgHilitedIndex of me into theIndex DeleteIndex theIndex The line is always the current display order, say A = 1 B = 2 C = 3 Thus if you delete line 2, the next line C will become

mergAndroid Livecode- scanning barcode

大憨熊 提交于 2019-12-24 14:28:30
问题 I'm using mergZXingGetBarcode (mergAndroid) on Livecode to build an Android app that basically requires user to scan QR to login. If the user device is not installed with the specific barcode scanner developed by ZXing Team, when the scan button is clicked, it looks as though there is no function being carried out (in user's view). Other 3rd party barcode scanners will not be triggered/detected. Is there a way that I can detect that the ZXing Barcode is not installed and thus inform the user

Deleting The Last Character in A String Livecode Language

ぃ、小莉子 提交于 2019-12-24 05:42:30
问题 I need to delete last character in a string Livecode. I have wrote this below in English. on mouseUp replace last character with Backspace in field"dialed" end mouseUp I am a newbie, so please use simple answers :) Thank you. 回答1: Deleting the last character of a field is very simple: on mouseUp delete the last char of fld "Dialed" end mouseUp 回答2: If you think that is nice, what about: delete character 2 of word 3 of line 4 of fld "dialed" 来源: https://stackoverflow.com/questions/33816040

toggle 1 line - complete line view + view one complete line in separate card

[亡魂溺海] 提交于 2019-12-24 05:04:59
问题 I'd like to toggle the display of the data grid between a 1-line view, complete line view with all the lines listed and a view of one complete line in a separate card. The thing that has to be fixed is following: Viewing of one complete/full line in a separate card when I click on the line row in 1-line view card (compacted), or on the line row in Complete line view card (expanded). I have used this code for the field "Line" in the Row Templates but it does not work properly: put fld "Line"

How do I get the path to the currently selected file

本小妞迷上赌 提交于 2019-12-21 21:43:09
问题 Does VBScript have a function to get the path to the currently selected file in File Explorer? If so, what is the function? I'm looking for something like Set fileObj = CreateObject("Scripting.FileSystemObject") dim filepath filepath = fileObj.GetCurrentSelection() 'doesn´t exist dim result result = filepath 'communicate with LiveCode 回答1: I wrote a simple example. Keep in mind there may be more than one open windows explorer window and this will list them all. Function GetSelectedFiles()

Stopping in-built php server on Mac Mavericks - Livecode

若如初见. 提交于 2019-12-20 12:42:39
问题 I'm developing something in Livecode and I have been experimenting with using Mavericks own in-built php server. I started the server by sending the following command through shell... php -S localhost:8000 This enabled PHP to run successfully through localhost:8000/ However, I can not work out how to stop/disable PHP now in order to continue testing starting it - when I previously started PHP through the terminal I was able to do ctrl+c to stop php running but since I do not yet know how to

How to set rect on using a native video player when set fullscreenmode to “exactFit” in Livecode?

老子叫甜甜 提交于 2019-12-14 03:59:26
问题 My project have video player. First step: I create stack and input code: on preOpenstack set the fullScreenMode of this stack to "exactFit" end preOpenstack Second step: I create picture for play video. When I touch picture. The picture has hide and create native video player here code: on mouseUp lock screen set the visible of img "poster" to false mobileControlCreate "player", "vdoplayer" put the result into pID mobileControlSet pID,"filename" , specialFolderpath("engine") & "/vdo.mp4"