From ryan at web-scripter.com Mon Jan 7 20:33:01 2008 From: ryan at web-scripter.com (Ryan Joseph) Date: Tue, 8 Jan 2008 08:33:01 +0700 Subject: [WASTE-list] WASTE questions Message-ID: I hope you don't mind I had a random assortment of questions eating at me for a while so I decided to wrap it into one email. 1) Why is the default tab width 2359296 instead of a simple number? for example if I want to let users select a tab width how should that number be mapped to something understandable to a user. 2) Is there a way to prevent WASTE from calling the flux callback once per every word if there is a drag or paste operation? I have code which styles text as it's inserted and having multiple calls to the callback over works the parser (a paste command could cause it to run 100 times for a long piece of text). I expected the behavior to invoke the callback once with the delta representing the length of the pasted/dragged content. 3) I'm not sure this what I'm experiencing but I think when loading windows files WASTE is producing double lines due the fact windows uses CRLF endings. Does WASTE support any means to solve this? 4) I'm not able to reproduce this by pasting but during an operation reading text line by line from a UNIX command into WASTE using WEPut there are serious crippling speed issues, totally unusable to a user. By the end of a 1000 line file it's taking half a second to insert a single line. Inserting longer buffers of text will not cause this so I'm not sure what's going on. thanks for any ideas you have on these. Regards, Josef -------------- next part -------------- An HTML attachment was scrubbed... URL: From jamesw at write-brain.com Mon Jan 7 20:52:29 2008 From: jamesw at write-brain.com (James Walker) Date: Mon, 07 Jan 2008 17:52:29 -0800 Subject: [WASTE-list] WASTE questions In-Reply-To: References: Message-ID: <4782D75D.6050904@write-brain.com> Ryan Joseph wrote: > 1) Why is the default tab width 2359296 instead of a simple number? > for example if I want to let users select a tab width how should that > number be mapped to something understandable to a user. I can answer this one... 2359296 is a simple number, once you realize it is a Fixed value rather than an integer. If you divide it by 2 to the power 16, you get exactly 36.0. That many points is half an inch. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan at web-scripter.com Tue Jan 8 00:18:25 2008 From: ryan at web-scripter.com (Ryan Joseph) Date: Tue, 8 Jan 2008 12:18:25 +0700 Subject: [WASTE-list] WASTE questions In-Reply-To: <4782D75D.6050904@write-brain.com> References: <4782D75D.6050904@write-brain.com> Message-ID: <29D74656-5D3E-42E3-A0C0-5BF736CF7D40@web-scripter.com> great, some fixed integer conversion functions took care of that. thanks On Jan 8, 2008, at 8:52 AM, James Walker wrote: > Ryan Joseph wrote: >> 1) Why is the default tab width 2359296 instead of a simple >> number? for example if I want to let users select a tab width how >> should that number be mapped to something understandable to a user. > > I can answer this one... 2359296 is a simple number, once you > realize it is a Fixed value rather than an integer. If you divide > it by 2 to the power 16, you get exactly 36.0. That many points is > half an inch. > _______________________________________________ > WASTE-list mailing list > WASTE-list at ovolab.com > http://six.pairlist.net/mailman/listinfo/waste-list Regards, Josef -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.piovanelli at pobox.com Tue Jan 8 13:37:48 2008 From: marco.piovanelli at pobox.com (Marco Piovanelli) Date: Tue, 8 Jan 2008 19:37:48 +0100 Subject: [WASTE-list] WASTE questions Message-ID: <20080108183748.568403814@relay.pair.com> On Tue, 8 Jan 2008 08:33:01 +0700, Ryan Joseph (ryan at web-scripter.com) wrote: >I hope you don't mind I had a random assortment of questions eating >at me for a while so I decided to wrap it into one email. > >1) Why is the default tab width 2359296 instead of a simple number? >for example if I want to let users select a tab width how should that >number be mapped to something understandable to a user. As someone else correctly pointed out, 2359296 is just 36 << 16. The tab width and several other measurements in WASTE are expressed as Fixed values. >2) Is there a way to prevent WASTE from calling the flux callback >once per every word if there is a drag or paste operation? I have >code which styles text as it's inserted and having multiple calls to >the callback over works the parser (a paste command could cause it to >run 100 times for a long piece of text). I expected the behavior to >invoke the callback once with the delta representing the length of >the pasted/dragged content. This happens when you paste or drag RTF data (as opposed to plain text or other flavors), since the RTF parser inserts text in pieces, as it opens and closes RTF groups. This has the annoying side effect that your flux callback may be called multiple times. Thanks for reporting this. I'll try to fix this in the next release. >3) I'm not sure this what I'm experiencing but I think when loading >windows files WASTE is producing double lines due the fact windows >uses CRLF endings. Does WASTE support any means to solve this? Luckily, this is solved in my current (private) build: CF+LF sequences are now treated as a single paragraph break. Please contact me offlist for a copy. >4) I'm not able to reproduce this by pasting but during an operation >reading text line by line from a UNIX command into WASTE using WEPut >there are serious crippling speed issues, totally unusable to a user. >By the end of a 1000 line file it's taking half a second to insert a >single line. Inserting longer buffers of text will not cause this so >I'm not sure what's going on. This is a known performance bug that I still haven't had time to address. :-( Hopefully after MacWorld. -- marco -- It's not the data universe only, it's human conversation. They want to turn it into a one-way flow that they have entirely monetized. I look at the collective human mind as a kind of ecosystem. They want to clear cut it. They want to go into the rainforest of human thought and mow the thing down.