From ryan at web-scripter.com Sun Nov 4 22:44:16 2007 From: ryan at web-scripter.com (Ryan Joseph) Date: Mon, 5 Nov 2007 10:44:16 +0700 Subject: [WASTE-list] removing custom attributes Message-ID: <89031937-6F25-4090-84AD-218AE5B43176@web-scripter.com> I can't seem to find a function for removing custom attributes, does it exist? Now it appears the only option is reloading the document. thanks. Regards, Josef -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.piovanelli at pobox.com Mon Nov 5 05:59:48 2007 From: marco.piovanelli at pobox.com (Marco Piovanelli) Date: Mon, 5 Nov 2007 11:59:48 +0100 Subject: [WASTE-list] removing custom attributes In-Reply-To: <89031937-6F25-4090-84AD-218AE5B43176@web-scripter.com> References: <89031937-6F25-4090-84AD-218AE5B43176@web-scripter.com> Message-ID: <20071105105948.451489068@relay.pair.com> On Mon, 5 Nov 2007 10:44:16 +0700, Ryan Joseph (ryan at web-scripter.com) wrote: >I can't seem to find a function for removing custom attributes, does >it exist? Now it appears the only option is reloading the document. There are a couple of undocumented selectors for WESetAttributes() and WESetOneAttribute() that allow you to remove all character- or paragraph-level custom attributes defined in a given range: const WESelector weTagRemoveAllCharacterCustomAttributes = ' -c '; const WESelector weTagRemoveAllParagraphCustomAttributes = ' -p '; There is currently no way to selectively remove a particular custom attribute without affecting the others, nor to revert the effect of a WERegisterCustomAttribute() call. Please let me know if you would like this functionality to be added to a future version of WASTE. Best regards, -- 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. From cnguyen at stata.com Mon Nov 5 16:54:14 2007 From: cnguyen at stata.com (Chinh Nguyen) Date: Mon, 5 Nov 2007 15:54:14 -0600 Subject: [WASTE-list] Copy/paste problem In-Reply-To: References: Message-ID: <4BFB4EE4-9703-4925-B679-08372670F932@stata.com> I sent a bug report about Select All and problems with the selection not being cleared after you press the down arrow key. It turns out I was still pointing to the 3.0.2 framework instead of the 3.1b2 framework which evidently fixes the problem. However, I just noticed a problem with copy/paste. If I copy text from say, Terminal.app, then paste it into my text editor using WASTE, it pastes just fine. If I copy the text within my text editor and then paste again, my app locks up and I get the following message: StataSE(22746,0xa0133f60) malloc: *** mmap(size=1610612736) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug I can copy text from my text editor and paste it into TextEdit without any problems. I ran an older executable that still used WASTE 3.0.2 and it doesn't have the problem. With 3.1b2, I'm not using the HIView version of WASTE and I'm also handling kHICommandCopy and kHICommandPaste myself. For kHICommandCopy, I only WECopy() and for kHICommandPaste, I WEPaste(), WECalText(), update my status bar as to the current line number, then return noErr. Even after I comment out WECalText and my status bar updating routine so that I only WEPaste(), I still lock up. Any suggestions? PS. Is WECalText() still necessary after WEPaste()? I suspect that's old WASTE 2 logic I'm using. -Chinh Nguyen cnguyen at stata.com From marco.piovanelli at pobox.com Tue Nov 6 08:53:10 2007 From: marco.piovanelli at pobox.com (Marco Piovanelli) Date: Tue, 6 Nov 2007 14:53:10 +0100 Subject: [WASTE-list] Copy/paste problem In-Reply-To: <4BFB4EE4-9703-4925-B679-08372670F932@stata.com> References: <4BFB4EE4-9703-4925-B679-08372670F932@stata.com> Message-ID: <20071106135310.184050621@relay.pair.com> On Mon, 5 Nov 2007 15:54:14 -0600, Chinh Nguyen (cnguyen at stata.com) wrote: >I sent a bug report about Select All and problems with the selection >not being cleared after you press the down arrow key. It turns out I >was still pointing to the 3.0.2 framework instead of the 3.1b2 >framework which evidently fixes the problem. Good. >However, I just noticed a problem with copy/paste. If I copy text >from say, Terminal.app, then paste it into my text editor using WASTE, >it pastes just fine. If I copy the text within my text editor and >then paste again, my app locks up and I get the following message: > >StataSE(22746,0xa0133f60) malloc: *** mmap(size=1610612736) failed >(error code=12) >*** error: can't allocate region >*** set a breakpoint in malloc_error_break to debug 1610612736 is hexadecimal 0x60000000. This smells like an endian issue to me. Is this happening on a Intel mac? Tiger or Leopard? Can you reproduce this problem with the WASTE demo application? When you copy the text from within your text editor, which flavors end up on the pasteboard? (you can tell using PasteboardPeeker) >I can copy text from my text editor and paste it into TextEdit without >any problems. I ran an older executable that still used WASTE 3.0.2 >and it doesn't have the problem. With 3.1b2, I'm not using the HIView >version of WASTE and I'm also handling kHICommandCopy and >kHICommandPaste myself. For kHICommandCopy, I only WECopy() and for >kHICommandPaste, I WEPaste(), WECalText(), update my status bar as to >the current line number, then return noErr. Even after I comment out >WECalText and my status bar updating routine so that I only WEPaste(), >I still lock up. Any suggestions? WECalText() is a no-op in WASTE 3.0, that's why commenting it out has no effect. As for your handling of kHICommandCopy and kHICommandPaste, you're doing essentially what HIWASTEView does. >PS. Is WECalText() still necessary after WEPaste()? No. It was actually never necessary unless you inhibited line break recalculation. -- 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.