Re: DataGrid question...
I can't write a test handler right now, but I'm thinking you might be able do something like this: repeat for each item i in the tabstops of the field: if the clickH > i and less than item i+1, that's your column The clickline gives you the row. On 3/29/20 11:04 PM, Terry Judd via use-livecode wrote: This is rough but sort of works... on selectionChanged set the itemDel to tab put word 2 of the selectedLine into tRow put word 2 of the selectedChunk into nChar put length(line 1 to tRow-1 of me) into tStart put char tStart+2 to nChar of me into tText put the number of items in tText into tCol put tRow&&tCol end selectionChanged -- 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: DataGrid question...
This is rough but sort of works... on selectionChanged set the itemDel to tab put word 2 of the selectedLine into tRow put word 2 of the selectedChunk into nChar put length(line 1 to tRow-1 of me) into tStart put char tStart+2 to nChar of me into tText put the number of items in tText into tCol put tRow&&tCol end selectionChanged On 30/3/20, 2:57 pm, "use-livecode on behalf of Pi Digital via use-livecode" wrote: Ah Bob. You misunderstand. We are asking in reference to the table field, not DG. Finding the index in data grid is very easy indeed. In a table field, it so much as I was to understand. But apparently there is some magic I’ve missed somewhere and perhaps I’m the only one. Do you know what it is? Sean Cole Pi Digital > On 30 Mar 2020, at 04:40, Bob Sneidar via use-livecode wrote: > > on mouseUp > put the mouseControl into tControl > put the long id of tControl into tID > put the short name of tControl into tName > end mouseUp > > The short name will reveal the column number. The dgHilitedLine will give you the line. > >> On Mar 29, 2020, at 8:37 PM, Bob Sneidar via use-livecode wrote: >> >> The mouseControl! >> >> Bob S >> >> On Mar 29, 2020, at 8:35 PM, Pi Digital via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: >> >> Hi Jerry >> >> Thanks for the heads up about Bernd’s code. But I was interested in learning how to get the cell index of a table field when clicked as we are told it was solved a ‘long time’ ago. That makes it seem that it is general knowledge and I’m a dunce for not being aware of it (which is very possible). If you’ve got any pointers you know of that can steer me right I’d appreciate it. >> >> Sean Cole >> Pi Digital >> >> ___ >> 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 ___ 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 question...
OIC. I was struggling with that earlier today. The problem is, there is no cell. Just a field. You can get the line with the clickLine, but I discovered that even with cell editing on, the table field acted erratically, adding lines when I didn’t want them. Since you know the tabstops, you can calculate where in the field the user clicked, and therefore the “cell”. You will have to do some math though. If the field is horizontally scrolled you will have to take that scroll into account. Honestly it would be better to just have a data grid. That is what I ended up doing. Bob S On Mar 29, 2020, at 8:56 PM, Pi Digital via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Ah Bob. You misunderstand. We are asking in reference to the table field, not DG. Finding the index in data grid is very easy indeed. In a table field, it so much as I was to understand. But apparently there is some magic I’ve missed somewhere and perhaps I’m the only one. Do you know what it is? Sean Cole Pi Digital ___ 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 question...
Hi Sean, Sorry, I was thinking you might not need a DG at all. My mistake. Anyway, just to be complete, Bernd’s modTableField API gives you the following: mtfDataItemClicked pColumnClicked, pLineClicked, pItemContent, pGroupName mtfDataItemClicked is send when the user clicks into a data cell. 4 parameters are sent: the number of the column, the number of the line, the content of the cell and the long name of the group. Content of course can be empty if the cell is empty. .Jerry > On Mar 29, 2020, at 8:35 PM, Pi Digital via use-livecode > wrote: > > Hi Jerry > > Thanks for the heads up about Bernd’s code. But I was interested in learning > how to get the cell index of a table field when clicked as we are told it was > solved a ‘long time’ ago. That makes it seem that it is general knowledge and > I’m a dunce for not being aware of it (which is very possible). If you’ve got > any pointers you know of that can steer me right I’d appreciate it. > ___ 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 question...
Ah Bob. You misunderstand. We are asking in reference to the table field, not DG. Finding the index in data grid is very easy indeed. In a table field, it so much as I was to understand. But apparently there is some magic I’ve missed somewhere and perhaps I’m the only one. Do you know what it is? Sean Cole Pi Digital > On 30 Mar 2020, at 04:40, Bob Sneidar via use-livecode > wrote: > > on mouseUp > put the mouseControl into tControl > put the long id of tControl into tID > put the short name of tControl into tName > end mouseUp > > The short name will reveal the column number. The dgHilitedLine will give you > the line. > >> On Mar 29, 2020, at 8:37 PM, Bob Sneidar via use-livecode >> wrote: >> >> The mouseControl! >> >> Bob S >> >> On Mar 29, 2020, at 8:35 PM, Pi Digital via use-livecode >> mailto:use-livecode@lists.runrev.com>> wrote: >> >> Hi Jerry >> >> Thanks for the heads up about Bernd’s code. But I was interested in learning >> how to get the cell index of a table field when clicked as we are told it >> was solved a ‘long time’ ago. That makes it seem that it is general >> knowledge and I’m a dunce for not being aware of it (which is very >> possible). If you’ve got any pointers you know of that can steer me right >> I’d appreciate it. >> >> Sean Cole >> Pi Digital >> >> ___ >> 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: DataGrid question...
on mouseUp put the mouseControl into tControl put the long id of tControl into tID put the short name of tControl into tName end mouseUp The short name will reveal the column number. The dgHilitedLine will give you the line. > On Mar 29, 2020, at 8:37 PM, Bob Sneidar via use-livecode > wrote: > > The mouseControl! > > Bob S > > On Mar 29, 2020, at 8:35 PM, Pi Digital via use-livecode > mailto:use-livecode@lists.runrev.com>> wrote: > > Hi Jerry > > Thanks for the heads up about Bernd’s code. But I was interested in learning > how to get the cell index of a table field when clicked as we are told it was > solved a ‘long time’ ago. That makes it seem that it is general knowledge and > I’m a dunce for not being aware of it (which is very possible). If you’ve got > any pointers you know of that can steer me right I’d appreciate it. > > Sean Cole > Pi Digital > > ___ > 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: DataGrid question...
The mouseControl! Bob S On Mar 29, 2020, at 8:35 PM, Pi Digital via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Hi Jerry Thanks for the heads up about Bernd’s code. But I was interested in learning how to get the cell index of a table field when clicked as we are told it was solved a ‘long time’ ago. That makes it seem that it is general knowledge and I’m a dunce for not being aware of it (which is very possible). If you’ve got any pointers you know of that can steer me right I’d appreciate it. Sean Cole Pi Digital ___ 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 question...
Hi Jerry Thanks for the heads up about Bernd’s code. But I was interested in learning how to get the cell index of a table field when clicked as we are told it was solved a ‘long time’ ago. That makes it seem that it is general knowledge and I’m a dunce for not being aware of it (which is very possible). If you’ve got any pointers you know of that can steer me right I’d appreciate it. Sean Cole Pi Digital > On 30 Mar 2020, at 03:38, Jerry Jensen via use-livecode > wrote: > > Hi Sean, > Have you seen Bernd Niggemann’s modTableField? It is built on top of the LC > list field, without a lot of the complications of DataGrids if you don’t need > DG’s huge capabilities. It might work well for you. > Regards, > Jerry Jensen > >>> On Mar 29, 2020, at 7:05 PM, Sean Cole (Pi) via use-livecode >>> wrote: >>> >>> >>> Working out which cell has been clicked: Sorry, that's not accurate >>> either. Yes, we do have that! Also for a long time. >>> >> >> Hi, >> >> As Curry's now unfortunately out of the conversation, can someone else help >> me understand how you work out which cell has been clicked? > > > > ___ > 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: DataGrid question...
Hi Bob That’ll return the field is I’m over but not the cell of the table field. Unless, again, I am mistaken. Am I missing something. Sean Cole Pi Digital > On 30 Mar 2020, at 03:09, Bob Sneidar via use-livecode > wrote: > > The mouseControl. >>> help >> me understand how you work out which cell has been clicked? He said it can >> be done but gave no explanation or hint of how. ___ 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 question...
Hi Sean, Have you seen Bernd Niggemann’s modTableField? It is built on top of the LC list field, without a lot of the complications of DataGrids if you don’t need DG’s huge capabilities. It might work well for you. Regards, Jerry Jensen > On Mar 29, 2020, at 7:05 PM, Sean Cole (Pi) via use-livecode > wrote: > >> >> Working out which cell has been clicked: Sorry, that's not accurate >> either. Yes, we do have that! Also for a long time. >> > > Hi, > > As Curry's now unfortunately out of the conversation, can someone else help > me understand how you work out which cell has been clicked? ___ 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 stack in HTML5
Colin, Sorry I didn't even notice your message til just now. For persistent data, you're going to need some form of storage. Usually, websites utilise cookies. This is the more security-conscious way of handling it, depending on the data of course. w3school.com/js/js_cookies.asp has good examples on how to do this. So you can call a bit of js from LiveCode to read or write it where necessary. Use sparingly. 'Wait' is documented not to work. The best way to put a 'wait' in place is to split up your handler and use 'send blah to thisScript in x seconds'. 'System date' has no meaning because you are talking entirely to the browser via JS (effectively), not the users' system. The other date forms work fine. What use case do you have that needs the 'system date'? Maybe you could set a user preference for the format if necessary. All the best Sean On Fri, 27 Mar 2020 at 20:46, Colin Holgate via use-livecode < use-livecode@lists.runrev.com> wrote: > I made progress getting the basic stack going, the main hold ups were > ‘wait' and 'the system date', neither of those work. > > What approach is needed if the stack has text entry that you want to > persist when the page is reloaded? Save this stack seems not to work. > ___ > 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: Its very quiet
On 3/29/20 7:00 PM, Stephen Barncard via use-livecode wrote: I'm rebuilding a 1980s era Ampex MM1200 Recording Device. 24/16/8 track. For archiving. No Livecode content though, although I will eventually make a remote control using LiveCode Community ... !!! I thought the MM1200s were only 16 track. Those things are huge. Great sounding though. -- 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
Re: DataGrid question...
The mouseControl. > On Mar 29, 2020, at 7:06 PM, Sean Cole (Pi) via use-livecode > wrote: > >> >> Working out which cell has been clicked: Sorry, that's not accurate >> either. Yes, we do have that! Also for a long time. >> > > Hi, > > As Curry's now unfortunately out of the conversation, can someone else help > me understand how you work out which cell has been clicked? He said it can > be done but gave no explanation or hint of how. I trust him so it must be > possible. Suppose every field is an image of a checkbox or a series of > figures from a spreadsheet. Without the text being selected, how can you > work out the cell? Better still, if its completely empty, how can you tell? > > 'Addressing facts and a general need for accuracy in what we promote' > means promoting the accurate details so we can see where we are going wrong > with our 'minds' that are 'filled up with a lot of wrong info' that we end > up using 'to direct our actions and decisions'. I apologise for having been > misinformed. Is that the way the conversation goes? :) > > Thanks > ___ > 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: DataGrid question...
> > Working out which cell has been clicked: Sorry, that's not accurate > either. Yes, we do have that! Also for a long time. > Hi, As Curry's now unfortunately out of the conversation, can someone else help me understand how you work out which cell has been clicked? He said it can be done but gave no explanation or hint of how. I trust him so it must be possible. Suppose every field is an image of a checkbox or a series of figures from a spreadsheet. Without the text being selected, how can you work out the cell? Better still, if its completely empty, how can you tell? 'Addressing facts and a general need for accuracy in what we promote' means promoting the accurate details so we can see where we are going wrong with our 'minds' that are 'filled up with a lot of wrong info' that we end up using 'to direct our actions and decisions'. I apologise for having been misinformed. Is that the way the conversation goes? :) Thanks ___ 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 question...
> > Working out which cell has been clicked: Sorry, that's not accurate > either. Yes, we do have that! Also for a long time. > Hi, As Curry's now unfortunately out of the conversation, can someone else help me understand how you work out which cell has been clicked? He said it can be done but gave no explanation or hint of how. I trust him so it must be possible. Suppose every field is an image of a checkbox or a series of figures from a spreadsheet. Without the text being selected, how can you work out the cell? Better still, if its completely empty, how can you tell? 'Addressing facts and a general need for accuracy in what we promote' means promoting the accurate details so we can see where we are going wrong with our 'minds' that are 'filled up with a lot of wrong info' that we end up using 'to direct our actions and decisions'. I apologise for having been misinformed. Is that the way the conversation goes? :) Thanks ___ 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: Its very quiet
I'm rebuilding a 1980s era Ampex MM1200 Recording Device. 24/16/8 track. For archiving. No Livecode content though, although I will eventually make a remote control using LiveCode Community ... -- Stephen Barncard - Sebastopol Ca. USA - mixstream.org On Sun, Mar 29, 2020 at 4:36 PM Pi Digital via use-livecode < use-livecode@lists.runrev.com> wrote: > Sorry to hear that, Curry. Rest up. Glad it hasn’t been too serious for > you. We’ll try and keep the noise down for you. > > Sean Cole > Pi > > > > On 29 Mar 2020, at 21:40, Curry Kenworthy via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > Like many who have been sick between all the flu and corona going > around, just working on getting well again. Managed to stay out of > hospital, but not much energy. Quiet is good > ___ > 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: DataGrid question...
Pi: > Fields: Images, yes. Other objects, no. Working out which cell > has been clicked, no. > Is that ‘fake news’? If so, sad face. If not, still sad face. Well, sorry but I have to say YES it's largely fake news! :D I'm ill and no strength for an argument (and BTW it has been a fairly "serious" and costly, long-lasting illness I would add; merely glad to have stayed out of hospital) so this will be my last word on the subject but the facts are crystal clear. Images: Well-supported in fields, and for a long time! Working out which cell has been clicked: Sorry, that's not accurate either. Yes, we do have that! Also for a long time. Other objects: That one depends on interpretation. Other standard LC objects dragged in? No. Interactive content that can look and function just like objects to fill the same need? Yes. Often it works great. From checkboxes to charts and tables. I've been very active in this area, and so have others. Not meaning to pick on you, this does not center around you, but it's a good example. Just addressing facts and a general need for accuracy in what we promote. We've had too much misinformation widely spread over the years, and it harms projects when people get their minds filled up with a lot of wrong info and use it to direct their actions and decisions. The field is one such area - greatly underappreciated for its many strengths. Many other areas where we've had untrue facts widely spread and accepted/repeated/learned as truth. Glad this one was caught early. Be safe, everyone...in code quality and in health matters. Bad stuff going around. Best wishes, Curry Kenworthy Custom Software Development "Better Methods, Better Results" LiveCode Training and Consulting http://livecodeconsulting.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: DataGrid question...
Bob Sneidar wrote: > I thought you could embed checkboxes in a data grid? A DG is a collection of groups. Anything that can be put into a group can be part of the group that defines the row. > When have we ever been able to embed another object in a field? "Embed"? Never. But we can display an image in a field. It works very much like HTML, where you can reference an image object by ID to have it show up in a field: set the imageSource of char 13 of fld 1 to tSomeImgID HtmlText for that would show something like: Hello World -- 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: DataGrid question...
I have an app I’m working on right now that has check boxes that the user taps in a list field. Swapping the imagesource works really well in this particular case. Not that the dataGrid isn’t the required tool in some cases. Scott Morrow Elementary Software (Now with 20% less chalk dust!) web https://elementarysoftware.com/ email sc...@elementarysoftware.com booth1-800-615-0867 mobile 360-920-0715 -- > On Mar 29, 2020, at 4:46 PM, Mark Wieder via use-livecode > wrote: > > On 3/29/20 1:50 PM, Curry Kenworthy via use-livecode wrote: > >> Way too much inaccurate info and "fake news" about LiveCode gets propagated > > I think that's mischaracterized. > > Just passing on some information (I hate it when someone says x can't be done > - that's a real push to do it). I've been embedding small graphics in fields > for years now (and textshift helps align them) but I'm sure I'm barely > scratching the surface of what fields can do. > > -- > 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 ___ 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 question...
On 3/29/20 1:50 PM, Curry Kenworthy via use-livecode wrote: Way too much inaccurate info and "fake news" about LiveCode gets propagated I think that's mischaracterized. Just passing on some information (I hate it when someone says x can't be done - that's a real push to do it). I've been embedding small graphics in fields for years now (and textshift helps align them) but I'm sure I'm barely scratching the surface of what fields can do. -- 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
Re: DataGrid question...
I thought you could embed checkboxes in a data grid? Not in a field of course, but that’s always been the case. When have we ever been able to embed another object in a field? Bob S On Mar 29, 2020, at 4:32 PM, Pi Digital via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Fields: Images, yes. Other objects, no. Working out which cell has been clicked, no. Is that ‘fake news’? If so, sad face. If not, still sad face. Thanks Mark for catching and correcting that. Way too much inaccurate info and "fake news" about LiveCode gets propagated, and often picked up and parroted even further by others. LC field is extremely versatile! DataGrids are used far more often than they are needed. Best wishes, Curry Kenworthy ___ 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: Its very quiet
Sorry to hear that, Curry. Rest up. Glad it hasn’t been too serious for you. We’ll try and keep the noise down for you. Sean Cole Pi > On 29 Mar 2020, at 21:40, Curry Kenworthy via use-livecode > wrote: > > Like many who have been sick between all the flu and corona going around, > just working on getting well again. Managed to stay out of hospital, but not > much energy. Quiet is good ___ 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 question...
Fields: Images, yes. Other objects, no. Working out which cell has been clicked, no. Is that ‘fake news’? If so, sad face. If not, still sad face. > Thanks Mark for catching and correcting that. Way too much inaccurate info > and "fake news" about LiveCode gets propagated, and often picked up and > parroted even further by others. LC field is extremely versatile! > > DataGrids are used far more often than they are needed. > > Best wishes, > > Curry Kenworthy ___ 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: Hide stack change focus not supported 64bit
I just read the documentation. It seems to be talking about DontUseQT and DonUseQTEffects, not hide stack itself. Bob S On Mar 29, 2020, at 2:21 PM, Bob Sneidar mailto:bobsnei...@iotecdigital.com>> wrote: The documentation in 9.5.1 says that hide stack is not supported in 64bit. What is the alternative for MacOS X 64bit to temporarily hide my application? Thank you, Bill Vlahos ___ 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: Hide stack change focus not supported 64bit
Sorry. That should read the newest version of LiveCode that behaves the way I want is 5.5.5. I haven’t had to rebuild this application until now due to Apple removing support for 32bit apps. Bill > On Mar 29, 2020, at 3:58 PM, Bill Vlahos wrote: > > I was hoping to avoid using AppleScript but I might have to. > > The oldest version of LiveCode I have that behaves the way I want is 5.5.5. > LiveCode must have changed this after version 5. > > Thank, > Bill Vlahos > >> On Mar 29, 2020, at 3:38 PM, scott--- via use-livecode >> wrote: >> >> This sounds like something AppleScript might be able to solve… >> >> >>> On Mar 29, 2020, at 3:01 PM, Bill Vlahos via use-livecode >>> wrote: >>> >>> Mark, >>> >>> OK. That makes sense and matches the behavior as my window does hide. >>> >>> However, the Mac doesn’t give any window the focus. My application doesn’t >>> really hide. It just closes the window but staying as the frontmost >>> application. >>> >>> I need my whole application to hide to give the target window which had >>> focus before I clicked the button on my floating window after it hides >>> itself. >>> >>> Bill >>> On Mar 29, 2020, at 2:43 PM, Mark Wieder via use-livecode wrote: On 3/29/20 2:17 PM, Bill Vlahos via use-livecode wrote: > The documentation in 9.5.1 says that hide stack is not supported in > 64bit. What is the alternative for MacOS X 64bit to temporarily hide my > application? Er... no. The documentation says Additionally QuickTime does not include 64 bit support and therefore can not be supported on OS X 64 bit builds of LiveCode. So the hide command works as expected unless you try to use the QT modifications. -- 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 >>> >>> >>> ___ >>> 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: Hide stack change focus not supported 64bit
You can certainly use AS to query the frontmost application but I'm guessing as soon as you click the button in your app then your app is it. You can also query the application processes - if they are sorted in order from frontmost to 'rearmost' then maybe you could tell the second process in the list to come to the front? Terry... On 30/3/20, 9:39 am, "scott--- via use-livecode" wrote: This sounds like something AppleScript might be able to solve… > On Mar 29, 2020, at 3:01 PM, Bill Vlahos via use-livecode wrote: > > Mark, > > OK. That makes sense and matches the behavior as my window does hide. > > However, the Mac doesn’t give any window the focus. My application doesn’t really hide. It just closes the window but staying as the frontmost application. > > I need my whole application to hide to give the target window which had focus before I clicked the button on my floating window after it hides itself. > > Bill > >> On Mar 29, 2020, at 2:43 PM, Mark Wieder via use-livecode wrote: >> >> On 3/29/20 2:17 PM, Bill Vlahos via use-livecode wrote: >> >>> The documentation in 9.5.1 says that hide stack is not supported in 64bit. What is the alternative for MacOS X 64bit to temporarily hide my application? >> >> >> Er... no. The documentation says >> >> Additionally QuickTime does not include 64 bit support and therefore can not be supported on OS X 64 bit builds of LiveCode. >> >> So the hide command works as expected unless you try to use the QT modifications. >> >> -- >> 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 > > > ___ > 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: Hide stack change focus not supported 64bit
I was hoping to avoid using AppleScript but I might have to. The oldest version of LiveCode I have that behaves the way I want is 5.5.5. LiveCode must have changed this after version 5. Thank, Bill Vlahos > On Mar 29, 2020, at 3:38 PM, scott--- via use-livecode > wrote: > > This sounds like something AppleScript might be able to solve… > > >> On Mar 29, 2020, at 3:01 PM, Bill Vlahos via use-livecode >> wrote: >> >> Mark, >> >> OK. That makes sense and matches the behavior as my window does hide. >> >> However, the Mac doesn’t give any window the focus. My application doesn’t >> really hide. It just closes the window but staying as the frontmost >> application. >> >> I need my whole application to hide to give the target window which had >> focus before I clicked the button on my floating window after it hides >> itself. >> >> Bill >> >>> On Mar 29, 2020, at 2:43 PM, Mark Wieder via use-livecode >>> wrote: >>> >>> On 3/29/20 2:17 PM, Bill Vlahos via use-livecode wrote: >>> The documentation in 9.5.1 says that hide stack is not supported in 64bit. What is the alternative for MacOS X 64bit to temporarily hide my application? >>> >>> >>> Er... no. The documentation says >>> >>> Additionally QuickTime does not include 64 bit support and therefore can >>> not be supported on OS X 64 bit builds of LiveCode. >>> >>> So the hide command works as expected unless you try to use the QT >>> modifications. >>> >>> -- >>> 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 >> >> >> ___ >> 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: Hide stack change focus not supported 64bit
This sounds like something AppleScript might be able to solve… > On Mar 29, 2020, at 3:01 PM, Bill Vlahos via use-livecode > wrote: > > Mark, > > OK. That makes sense and matches the behavior as my window does hide. > > However, the Mac doesn’t give any window the focus. My application doesn’t > really hide. It just closes the window but staying as the frontmost > application. > > I need my whole application to hide to give the target window which had focus > before I clicked the button on my floating window after it hides itself. > > Bill > >> On Mar 29, 2020, at 2:43 PM, Mark Wieder via use-livecode >> wrote: >> >> On 3/29/20 2:17 PM, Bill Vlahos via use-livecode wrote: >> >>> The documentation in 9.5.1 says that hide stack is not supported in 64bit. >>> What is the alternative for MacOS X 64bit to temporarily hide my >>> application? >> >> >> Er... no. The documentation says >> >> Additionally QuickTime does not include 64 bit support and therefore can not >> be supported on OS X 64 bit builds of LiveCode. >> >> So the hide command works as expected unless you try to use the QT >> modifications. >> >> -- >> 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 > > > ___ > 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: Hide stack change focus not supported 64bit
Mark, OK. That makes sense and matches the behavior as my window does hide. However, the Mac doesn’t give any window the focus. My application doesn’t really hide. It just closes the window but staying as the frontmost application. I need my whole application to hide to give the target window which had focus before I clicked the button on my floating window after it hides itself. Bill > On Mar 29, 2020, at 2:43 PM, Mark Wieder via use-livecode > wrote: > > On 3/29/20 2:17 PM, Bill Vlahos via use-livecode wrote: > >> The documentation in 9.5.1 says that hide stack is not supported in 64bit. >> What is the alternative for MacOS X 64bit to temporarily hide my application? > > > Er... no. The documentation says > > Additionally QuickTime does not include 64 bit support and therefore can not > be supported on OS X 64 bit builds of LiveCode. > > So the hide command works as expected unless you try to use the QT > modifications. > > -- > 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 ___ 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: Hide stack change focus not supported 64bit
Bob, I want my stack to completely hide not make another window of my application the frontmost. I want the target application (like a web browser page) that was underneath my app to now have focus. Thanks, Bill > On Mar 29, 2020, at 2:21 PM, Bob Sneidar via use-livecode > wrote: > > Whaaa?? That is what I was seeing! In my case I used go invisible name>. The stack I went to got focus, but going back to the calling stack did > NOT return focus. What I ended up doing is using set the defaultStack to > > > Bob S > > > On Mar 29, 2020, at 2:17 PM, Bill Vlahos via use-livecode > mailto:use-livecode@lists.runrev.com>> wrote: > > > I have a stack that needs to hide itself so a different window (other > application) is now the frontmost window so my application can use > AppleScript keystroke command to enter information into the other window. > > When I issue the command hide this stack my application window disappears but > doesn’t lose focus. The target application that was behind my floating window > doesn’t become the frontmost application. > > The documentation in 9.5.1 says that hide stack is not supported in 64bit. > What is the alternative for MacOS X 64bit to temporarily hide my application? > > Thank you, > Bill Vlahos > > ___ > 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: Hide stack change focus not supported 64bit
On 3/29/20 4:17 PM, Bill Vlahos via use-livecode wrote: When I issue the command hide this stack my application window disappears but doesn’t lose focus. The target application that was behind my floating window doesn’t become the frontmost application. Hiding doesn't change anything but the visibility. If you need to change focus either use "go" or set the defaultstack. The documentation in 9.5.1 says that hide stack is not supported in 64bit. What is the alternative for MacOS X 64bit to temporarily hide my application? I think this is a documentation glitch. All the dictionary references in that last paragraph aren't showing up, so it isn't clear what the nouns are. But "hide" is still supported as far as I know. I think the missing references there are talking about QT commands. -- 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: Hide stack change focus not supported 64bit
On 3/29/20 2:17 PM, Bill Vlahos via use-livecode wrote: The documentation in 9.5.1 says that hide stack is not supported in 64bit. What is the alternative for MacOS X 64bit to temporarily hide my application? Er... no. The documentation says Additionally QuickTime does not include 64 bit support and therefore can not be supported on OS X 64 bit builds of LiveCode. So the hide command works as expected unless you try to use the QT modifications. -- 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
Re: Ordering text
As more cobwebs and dust fall away . . . First impose a (temporary?) index column, idx, ordering the transactions, with a step of 1. And then you do something like UPDATE theTable SET tBal=tBal(idx -1) + charge WHERE idx > MIN(idx); ___ 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: Hide stack change focus not supported 64bit
Whaaa?? That is what I was seeing! In my case I used go invisible . The stack I went to got focus, but going back to the calling stack did NOT return focus. What I ended up doing is using set the defaultStack to Bob S On Mar 29, 2020, at 2:17 PM, Bill Vlahos via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: I have a stack that needs to hide itself so a different window (other application) is now the frontmost window so my application can use AppleScript keystroke command to enter information into the other window. When I issue the command hide this stack my application window disappears but doesn’t lose focus. The target application that was behind my floating window doesn’t become the frontmost application. The documentation in 9.5.1 says that hide stack is not supported in 64bit. What is the alternative for MacOS X 64bit to temporarily hide my application? Thank you, Bill Vlahos ___ 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
Hide stack change focus not supported 64bit
I have a stack that needs to hide itself so a different window (other application) is now the frontmost window so my application can use AppleScript keystroke command to enter information into the other window. When I issue the command hide this stack my application window disappears but doesn’t lose focus. The target application that was behind my floating window doesn’t become the frontmost application. The documentation in 9.5.1 says that hide stack is not supported in 64bit. What is the alternative for MacOS X 64bit to temporarily hide my application? Thank you, Bill Vlahos ___ 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 question...
Pi: > The only issue with using a field is you are limited to character > data presentation only. You can’t put inline images, widgets, > checkboxes, etc. Mark: > Now that's just patently not true. No problem with images: > Set the imagesource of char x of field y of this card to tImageID Thanks Mark for catching and correcting that. Way too much inaccurate info and "fake news" about LiveCode gets propagated, and often picked up and parroted even further by others. LC field is extremely versatile! DataGrids are used far more often than they are needed. Best wishes, Curry Kenworthy WordLib: Take charge of MS Word and OpenOffice documents SpreadLib: "Excel-lent" spreadsheet import/export for LC http://livecodeaddons.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: Its very quiet
> How about we all chime in on what we are currently working on? Like many who have been sick between all the flu and corona going around, just working on getting well again. Managed to stay out of hospital, but not much energy. Quiet is good Best wishes, Curry Kenworthy Custom Software Development "Better Methods, Better Results" LiveCode Training and Consulting http://livecodeconsulting.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: Ordering text
Not enough info but something like: SELECT SUM(OLD -NEW) as balance FROM some_table WHERE need_to_calc IS true order by balance; (or order by whatever column. Not sure balance is what you are trying to sort by.) Bob S > On Mar 29, 2020, at 11:54 AM, doc hawk via use-livecode > wrote: > > I haven’t fully followed the queries that led to this, but would something > like > > SELECT SUM(OLD -NEW) FROM some_table WHERE need_to_calc IS true; > > get you anywhere? > > > I’m also thinking of a lag within the list, to assign them all at once, but > the commands coming to memory are from statistical packages, Fortran, > spreadsheets, and other matrix math . . . > > > > ___ > 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: Ordering text
I haven’t fully followed the queries that led to this, but would something like SELECT SUM(OLD -NEW) FROM some_table WHERE need_to_calc IS true; get you anywhere? I’m also thinking of a lag within the list, to assign them all at once, but the commands coming to memory are from statistical packages, Fortran, spreadsheets, and other matrix math . . . ___ 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: Ordering text
You took the SQL right out of my query. :-) Bob S On Mar 29, 2020, at 7:32 AM, Rick Harrison via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Hi Terry, Try having your database retrieval perform the sort and not LiveCode. Use the SQLite: ORDER BY clause. See if that gives you a faster result. Rick ___ 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: Ordering text
Hi Terry, Try having your database retrieval perform the sort and not LiveCode. Use the SQLite: ORDER BY clause. See if that gives you a faster result. Rick > On Mar 29, 2020, at 7:06 AM, Terence Heaford via use-livecode > wrote: > > I have approx. 7000 lines of tab delimited data. > > When I execute the code snippet below if the sort order is descending it > takes approx 120 milliseconds otherwise it takes 20 milliseconds to process. > > Can someone explain why and perhaps come up with a faster solution. > > Thanks > > Terry > —— ___ 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: Ordering text
I believe it’s sorted (forgive the pun) As the data is stored in an SQLite db I have used the db to sum the values then worked from the top. Like below. This results in approx. 20ms for each sort direction. I have looked into a running total calc using SQLite but the solutions I found seemed rather complicated. Sometimes asking for help then presents a solution. Thanks Terry if tOrder is "desc" then put dbGetAmountForAccount (pAccountName) into tBalance repeat for each line tRec in tData put tBalance into item 7 of tRec put item 6 of tRec into tAmount subtract (item 6 of tRec) from tBalance put tRec & CR after tCellData end repeat delete last char of tCellData else repeat for each line tRec in tData add item 6 of tRec to tBalance put tBalance into item 7 of tRec put tRec & CR after tCellData end repeat delete last char of tCellData end if > On 29 Mar 2020, at 14:20, Brian Milby via use-livecode > wrote: > > Is there a key that you can use to sort? May be faster to build it and then > use the sort command at the end. > > Thanks, > Brian > On Mar 29, 2020, 7:16 AM -0400, Tore Nilsen via use-livecode > , wrote: >> I believe the reason for the delay comes from the fact that when sorted >> descending, you put tRec & CR before tCellData. Tp put something before a >> container is slower than putting something after a container. >> >> Regards >> Tore Nilsen >> >>> 29. mar. 2020 kl. 13:06 skrev Terence Heaford via use-livecode >>> : >>> >>> I have approx. 7000 lines of tab delimited data. >>> >>> When I execute the code snippet below if the sort order is descending it >>> takes approx 120 milliseconds otherwise it takes 20 milliseconds to process. >>> >>> Can someone explain why and perhaps come up with a faster solution. >>> >>> Thanks >>> >>> Terry >>> —— >>> >>> repeat for each line tRec in tData >>> >>> add item 6 of tRec to tBalance >>> >>> put tBalance into item 7 of tRec >>> >>> >>> switch tOrder >>> >>> case "desc" >>> >>> put tRec & CR before tCellData >>> >>> break >>> >>> default >>> >>> put tRec & CR after tCellData >>> >>> end switch >>> >>> >>> end repeat >>> >>> >>> switch tOrder >>> >>> case "desc" >>> >>> delete char 1 of tCellData >>> >>> break >>> >>> default >>> >>> delete last char of tCellData >>> >>> end switch >>> >>> --- >>> ___ >>> 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 ___ 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: Ordering text
Is there a key that you can use to sort? May be faster to build it and then use the sort command at the end. Thanks, Brian On Mar 29, 2020, 7:16 AM -0400, Tore Nilsen via use-livecode , wrote: > I believe the reason for the delay comes from the fact that when sorted > descending, you put tRec & CR before tCellData. Tp put something before a > container is slower than putting something after a container. > > Regards > Tore Nilsen > > > 29. mar. 2020 kl. 13:06 skrev Terence Heaford via use-livecode > > : > > > > I have approx. 7000 lines of tab delimited data. > > > > When I execute the code snippet below if the sort order is descending it > > takes approx 120 milliseconds otherwise it takes 20 milliseconds to process. > > > > Can someone explain why and perhaps come up with a faster solution. > > > > Thanks > > > > Terry > > —— > > > > repeat for each line tRec in tData > > > > add item 6 of tRec to tBalance > > > > put tBalance into item 7 of tRec > > > > > > switch tOrder > > > > case "desc" > > > > put tRec & CR before tCellData > > > > break > > > > default > > > > put tRec & CR after tCellData > > > > end switch > > > > > > end repeat > > > > > > switch tOrder > > > > case "desc" > > > > delete char 1 of tCellData > > > > break > > > > default > > > > delete last char of tCellData > > > > end switch > > > > --- > > ___ > > 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: Ordering text
I believe the reason for the delay comes from the fact that when sorted descending, you put tRec & CR before tCellData. Tp put something before a container is slower than putting something after a container. Regards Tore Nilsen > 29. mar. 2020 kl. 13:06 skrev Terence Heaford via use-livecode > : > > I have approx. 7000 lines of tab delimited data. > > When I execute the code snippet below if the sort order is descending it > takes approx 120 milliseconds otherwise it takes 20 milliseconds to process. > > Can someone explain why and perhaps come up with a faster solution. > > Thanks > > Terry > —— > > repeat for each line tRec in tData > > add item 6 of tRec to tBalance > > put tBalance into item 7 of tRec > > > switch tOrder > > case "desc" > > put tRec & CR before tCellData > > break > > default > > put tRec & CR after tCellData > > end switch > > > end repeat > > > switch tOrder > > case "desc" > > delete char 1 of tCellData > > break > > default > > delete last char of tCellData > > end switch > > --- > ___ > 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
Ordering text
I have approx. 7000 lines of tab delimited data. When I execute the code snippet below if the sort order is descending it takes approx 120 milliseconds otherwise it takes 20 milliseconds to process. Can someone explain why and perhaps come up with a faster solution. Thanks Terry —— repeat for each line tRec in tData add item 6 of tRec to tBalance put tBalance into item 7 of tRec switch tOrder case "desc" put tRec & CR before tCellData break default put tRec & CR after tCellData end switch end repeat switch tOrder case "desc" delete char 1 of tCellData break default delete last char of tCellData end switch --- ___ 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