Re: menu buttons and showname
“Set the label of button myBtn to space” makes an option button appear blank but does not interfere with a user’s subsequent choice of an option. While disabling the button or hiding the button are other ways of making clear that no option is in effect, an able but blank option button means that an option can be put into effect in one step, not requiring some other action that enables or shows the button. David Epstein ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Datagrid Form
Can't believe I haven't used a datagrid form before but trying one for the first time this morning, following the instructions in the dg manual. Set the dg type to form Edited the row template to include a couple of fields and a check box Added a button that sets up an array keyed by the field/checkbox names with some data in each key and sets the dgData of the dg Edited the FillInData of the row behavior get the data and put it into the fields/set the hilite of the checkbox Clicked the button to populate the dg Nothing. Set a breakpoint at the start of the FillInData handler and tried again. At the start of the handler, my fields and checkbox show up in the datagrid with no data in them. As each line is executed to put the data into them, nothing shows in the datagrid. Each line looks something like: put pDataArray[Company] into field Company of me pDataArray has the correct values in each key Continued stepping through and next comes the LayoutControl handler. I haven't changed that yet. Step through each line, nothing changes in the datagrid. After stepping over the end LayoutControl, my fields/checkbox all disappear and no more code is executed. LC 6.6.5, OSX 10.10 Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to check for unnecessary local declarations?
On 07/03/2015 11:11 AM, Peter Haworth wrote: Nice! Only thing I don't see is dealing with block comments - the things surrounded by /* and */ and possibly spanning several lines. There's some DRY cleanup that could be done as well. Feel free to make it better and submit the changes. It's all on bitbucket, and unfortunately it's a LiveCode stack rather than text files so you can't submit git pull requests, but drop me a note or create an issue. https://bitbucket.org/mwieder/glx2/wiki/Home -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
atom editor and livecode server files syntax package available
For those of you who don't participate in the forums for whatever reason, but are interested in livecode server, forum user ghettocottage has converted the TextMate revigniter-livecode syntax module for the cross-platform Atom Text Editor and made it available to all. You can install it directly from Atom under PreferencesInstall (search packages revigniter-livecode). More information regarding Atom can be found here: https://atom.io/ Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Datagrid Form
Hi Pete, Try commenting out all the code inside your 'LayoutControl' handler and see if that changes your outcomes. Using the code you posted here, I was able to build a DG and populate two rows, but I commented out the layoutControl code for the test. Best - Phil Davis On 7/3/15 6:10 PM, Peter Haworth wrote: Hi Sri, Yes I tried a refresh (from the Inspector palette for the datagrid), didn't make any difference. Here's my FillIInData code. on FillInData pDataArray put pDataArray[Company Name] into field Company Name of me put pDataArray[Address] into field Address of me set the hilite of button Customer of me to pDataArray[Customer] end FillInData As mentioned, pDataArray has the expected values in it's keys. Here's my LayoutControl code. I didn't reposition any of the controls but left that one line in there since I wasn't sure if it was needed or not. on LayoutControl pControlRect set the rect of graphic Background of me to pControlRect end LayoutControl Here's the code in my button to populate the datagrid. on mouseUp local tData put lcSQL Software into tData[1][Company Name] put PO Box 123 return Soquel return CA 95073 return USA into tData[1][Address] put true into tData[1][Customer] put Mollys Revenge into tData[2][Company Name] put 123 Some Street return Somewehere return OH 12345 return USA into tData[2][Address] put false into tData[2][Customer] set the dgData of group dgForm to tData end mouseUp I can't attach screen shots (?) but as mentioned before, at the start of the FIllInData handler, I see all the controls turn up in the datagrid so I'm taking that to mean my customization of the row template is correct. But I never see the data turn up as I step though each line in FillInData and the controls all disappear when the end LayoutControl command is executed. I should also say that even the dgData I send to the datagrid has two sets of data in it and I see FillInData called for both sets, I only ever see one set of controls before the datagrid is celared. On Fri, Jul 3, 2015 at 5:32 PM Sri sri...@gmail.com wrote: Hi Pete: I'd like to see the code (stripped down version). Also, did you try to manually refresh the datagrid and see (after stepping over some code)? Regards, Sri -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Datagrid-Form-tp4693596p4693598.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Datagrid Form
Silly question, but do you have the cache controls box checked in the inspector for the datagrid? If you uncheck it, and click the refresh datagrid button, does the data show up? If so, is there anywhere that you are manually telling the datagrid to refresh in your code after the dg is populated? Strangely, if Ihave fixed control height unchecked, and cache controls checked, and refresh the datagrid, the datagrid will suddenly appear empty. checking fixed control height, or unchecking cache controls, will make it show back up. (7.0.5) But if I populate it using the button, it doesn't seem to matter what is checked and what isn't, right up until a refresh is done, hence the question about doing a refresh in your code somewhere. On Fri, Jul 3, 2015 at 7:10 PM, Peter Haworth p...@lcsql.com wrote: Hi Sri, Yes I tried a refresh (from the Inspector palette for the datagrid), didn't make any difference. Here's my FillIInData code. on FillInData pDataArray put pDataArray[Company Name] into field Company Name of me put pDataArray[Address] into field Address of me set the hilite of button Customer of me to pDataArray[Customer] end FillInData As mentioned, pDataArray has the expected values in it's keys. Here's my LayoutControl code. I didn't reposition any of the controls but left that one line in there since I wasn't sure if it was needed or not. on LayoutControl pControlRect set the rect of graphic Background of me to pControlRect end LayoutControl Here's the code in my button to populate the datagrid. on mouseUp local tData put lcSQL Software into tData[1][Company Name] put PO Box 123 return Soquel return CA 95073 return USA into tData[1][Address] put true into tData[1][Customer] put Mollys Revenge into tData[2][Company Name] put 123 Some Street return Somewehere return OH 12345 return USA into tData[2][Address] put false into tData[2][Customer] set the dgData of group dgForm to tData end mouseUp I can't attach screen shots (?) but as mentioned before, at the start of the FIllInData handler, I see all the controls turn up in the datagrid so I'm taking that to mean my customization of the row template is correct. But I never see the data turn up as I step though each line in FillInData and the controls all disappear when the end LayoutControl command is executed. I should also say that even the dgData I send to the datagrid has two sets of data in it and I see FillInData called for both sets, I only ever see one set of controls before the datagrid is celared. On Fri, Jul 3, 2015 at 5:32 PM Sri sri...@gmail.com wrote: Hi Pete: I'd like to see the code (stripped down version). Also, did you try to manually refresh the datagrid and see (after stepping over some code)? Regards, Sri -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Datagrid-Form-tp4693596p4693598.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [ANN] Super quick and easy deployment to plugged in iOS devices
On 3 Jul 2015, at 5:08 pm, David Bovilldavid@viral.academy wrote: Thanks Monte - what about for iOS. What is the latest on TestFlight and their ilk? I hesitate to suggest AirLaunch because I don't know how it would work with Apple's new personal testing mode. But if you're willing to have an Apple developer account and submit all the UUIDs for your student devices, it would work. That may be more than you want to mess with though. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: save as of stack file from a script
On Fri, Jul 3, 2015 at 5:56 PM, Richard Gaskin ambassa...@fourthworld.com wrote: A mainstack has a filename property, which can be set from the value returned from ask file. Follow that with a save command and you're done. Wow. That easy. And it turns out that save can even take a filename argument . . . So it now slices dices quite nicely. I then made two more procedures to help update/move along. My files end up with path/names like someBaseDir/yymm/yymmdd/baseProgName.yymmdda.livecode where the a in the advancing letter subversion. So this procedure now bumps the version without leaving the ice *on* bmpVrsn *--bump the version by a letter* *local* oldFlNm, newFlNm *save* this stack *put* the filename of stack (the mainstack of this stack ) into newFlNm *put* numToChar(charToNum(char -10 of newFlNm)+1) into char -10 of newFlNm *save* this stack as newFlNm *end* bmpVrsn and this one is for when it opens, to see if it's new day, and to make any needed directories and but the name: *on* ckVersDat *--to be used when opening. Change the file if it is not from today* *local* today, year, month, day *local* oldYear, oldMonth, oldDay *local* oldFilNm, newFilNm *put* the long date into today *convert* today to dateitems *put* char 3 to 4 of the first item of today into year *put* char -2 to -1 of (0 item 2 of today) into month *put* char -2 to -1 of (0 item 3 of today) into day *put* year month day into today *put* the fileName of stack (the mainStack of this stack) into oldFilNm *--figure out the old file dates* *set* the itemDel to / *if* item -2 of oldFilNm = today *then* *--it is the same day* * exit ckVersDat* *end* *if* *put* char 1 to 2 of item -2 of oldFilNm into oldYear *put* char 3 to 4 item -2 of oldFilNm into oldMonth *put* char 5 to 6 of item -2 of oldFilNm into oldDay *put* item 1 to -4 of oldFilNm / year month into newFilNm *if* there is not a folder newFilNm *then* *create* folder newFilNm *end* *if* *put* / today after newFilNm *if* there is not a folder newFilNm *then* *create* folder newFilNm *end* *if* *put* / char 1 to -17 of item -1 of oldFilNm today a.livecode after newFilNm *if* there is not a file newFilNm *then* *save* this stack as newFilNm *else* *get* dhbkAnswr (There is already a file, newFilNm) *end* *if* *end* ckVersDat Now I just need to find the routine to cause a standalone to compile . . . -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Datagrid Form
Hi Sri, Yes I tried a refresh (from the Inspector palette for the datagrid), didn't make any difference. Here's my FillIInData code. on FillInData pDataArray put pDataArray[Company Name] into field Company Name of me put pDataArray[Address] into field Address of me set the hilite of button Customer of me to pDataArray[Customer] end FillInData As mentioned, pDataArray has the expected values in it's keys. Here's my LayoutControl code. I didn't reposition any of the controls but left that one line in there since I wasn't sure if it was needed or not. on LayoutControl pControlRect set the rect of graphic Background of me to pControlRect end LayoutControl Here's the code in my button to populate the datagrid. on mouseUp local tData put lcSQL Software into tData[1][Company Name] put PO Box 123 return Soquel return CA 95073 return USA into tData[1][Address] put true into tData[1][Customer] put Mollys Revenge into tData[2][Company Name] put 123 Some Street return Somewehere return OH 12345 return USA into tData[2][Address] put false into tData[2][Customer] set the dgData of group dgForm to tData end mouseUp I can't attach screen shots (?) but as mentioned before, at the start of the FIllInData handler, I see all the controls turn up in the datagrid so I'm taking that to mean my customization of the row template is correct. But I never see the data turn up as I step though each line in FillInData and the controls all disappear when the end LayoutControl command is executed. I should also say that even the dgData I send to the datagrid has two sets of data in it and I see FillInData called for both sets, I only ever see one set of controls before the datagrid is celared. On Fri, Jul 3, 2015 at 5:32 PM Sri sri...@gmail.com wrote: Hi Pete: I'd like to see the code (stripped down version). Also, did you try to manually refresh the datagrid and see (after stepping over some code)? Regards, Sri -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Datagrid-Form-tp4693596p4693598.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: save as of stack file from a script
What Richard said, except sounds like you know the filepath so just set the filename to it. Also be aware that when you save as the saved as version of the file becomes the one you are working on not the version that was in memory. On Fri, Jul 3, 2015 at 5:56 PM Richard Gaskin ambassa...@fourthworld.com wrote: Dr. Hawkins wrote: Anyway, if anyone knows where save as goes so that I can set its options and call it, it would be a great help. A mainstack has a filename property, which can be set from the value returned from ask file. Follow that with a save command and you're done. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: save as of stack file from a script
Dr. Hawkins wrote: Anyway, if anyone knows where save as goes so that I can set its options and call it, it would be a great help. A mainstack has a filename property, which can be set from the value returned from ask file. Follow that with a save command and you're done. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [ANN] Super quick and easy deployment to plugged in iOS devices
I haven't played with test flight since apple ruined it. Maybe look at test fairy? Sent from my iPhone On 3 Jul 2015, at 5:08 pm, David Bovill david@viral.academy wrote: Thanks Monte - what about for iOS. What is the latest on TestFlight and their ilk? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Datagrid Form
Hi Pete: I'd like to see the code (stripped down version). Also, did you try to manually refresh the datagrid and see (after stepping over some code)? Regards, Sri -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Datagrid-Form-tp4693596p4693598.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
save as of stack file from a script
Odd as it sounds, I want to do a save as of my stack from code, rather than hitting a dialog box. I have a prepCmpl routine to get the stack ready for building a standalone. I've previously set things up so that the various standalone options are set to what I want based on the file name (primarily versioning). Now, I want to have stack mystack.150703a.livecode get renamed to mystic.150703a.to_compile.livecode, at which point I'll start deleting extraneous stacks and copying in a couple that it needs. This was driven by shared routines as I'm writing the server, and the moving of my custom dialog stack out of the mainstack. When the environment is development, it loads the most recent version and uses it as a library. By being loaded, it can also call the dialog stack. Oh, open hidden stack something.someplace.livecode seems to work, although it's not in the dictionary. Anyway, if anyone knows where save as goes so that I can set its options and call it, it would be a great help. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [ANN] Super quick and easy deployment to plugged in iOS devices
Thanks Monte - what about for iOS. What is the latest on TestFlight and their ilk? On 3 July 2015 at 01:13, Monte Goulding mo...@sweattechnologies.com wrote: On 3 Jul 2015, at 12:06 am, David Bovill david@viral.academy wrote: On this topic - what is the best way to get an entire class of learners to be able to put an app they create together onto their tablet / smartphone? If they are on android you can just put it in dropbox and share the url -- M E R Goulding http://goulding.ws/ Software development services Bespoke application development for vertical markets mergExt http://mergext.com/ - There's an external for that! ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to check for unnecessary local declarations?
On 07/02/2015 08:20 PM, Kay C Lan wrote: Which proves the point that it isn't as easy as you first made out. As you say, cracking the GLX2 code is probably the easiest route to take and I'd be surprise if that code wasn't developed over a long period of time of 'discovering' odd edge cases cropping up here and there, that Jerry never envisage in a single session of coding. Well, here's the easy part from glx2: -- gather the script local variables function getLocals pScript local tTemp, tLocals filter pScript with local * repeat for each line tLine in pScript put word 2 to -1 of tLine cr after tTemp end repeat -- allow for multiple declarations in one line replace , with cr in tTemp repeat for each line tLine in tTemp put word 1 of tLine cr after tLocals end repeat chomp tLocals -- chomp is in the frontscript, removes trailing cr set the tLocals of this card to tLocals end getLocals -- here's the part that looks at usage (watch the lineWrap) --theHandler here could be the entire script of a single handler repeat for each line theLine in theHandler if word 1 to 3 of theLine is repeat for each then put word 5 of theLine into theWord if theTemps is empty then put theWord into theTemps else if theWord is not among the lines of theTemps then put cr theWord after theTemps end if end if next repeat end if if into is among the words of theLine or after is among the words of theLine or before is among the words of theLine or word 1 of theLine is repeat then put 0 into tWordNum repeat for each word theWord in theLine add 1 to tWordNum if char 1 of theWord is # or char 1 to 2 of theWord is -- then exit repeat end if if char 1 of theWord is quote then if theTemps is empty then put theWord into theTemps else if theWord is not among the lines of theTemps then put cr theWord after theTemps end if end if next repeat end if if theWord is among the items of each,with,into,after,before then put word tWordNum+1 of theLine into theNextWord if ( is in theNextWord then next repeat end if put token 1 of theNextWord into theNextWord if theNextWord is not among the lines of theTokens and theNExtWord is not empty then if [ is in theNextWord then replace [ with cr in theNextWord replace ] with in theNextWord end if if theTemps is empty then put theNextWord into theTemps else if theNextWord is not among the lines of theTemps then put cr theNextWord after theTemps end if end if end if end if end repeat end if end repeat -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode