Re: Datagrids and Nested Behaviors
Posted a demo stack showing a DG with a behavior button in front of the DG library behavior. https://github.com/bwmilby/lc-misc/tree/master/NestedDGBehavior There is an image of the stack uploaded as well. The preOpenStack handler will update the script (LC9) which will then be available until LC restarts. ___ 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: Datagrids and Nested Behaviors
PR submitted on Bug 21427. https://github.com/livecode/livecode-ide/pull/1987 Since it is a full PR, I went ahead and switched over to using a script local everywhere and initialize it when the DG is initialized. I also looked for an object in the DG resource stack instead of hard coding the stack name. I'm thinking about posting a stack that can make the temporary modifications necessary to allow this functionality while waiting on the code to make it to production. The temp mods will be much closer to what was posted in this thread. On Tue, Jul 24, 2018 at 10:03 AM, Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > Never mind Brian, it works. I had the behavior of the custom button set > the the behavior STACK and NOT the reDataGridLibrary stack button (now > empty). > > Once I got the behavior of the custom button set to the old behavior > button, the datagrid now works! You guys are freaking geniuses! > > Bob S > > > > On Jul 24, 2018, at 07:57 , Brian Milby via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > I’ll put something together tonight. The code in the library has to be > updated before opening a card with a DG that has the adjusted behavior > chain. I have an idea on how to do it in script, but need to test it out to > verify it will work. > > On Jul 24, 2018, 9:54 AM -0500, Bob Sneidar via use-livecode < > use-livecode@lists.runrev.com>, wrote: > >> I did so. I get this when opening my test stack: > >> > >> 91,260,123 > >> 62,260,123 > >> 77,260,123 > >> 456,260,57 > >> 534,260,123 > >> 253,260,123 > >> 241,236,1,_Initialize > >> 353,0,0,stack "/Applications/LiveCode Community 9.0.1 (rc > 1).app/Contents/Tools/Toolset/palettes/revdatagridlibrary/ > behaviorsdatagridbuttonbehavior.livecodescript" > >> 573,188,1,_Initialize > >> > >> I'll poke around later. > >> > >> Bob S > >> > >> > >>> On Jul 23, 2018, at 22:12 , Brian Milby via use-livecode < > use-livecode@lists.runrev.com> wrote: > >>> > >>> local sResourceStack > >>> private function _ResourceStack > >>> local theStack, theCharNo > >>> > >>> if sResourceStack is empty then > >>> put the behavior of me into theStack > >>> > >>> repeat > >>> if trueWord -1 of theStack is "revDataGridLibrary" or theStack is > >>> empty then > >>> exit repeat > >>> else > >>> put the behavior of theStack into theStack > >>> end if > >>> end repeat > >>> > >>> if theStack is not empty then > >>> put offset(" of stack", theStack) into theCharNo > >>> delete char 1 to (theCharNo + 3) of theStack > >>> end if > >>> put theStack into sResourceStack > >>> end if > >>> > >>> return sResourceStack > >>> end _ResourceStack > >> > >> > >> ___ > >> 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: Storing Images for use by Custom Controls
Hello Simon, I see I probably misunderstood what you were trying to do. With a custom control I might be tempted to store the images in a customProp if I wanted multiple resolutions to travel with the group object. Then do something like setting the imageData of the image. — Scott Elementary Software (Now with 20% less chalk dust!) web http://elementarysoftware.com/ email sc...@elementarysoftware.com booth 1-800-615-0867 > On Jul 24, 2018, at 8:44 AM, Simon Knight via use-livecode > wrote: > > Is there an elegant method of storing images for use by a custom control? I > have tried adding the images to the custom control group but the buttons in > copies of the first group refer back to the first group so there is no > advantage when compared to storing the images on a card or in a folder. > > best wishes > > Simon K. > ___ > 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: Storing Images for use by Custom Controls
Hello Simon, When you say "compared to storing the images on a card or in a folder” it suggests two very different ways of organizing your source images. If you are taking advantage of LiveCode’s automagical ability to pick the correct resolution image then you need to have the images in your project be “referenced” controls. You can tell if they are referenced because when you examine them with the object inspector they will have a file path. (tip: the folder containing the images should be in the same folder as the mainStack of the project. Use the “Copy Files” tab in the Standalone Application Settings to attach it to your standalone. Also, in the object inspector, change the file path of the images to a relative paths. For example on Mac a file path might be: < /Users/yourname/someFolder/yourProjectFolder/images/myCustomButton.png > and you would change this to: < ./images/myCustomButton.png > I store the images inside of LiveCode in different locations depending on the design of the app Scott Morrow Elementary Software (Now with 20% less chalk dust!) web http://elementarysoftware.com/ email sc...@elementarysoftware.com booth 1-800-615-0867 -- > On Jul 24, 2018, at 8:44 AM, Simon Knight via use-livecode > wrote: > > Is there an elegant method of storing images for use by a custom control? I > have tried adding the images to the custom control group but the buttons in > copies of the first group refer back to the first group so there is no > advantage when compared to storing the images on a card or in a folder. > > best wishes > > Simon K. > ___ > 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: Oauth2 (Dropbox) on iOS
Open a console with either the device connected or the simulator and see what calls are made when the allow button is pressed > On 24 Jul 2018, at 19:20, Ben Rubinstein via use-livecode > wrote: > > I feel I've been through this before, but I've not been on it for a while, > and I'm still (again) stuck. > > Using Oauth2 to connect an app to the Dropbox API works fine on desktop. > > On iOS, I get the overlay; with the Dropbox log-in; I sign in, and it then > shows the message that this app would like access to the files in Dropbox, > with buttons (from Dropbox) Cancel or Allow (and a link "Learn more"). > > However, neither the Cancel nor Allow buttons do anything. Fortunately there > is now an LC 'cancel' button at the bottom of the overlay (thanks Monte! > https://github.com/livecode/livecode/pull/6315). > > But something's not happening which should (I assume) happen when the user > touches "Allow". (There is a tiny bit of visible feedback.) > > I know on a previous occasion I solved my issue with inclusions, but I don't > think that's the problem this time. I have (manual inclusions) the Browser > widget, the JSON and Oauth2 libraries, and the internet library. The call to > Oauth2 is wrapped in a try block, and I'm not seeing a catch (can't be sure > that I would, but when I use the new emergency cancel, my script just reports > "Not authorised" where if I drop the Oauth2 library, I get a dialog reporting > the catch). > > What am I missing? Is anyone else able to succesfully connect to Dropbox > using the Oauth2 library on LC 9.0.0, iOS 9.3 (or any similar environments)? > > TIA, > > Ben > > > ___ > 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
Oauth2 (Dropbox) on iOS
I feel I've been through this before, but I've not been on it for a while, and I'm still (again) stuck. Using Oauth2 to connect an app to the Dropbox API works fine on desktop. On iOS, I get the overlay; with the Dropbox log-in; I sign in, and it then shows the message that this app would like access to the files in Dropbox, with buttons (from Dropbox) Cancel or Allow (and a link "Learn more"). However, neither the Cancel nor Allow buttons do anything. Fortunately there is now an LC 'cancel' button at the bottom of the overlay (thanks Monte! https://github.com/livecode/livecode/pull/6315). But something's not happening which should (I assume) happen when the user touches "Allow". (There is a tiny bit of visible feedback.) I know on a previous occasion I solved my issue with inclusions, but I don't think that's the problem this time. I have (manual inclusions) the Browser widget, the JSON and Oauth2 libraries, and the internet library. The call to Oauth2 is wrapped in a try block, and I'm not seeing a catch (can't be sure that I would, but when I use the new emergency cancel, my script just reports "Not authorised" where if I drop the Oauth2 library, I get a dialog reporting the catch). What am I missing? Is anyone else able to succesfully connect to Dropbox using the Oauth2 library on LC 9.0.0, iOS 9.3 (or any similar environments)? TIA, Ben ___ 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: Storing Images for use by Custom Controls
Never mind I figured out why it wasn't working when I tested it. I was copy/pasting the custom control group into a stack on the desktop, but my images were relatively linked to png's in a subfolder in one of my project folders! LOL! It works fine. Bob S > On Jul 24, 2018, at 09:43 , Bob Sneidar via use-livecode > wrote: > > Hmmm just tested. Doesn't seem to work. I'll have to investigate why. The old > script works though I pasted it numerous times. > > Bob S > > >> On Jul 24, 2018, at 09:35 , Bob Sneidar via use-livecode >> wrote: >> >> No sooner said than done. Keep in mind this method depends on four things: >> >> 1. Your main group consists of a number of child groups composed of three >> controls: a button, an icon image and a disabledIcon image >> 2. Your button names begin with "btn" and your images begin with "img" eg. >> "btnNew" >> 3. Your "icon" images are named like your buttons, excluding the first three >> characters eg. "imgNew" >> 4. Your "disabledIcon" images are named like your buttons, excluding the >> first three characters, and ending in "Disabled" eg. "imgNewDisabled" >> >> on newBackground >> put the childcontrolNames of me into tGroupList >> >> repeat for each line tGroup in tGroupList >> put the childControlNames of group tGroup into tControlList >> filter tControlList with "btn*" >> >> repeat for each line tButtonName in tControlList >>put char 4 to -1 of tButtonName into tControlName >>put "img" & tControlName into tEnabledImage >>put "img" & tControlName into tDisabledImage >>set the icon of button tButtonName to the short id of image >> tEnabledImage >>set the disabledIcon of button tButtonName to the short id of image >> tDisabledImage >> end repeat >> end repeat >> pass newBackground >> end newBackground >> >> >>> On Jul 24, 2018, at 09:14 , Bob Sneidar via use-livecode >>> wrote: >>> >>> I have a custom control group with a series of buttons, each with an >>> enabled icon and a disabled icon. I have this if the group script, which >>> should give you some idea how to proceed: >>> >>> on newBackground >>> -- Relink buttons to graphics as they all have different ID's now >>> set the icon of button "btnNew" to the short id of image "imgNew" >>> set the disabledIcon of button "btnNew" to the short id of image >>> "imgNewDisabled" >>> set the icon of button "btnDelete" to the short id of image "imgDelete" >>> set the disabledIcon of button "btnDelete" to the short id of image >>> "imgDeleteDisabled" >>> set the icon of button "btnEdit" to the short id of image "imgEdit" >>> set the disabledIcon of button "btnEdit" to the short id of image >>> "imgEditDisabled" >>> set the icon of button "btnCancel" to the short id of image "imgCancel" >>> set the disabledIcon of button "btnCancel" to the short id of image >>> "imgCancelDisabled" >>> set the icon of button "btnSave" to the short id of image "imgSave" >>> set the disabledIcon of button "btnSave" to the short id of image >>> "imgSaveDisabled" >>> set the icon of button "btnHome" to the short id of image "imgHome" >>> set the disabledIcon of button "btnHome" to the short id of image >>> "imgHomeDisabled" >>> pass newBackground >>> end newBackground >>> >>> In retrospect I should have created a loop, but that would depend on the >>> image names being predictable. As you can see I have named all my icons in >>> such a way so as to reflect the name of the button itself. If you do that, >>> this could be made into a generic handler that would work for any group >>> with buttons next to their icon images, and you wouldn't need to use >>> literals. >>> >>> Bob S >>> >>> On Jul 24, 2018, at 08:44 , Simon Knight via use-livecode wrote: Is there an elegant method of storing images for use by a custom control? I have tried adding the images to the custom control group but the buttons in copies of the first group refer back to the first group so there is no advantage when compared to storing the images on a card or in a folder. best wishes Simon K. >>> >>> >>> ___ >>> 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: Storing Images for use by Custom Controls
Hmmm just tested. Doesn't seem to work. I'll have to investigate why. The old script works though I pasted it numerous times. Bob S > On Jul 24, 2018, at 09:35 , Bob Sneidar via use-livecode > wrote: > > No sooner said than done. Keep in mind this method depends on four things: > > 1. Your main group consists of a number of child groups composed of three > controls: a button, an icon image and a disabledIcon image > 2. Your button names begin with "btn" and your images begin with "img" eg. > "btnNew" > 3. Your "icon" images are named like your buttons, excluding the first three > characters eg. "imgNew" > 4. Your "disabledIcon" images are named like your buttons, excluding the > first three characters, and ending in "Disabled" eg. "imgNewDisabled" > > on newBackground > put the childcontrolNames of me into tGroupList > > repeat for each line tGroup in tGroupList > put the childControlNames of group tGroup into tControlList > filter tControlList with "btn*" > > repeat for each line tButtonName in tControlList > put char 4 to -1 of tButtonName into tControlName > put "img" & tControlName into tEnabledImage > put "img" & tControlName into tDisabledImage > set the icon of button tButtonName to the short id of image > tEnabledImage > set the disabledIcon of button tButtonName to the short id of image > tDisabledImage > end repeat > end repeat > pass newBackground > end newBackground > > >> On Jul 24, 2018, at 09:14 , Bob Sneidar via use-livecode >> wrote: >> >> I have a custom control group with a series of buttons, each with an enabled >> icon and a disabled icon. I have this if the group script, which should give >> you some idea how to proceed: >> >> on newBackground >> -- Relink buttons to graphics as they all have different ID's now >> set the icon of button "btnNew" to the short id of image "imgNew" >> set the disabledIcon of button "btnNew" to the short id of image >> "imgNewDisabled" >> set the icon of button "btnDelete" to the short id of image "imgDelete" >> set the disabledIcon of button "btnDelete" to the short id of image >> "imgDeleteDisabled" >> set the icon of button "btnEdit" to the short id of image "imgEdit" >> set the disabledIcon of button "btnEdit" to the short id of image >> "imgEditDisabled" >> set the icon of button "btnCancel" to the short id of image "imgCancel" >> set the disabledIcon of button "btnCancel" to the short id of image >> "imgCancelDisabled" >> set the icon of button "btnSave" to the short id of image "imgSave" >> set the disabledIcon of button "btnSave" to the short id of image >> "imgSaveDisabled" >> set the icon of button "btnHome" to the short id of image "imgHome" >> set the disabledIcon of button "btnHome" to the short id of image >> "imgHomeDisabled" >> pass newBackground >> end newBackground >> >> In retrospect I should have created a loop, but that would depend on the >> image names being predictable. As you can see I have named all my icons in >> such a way so as to reflect the name of the button itself. If you do that, >> this could be made into a generic handler that would work for any group with >> buttons next to their icon images, and you wouldn't need to use literals. >> >> Bob S >> >> >>> On Jul 24, 2018, at 08:44 , Simon Knight via use-livecode >>> wrote: >>> >>> Is there an elegant method of storing images for use by a custom control? >>> I have tried adding the images to the custom control group but the buttons >>> in copies of the first group refer back to the first group so there is no >>> advantage when compared to storing the images on a card or in a folder. >>> >>> best wishes >>> >>> Simon K. >> >> >> ___ >> 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: Storing Images for use by Custom Controls
No sooner said than done. Keep in mind this method depends on four things: 1. Your main group consists of a number of child groups composed of three controls: a button, an icon image and a disabledIcon image 2. Your button names begin with "btn" and your images begin with "img" eg. "btnNew" 3. Your "icon" images are named like your buttons, excluding the first three characters eg. "imgNew" 4. Your "disabledIcon" images are named like your buttons, excluding the first three characters, and ending in "Disabled" eg. "imgNewDisabled" on newBackground put the childcontrolNames of me into tGroupList repeat for each line tGroup in tGroupList put the childControlNames of group tGroup into tControlList filter tControlList with "btn*" repeat for each line tButtonName in tControlList put char 4 to -1 of tButtonName into tControlName put "img" & tControlName into tEnabledImage put "img" & tControlName into tDisabledImage set the icon of button tButtonName to the short id of image tEnabledImage set the disabledIcon of button tButtonName to the short id of image tDisabledImage end repeat end repeat pass newBackground end newBackground > On Jul 24, 2018, at 09:14 , Bob Sneidar via use-livecode > wrote: > > I have a custom control group with a series of buttons, each with an enabled > icon and a disabled icon. I have this if the group script, which should give > you some idea how to proceed: > > on newBackground > -- Relink buttons to graphics as they all have different ID's now > set the icon of button "btnNew" to the short id of image "imgNew" > set the disabledIcon of button "btnNew" to the short id of image > "imgNewDisabled" > set the icon of button "btnDelete" to the short id of image "imgDelete" > set the disabledIcon of button "btnDelete" to the short id of image > "imgDeleteDisabled" > set the icon of button "btnEdit" to the short id of image "imgEdit" > set the disabledIcon of button "btnEdit" to the short id of image > "imgEditDisabled" > set the icon of button "btnCancel" to the short id of image "imgCancel" > set the disabledIcon of button "btnCancel" to the short id of image > "imgCancelDisabled" > set the icon of button "btnSave" to the short id of image "imgSave" > set the disabledIcon of button "btnSave" to the short id of image > "imgSaveDisabled" > set the icon of button "btnHome" to the short id of image "imgHome" > set the disabledIcon of button "btnHome" to the short id of image > "imgHomeDisabled" > pass newBackground > end newBackground > > In retrospect I should have created a loop, but that would depend on the > image names being predictable. As you can see I have named all my icons in > such a way so as to reflect the name of the button itself. If you do that, > this could be made into a generic handler that would work for any group with > buttons next to their icon images, and you wouldn't need to use literals. > > Bob S > > >> On Jul 24, 2018, at 08:44 , Simon Knight via use-livecode >> wrote: >> >> Is there an elegant method of storing images for use by a custom control? I >> have tried adding the images to the custom control group but the buttons in >> copies of the first group refer back to the first group so there is no >> advantage when compared to storing the images on a card or in a folder. >> >> best wishes >> >> Simon K. > > > ___ > 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: Storing Images for use by Custom Controls
I have a custom control group with a series of buttons, each with an enabled icon and a disabled icon. I have this if the group script, which should give you some idea how to proceed: on newBackground -- Relink buttons to graphics as they all have different ID's now set the icon of button "btnNew" to the short id of image "imgNew" set the disabledIcon of button "btnNew" to the short id of image "imgNewDisabled" set the icon of button "btnDelete" to the short id of image "imgDelete" set the disabledIcon of button "btnDelete" to the short id of image "imgDeleteDisabled" set the icon of button "btnEdit" to the short id of image "imgEdit" set the disabledIcon of button "btnEdit" to the short id of image "imgEditDisabled" set the icon of button "btnCancel" to the short id of image "imgCancel" set the disabledIcon of button "btnCancel" to the short id of image "imgCancelDisabled" set the icon of button "btnSave" to the short id of image "imgSave" set the disabledIcon of button "btnSave" to the short id of image "imgSaveDisabled" set the icon of button "btnHome" to the short id of image "imgHome" set the disabledIcon of button "btnHome" to the short id of image "imgHomeDisabled" pass newBackground end newBackground In retrospect I should have created a loop, but that would depend on the image names being predictable. As you can see I have named all my icons in such a way so as to reflect the name of the button itself. If you do that, this could be made into a generic handler that would work for any group with buttons next to their icon images, and you wouldn't need to use literals. Bob S > On Jul 24, 2018, at 08:44 , Simon Knight via use-livecode > wrote: > > Is there an elegant method of storing images for use by a custom control? I > have tried adding the images to the custom control group but the buttons in > copies of the first group refer back to the first group so there is no > advantage when compared to storing the images on a card or in a folder. > > best wishes > > Simon K. ___ 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
Storing Images for use by Custom Controls
Is there an elegant method of storing images for use by a custom control? I have tried adding the images to the custom control group but the buttons in copies of the first group refer back to the first group so there is no advantage when compared to storing the images on a card or in a folder. best wishes Simon K. ___ 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: Datagrids and Nested Behaviors
Never mind Brian, it works. I had the behavior of the custom button set the the behavior STACK and NOT the reDataGridLibrary stack button (now empty). Once I got the behavior of the custom button set to the old behavior button, the datagrid now works! You guys are freaking geniuses! Bob S > On Jul 24, 2018, at 07:57 , Brian Milby via use-livecode > wrote: > > I’ll put something together tonight. The code in the library has to be > updated before opening a card with a DG that has the adjusted behavior chain. > I have an idea on how to do it in script, but need to test it out to verify > it will work. > On Jul 24, 2018, 9:54 AM -0500, Bob Sneidar via use-livecode > , wrote: >> I did so. I get this when opening my test stack: >> >> 91,260,123 >> 62,260,123 >> 77,260,123 >> 456,260,57 >> 534,260,123 >> 253,260,123 >> 241,236,1,_Initialize >> 353,0,0,stack "/Applications/LiveCode Community 9.0.1 (rc >> 1).app/Contents/Tools/Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript" >> 573,188,1,_Initialize >> >> I'll poke around later. >> >> Bob S >> >> >>> On Jul 23, 2018, at 22:12 , Brian Milby via use-livecode >>> wrote: >>> >>> local sResourceStack >>> private function _ResourceStack >>> local theStack, theCharNo >>> >>> if sResourceStack is empty then >>> put the behavior of me into theStack >>> >>> repeat >>> if trueWord -1 of theStack is "revDataGridLibrary" or theStack is >>> empty then >>> exit repeat >>> else >>> put the behavior of theStack into theStack >>> end if >>> end repeat >>> >>> if theStack is not empty then >>> put offset(" of stack", theStack) into theCharNo >>> delete char 1 to (theCharNo + 3) of theStack >>> end if >>> put theStack into sResourceStack >>> end if >>> >>> return sResourceStack >>> end _ResourceStack >> >> >> ___ >> 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: Datagrids and Nested Behaviors
I’ll put something together tonight. The code in the library has to be updated before opening a card with a DG that has the adjusted behavior chain. I have an idea on how to do it in script, but need to test it out to verify it will work. On Jul 24, 2018, 9:54 AM -0500, Bob Sneidar via use-livecode , wrote: > I did so. I get this when opening my test stack: > > 91,260,123 > 62,260,123 > 77,260,123 > 456,260,57 > 534,260,123 > 253,260,123 > 241,236,1,_Initialize > 353,0,0,stack "/Applications/LiveCode Community 9.0.1 (rc > 1).app/Contents/Tools/Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript" > 573,188,1,_Initialize > > I'll poke around later. > > Bob S > > > > On Jul 23, 2018, at 22:12 , Brian Milby via use-livecode > > wrote: > > > > local sResourceStack > > private function _ResourceStack > > local theStack, theCharNo > > > > if sResourceStack is empty then > > put the behavior of me into theStack > > > > repeat > > if trueWord -1 of theStack is "revDataGridLibrary" or theStack is > > empty then > > exit repeat > > else > > put the behavior of theStack into theStack > > end if > > end repeat > > > > if theStack is not empty then > > put offset(" of stack", theStack) into theCharNo > > delete char 1 to (theCharNo + 3) of theStack > > end if > > put theStack into sResourceStack > > end if > > > > return sResourceStack > > end _ResourceStack > > > ___ > 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: Datagrids and Nested Behaviors
I did so. I get this when opening my test stack: 91,260,123 62,260,123 77,260,123 456,260,57 534,260,123 253,260,123 241,236,1,_Initialize 353,0,0,stack "/Applications/LiveCode Community 9.0.1 (rc 1).app/Contents/Tools/Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript" 573,188,1,_Initialize I'll poke around later. Bob S > On Jul 23, 2018, at 22:12 , Brian Milby via use-livecode > wrote: > > local sResourceStack > private function _ResourceStack > local theStack, theCharNo > > if sResourceStack is empty then > put the behavior of me into theStack > > repeat > if trueWord -1 of theStack is "revDataGridLibrary" or theStack is > empty then >exit repeat > else >put the behavior of theStack into theStack > end if > end repeat > > if theStack is not empty then > put offset(" of stack", theStack) into theCharNo > delete char 1 to (theCharNo + 3) of theStack > end if > put theStack into sResourceStack > end if > > return sResourceStack > end _ResourceStack ___ 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: Example of Livecode function settings array syntax?
Hi Charles, Many thanks that’s exactly the cross-reference needed in the docs and has me over that hurdle …and I’m onto a whole new set of error messages now! :-) Best, Keith > On 24 Jul 2018, at 09:27, Charles Warwick via use-livecode > wrote: > > Hi Keith, > > If you take a look at the following LC lesson for uploading a file via FTP > with tsNet, it shows how to add a username and password to the settings > parameter of a tsNet function (which in the example is the tsNetUploadSync > command). > > http://lessons.livecode.com/m/4071/l/851756-how-to-upload-a-file-using-FTP > > The same method works for all tsNet functions that accept a settings > parameter. > > Please let me know if that answers your question, > > Regards, > > Charles > >> On 24 Jul 2018, at 6:15 pm, Keith Clarke via use-livecode >> wrote: >> >> Hi folks, >> I’m trying to add username & password to the pSettings parameter in the >> tsNetPost function but have no clue on the correct syntax for settings >> parameter arrays. >> >> Unfortunately, the documentation is not helpful in this regard for the >> infrequent user - no brief syntax description, code examples or >> cross-references. >> >> I’d be obliged if anyone could please point me at a dictionary entry >> containing a worked example or lesson showing correct function settings >> array syntax? >> Thanks & regards, >> Keith >> >> >> >> >> >> ___ >> 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: Example of Livecode function settings array syntax?
Hi Keith, If you take a look at the following LC lesson for uploading a file via FTP with tsNet, it shows how to add a username and password to the settings parameter of a tsNet function (which in the example is the tsNetUploadSync command). http://lessons.livecode.com/m/4071/l/851756-how-to-upload-a-file-using-FTP The same method works for all tsNet functions that accept a settings parameter. Please let me know if that answers your question, Regards, Charles > On 24 Jul 2018, at 6:15 pm, Keith Clarke via use-livecode > wrote: > > Hi folks, > I’m trying to add username & password to the pSettings parameter in the > tsNetPost function but have no clue on the correct syntax for settings > parameter arrays. > > Unfortunately, the documentation is not helpful in this regard for the > infrequent user - no brief syntax description, code examples or > cross-references. > > I’d be obliged if anyone could please point me at a dictionary entry > containing a worked example or lesson showing correct function settings array > syntax? > Thanks & regards, > Keith > > > > > > ___ > 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
Example of Livecode function settings array syntax?
Hi folks, I’m trying to add username & password to the pSettings parameter in the tsNetPost function but have no clue on the correct syntax for settings parameter arrays. Unfortunately, the documentation is not helpful in this regard for the infrequent user - no brief syntax description, code examples or cross-references. I’d be obliged if anyone could please point me at a dictionary entry containing a worked example or lesson showing correct function settings array syntax? Thanks & regards, Keith ___ 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: Datagrids and Nested Behaviors
Brian That is a nice modification, makes it faster and is still only in one place. >I also noticed that there are extra "stack" references in the code (stack >_ResourceStack instead of just _ResourceStack 4/10 uses). to my surprise both versions work. Kind regards Bernd Brian Milby via use-livecode wrote > Here is my slight modification to the suggestion: > > local sResourceStack > private function _ResourceStack >local theStack, theCharNo > >if sResourceStack is empty then > put the behavior of me into theStack > > repeat > if trueWord -1 of theStack is "revDataGridLibrary" or theStack is > empty then > exit repeat > else > put the behavior of theStack into theStack > end if > end repeat > > if theStack is not empty then > put offset(" of stack", theStack) into theCharNo > delete char 1 to (theCharNo + 3) of theStack > end if > put theStack into sResourceStack >end if > >return sResourceStack > end _ResourceStack > > > I also noticed that there are extra "stack" references in the code (stack > _ResourceStack instead of just _ResourceStack 4/10 uses). > > On Mon, Jul 23, 2018 at 6:53 PM, Brian Milby > brian@ > wrote: > >> What OS are you using? It will be inside the IDE, but will get copied >> into >> your app as well. You will probably need admin rights to edit. I would do >> it in an external editor too. >> >> It probably would be an enhancement request (therefore 9.1), but I would >> be happy to submit a PR against a BZ report. >> On Jul 23, 2018, 6:04 PM -0500, Bob Sneidar via use-livecode < >> > use-livecode@.runrev >>, wrote: >> >> I found and made a copy of the datagrid library stack on my desktop. I >> still cannot save the modification you proposed to the script of the >> datagrid button in this stack. It says it can't open stack script file. >> >> Well my workaround is functional, so I'm sticking with that. If the devs >> want to take your patch and bundle it in with the next release that would >> be great. I have no idea how to make that happen. >> >> Bob S >> >> >> On Jul 23, 2018, at 15:46 , Bob Sneidar via use-livecode < >> > use-livecode@.runrev >> wrote: >> >> I tried this, I apparently don't have permission to save the file once >> edited. It's probably in the Livecode APP bundle. I'll poke around and >> test >> this later. >> >> Bob S -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.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