<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GuShH&#039;s DevBlog &#187; IDE</title>
	<atom:link href="http://gushh.net/blog/?tag=ide&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://gushh.net/blog</link>
	<description>This blog is about software, electronics engineering and game development.</description>
	<lastBuildDate>Tue, 24 Jan 2012 00:31:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Declar&#8217;em! &#8211; Automatic declaration of procedures.</title>
		<link>http://gushh.net/blog/automatic-declare-tool/</link>
		<comments>http://gushh.net/blog/automatic-declare-tool/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 20:32:44 +0000</pubDate>
		<dc:creator>GuShH</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PureBasic]]></category>
		<category><![CDATA[automatic procedure declaration]]></category>
		<category><![CDATA[declare]]></category>
		<category><![CDATA[declarem]]></category>
		<category><![CDATA[GuShH]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[pb]]></category>
		<category><![CDATA[procedures]]></category>
		<category><![CDATA[purebasic]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[regular expression]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://gushh.net/blog/?p=240</guid>
		<description><![CDATA[This is a tool that I&#8217;ve been using for quite a long while, just recently I fixed a small bug in the regexp and I thought it was time to share it. For those of you using the official IDE, there&#8217;s no real solution to this &#8220;problem&#8221;. When you&#8217;re working on something small, it&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>This is a tool that I&#8217;ve been using for quite a long while, just recently I fixed a small bug in the regexp and I thought it was time to share it.</p>
<p>For those of you using the official IDE, there&#8217;s no real solution to this &#8220;problem&#8221;. When you&#8217;re working on something small, it&#8217;s not a big deal to define a couple of declares here and there&#8230; However, on bigger code this becomes a real issue!. So why waste the time switching between IDEs or doing it by hand?&#8230;</p>
<p style="text-align: left;"><a title="Declar'em!" href="http://gushh.net/dls/declarem.zip" target="_blank">Grab it</a> and let me know how it runs! (<span style="text-decoration: line-through;">nasty</span> <em>ugly </em>source included).</p>
<p style="text-align: center;">The tool is very simple to install, I recommend you unzip directly into your PB directory and configure it as follows:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-243" title="Declarem_installation" src="http://gushh.net/blog/wp-content/uploads/2009/09/Declarem_installation.PNG" alt="Declarem_installation" width="485" height="296" /></p>
<p style="text-align: center;">That&#8217;s it. You&#8217;re ready to declar&#8217;em!.</p>
<p style="text-align: left; ">Cheers.</p>
<g:plusone href='http://gushh.net/blog/automatic-declare-tool/'></g:plusone>]]></content:encoded>
			<wfw:commentRss>http://gushh.net/blog/automatic-declare-tool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Things I&#8217;d like to see in the official PureBasic IDE.</title>
		<link>http://gushh.net/blog/things-id-like-to-see-in-the-official-purebasic-ide/</link>
		<comments>http://gushh.net/blog/things-id-like-to-see-in-the-official-purebasic-ide/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 02:06:08 +0000</pubDate>
		<dc:creator>GuShH</dc:creator>
				<category><![CDATA[PureBasic]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[purebasic]]></category>
		<category><![CDATA[Scintilla]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://gushh.net/blog/?p=100</guid>
		<description><![CDATA[This are a few of the features I&#8217;d like to see in the official IDE of PureBasic, listed in no particular order: Interactive rename refactoring (as featured in Eclipse) Coloring for procedure/macro listings Unintrusive project funcionality (The possiblity to define projects and source/resource files for each in a comprehensive way) Centered dialogs (As ranted in [...]]]></description>
			<content:encoded><![CDATA[<p>This are a few of the features I&#8217;d like to see in the official IDE of PureBasic, listed in no particular order:</p>
<ul>
<li>Interactive rename refactoring (as featured in Eclipse)</li>
<li>Coloring for procedure/macro listings</li>
<li>Unintrusive project funcionality (The possiblity to define projects and source/resource files for each in a comprehensive way)</li>
<li>Centered dialogs (As ranted<a href="http://gushh.net/blog/2009/07/02/pb-centered-messagerequester/" target="_blank"> in the past</a>)</li>
<li>Proper indentation line guides (both solid and dashed would be nice, Scintilla supports this already&#8230;)</li>
<li>Official tools (plugins) such as but not limited to:
<ul>
<li>Automatic procedure declarations (to output a declare list for a specific source)</li>
<li>SVN and other repository support</li>
<li>Comprehensive code statistics</li>
<li>Memory profiler (to profile modules and overall heap consumption/usage and memory-leak detection)</li>
<li>Better code profiler ( the current one is crap and not a real profiler per se )</li>
<li>Automatic code documentation support (robodoc or similar would be nice)</li>
</ul>
</li>
<li>Settings defined by user group or project.</li>
<li>Better overall stability.</li>
</ul>
<p>Those are just a few of them, off the top of my head. Now it&#8217;s worth noticing that some if not most of the aforementioned plugins could easily be programmed by the community, however since this is a commercial product it&#8217;s not such a far cry to request those essential tools, is it?.</p>
<p>I could elaborate on each point but they are pretty much self explanatory and most of the features already exist in most world-class integrated development environments. Needless to say, most of them are a must-have. Specially with the profiling tools.</p>
<p>That&#8217;s my wish-list for the next major release, of course it won&#8217;t happen but it can&#8217;t hurt to wish for, right?</p>
<p>I have another list in mind, for the compiler/language itself&#8230; But I&#8217;ve yet to polish it. And believe me, that&#8217;s a big list.</p>
<g:plusone href='http://gushh.net/blog/things-id-like-to-see-in-the-official-purebasic-ide/'></g:plusone>]]></content:encoded>
			<wfw:commentRss>http://gushh.net/blog/things-id-like-to-see-in-the-official-purebasic-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centered MessageRequester() / MessageBox()</title>
		<link>http://gushh.net/blog/pb-centered-messagerequester/</link>
		<comments>http://gushh.net/blog/pb-centered-messagerequester/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 16:25:00 +0000</pubDate>
		<dc:creator>GuShH</dc:creator>
				<category><![CDATA[PureBasic]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[CBT]]></category>
		<category><![CDATA[Centered Dialog]]></category>
		<category><![CDATA[Dual Screen]]></category>
		<category><![CDATA[Fanboy]]></category>
		<category><![CDATA[GuShH]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MessageBox]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[pb]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[purebasic]]></category>
		<category><![CDATA[SetWindowsHookEx]]></category>
		<category><![CDATA[UnhookWindowsHookEx]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://gushh.net/blog/?p=87</guid>
		<description><![CDATA[As usual, I was browsing the PureBasic forums to see what was new, nothing much (heh&#8230;) but something caught my attention, the fact that some user requested for the IDE&#8217;s message dialogs to be &#8220;centered&#8221; ( because he had multiple displays and the messages would appear in between them ) just to get shit-faced by [...]]]></description>
			<content:encoded><![CDATA[<p>As usual, I was browsing the PureBasic forums to see what was new, nothing much (heh&#8230;) but something caught my attention, the fact that some user requested for the IDE&#8217;s message dialogs to be &#8220;centered&#8221; ( because he had multiple displays and the messages would appear in between them ) just to get shit-faced by an actual staff member!</p>
<p>You can&#8217;t just say &#8220;it&#8217;s Microsoft&#8217;s fault&#8221; &#8212; Are you in some sort of mac-only cleanse?, What&#8217;s your #%&amp;%#$ problem?!</p>
<p>Those who &#8220;pass the ball&#8221; (as the user suggested) are part of the problem. You, being a programmer can certainly code a simple CBT hook, right?. Are you against hooks, perhaps &#8211; you are a purist, I hear&#8230; Sorry, but sometimes solutions <strong>are</strong> &#8220;dirty&#8221; and you have to live with them.</p>
<div id="attachment_88" class="wp-caption aligncenter" style="width: 658px"><img class="size-full wp-image-88 " title="split_screen" src="http://gushh.net/blog/wp-content/uploads/2009/07/split_screen.jpg" alt="Just for the record, I too use a split-screen and I find it annoying that dialog boxes are not centered to their parent." width="648" height="203" /><p class="wp-caption-text">Just for the record, I too use a split-screen and I find it annoying that dialog boxes are not centered to their parent.</p></div>
<p><span id="more-87"></span></p>
<p>I certainly think that this sort of behavior is not good for a business, but then again they&#8217;ve been cat-walking away from reality for years now (Look at their website if not, look at the fact that they haven&#8217;t implemented basic functionality to their language and by basic I mean a proper container library and whatnot!). Most of their user-base consists of people who are afraid of real, world-class languages. That&#8217;s my opinion, take it or leave it.</p>
<p>But before you throw crap at me do remember that I support them, I just don&#8217;t like the way they&#8217;re doing things. Pretty much like Apple does (they do crap) however the fanboys don&#8217;t realize this and they see any criticism as bad for the company image, when in fact what damages the company is that nonsense wall they put up when anybody, and I do mean &#8220;anybody&#8221; says &#8220;anything&#8221; that appears to be &#8220;against&#8221; their product/s.</p>
<p>Even if you don&#8217;t like it at least have the decency to hear those who are genuinely interested in your product, those who are giving away (and for free) true and useful suggestions for you to improve them. I don&#8217;t give a damn about this particular user but I do care when a so called company does this sort of things to their own users, it&#8217;s just uncalled for and plainly unprofessional.</p>
<p>Have a nice day, code follows.</p>

<div class="wp_syntax"><div class="code"><pre class="purebasic" style="font-family:monospace;"><span style="color: #ff0000; font-style: italic;">; This snippet was based on the following code by Microsoft:</span>
<span style="color: #ff0000; font-style: italic;">; http://support.microsoft.com/kb/180936</span>
<span style="color: #000066; font-weight: bold;">EnableExplicit</span> <span style="color: #ff0000; font-style: italic;">; The only way to go.</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">Procedure</span>.i CenterMsgCallBack<span style="color: #000066;">&#40;</span> uMsg.i, wParam.i, lParam.i <span style="color: #000066;">&#41;</span> 
&nbsp;
	<span style="color: #000066; font-weight: bold;">Select</span> uMsg
		<span style="color: #000066; font-weight: bold;">Case</span> #HCBT_ACTIVATE
&nbsp;
			<span style="color: #000066; font-weight: bold;">Define</span>.RECT typFormRect, typRectMsg
			<span style="color: #000066; font-weight: bold;">Define</span>.i plMsgHook, hWnd
			<span style="color: #000066; font-weight: bold;">Define</span>.i lxPos, lyPos
&nbsp;
			hWnd <span style="color: #000066;">=</span> GetParent_<span style="color: #000066;">&#40;</span>wParam<span style="color: #000066;">&#41;</span> 																																																		<span style="color: #ff0000; font-style: italic;">; the parent will be the callee</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">If</span> hWnd 																																																											<span style="color: #ff0000; font-style: italic;">; can't hurt to check.</span>
&nbsp;
				plMsgHook 	<span style="color: #000066;">=</span> GetWindowLong_<span style="color: #000066;">&#40;</span> hWnd, #GWL_USERDATA <span style="color: #000066;">&#41;</span> 																																				<span style="color: #ff0000; font-style: italic;">; get the hook address</span>
&nbsp;
				<span style="color: #000066; font-weight: bold;">If</span> plMsgHook 																																																								<span style="color: #ff0000; font-style: italic;">; can't hurt to check.</span>
&nbsp;
					GetWindowRect_<span style="color: #000066;">&#40;</span> hWnd, typFormRect <span style="color: #000066;">&#41;</span>
					GetWindowRect_<span style="color: #000066;">&#40;</span> wParam, typRectMsg <span style="color: #000066;">&#41;</span>
&nbsp;
					lxPos <span style="color: #000066;">=</span> <span style="color: #000066;">&#40;</span>typFormRect<span style="color: #000066;">\</span><span style="color: #0000ff;">Left</span> <span style="color: #000066;">+</span> <span style="color: #000066;">&#40;</span>typFormRect<span style="color: #000066;">\</span><span style="color: #0000ff;">Right</span> <span style="color: #000066;">-</span> typFormRect<span style="color: #000066;">\</span><span style="color: #0000ff;">Left</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">/</span> <span style="color: #CC0000;">2</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #000066;">&#40;</span><span style="color: #000066;">&#40;</span>typRectMsg<span style="color: #000066;">\</span><span style="color: #0000ff;">Right</span> <span style="color: #000066;">-</span> typRectMsg<span style="color: #000066;">\</span><span style="color: #0000ff;">Left</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">/</span> <span style="color: #CC0000;">2</span><span style="color: #000066;">&#41;</span>
					lyPos <span style="color: #000066;">=</span> <span style="color: #000066;">&#40;</span>typFormRect<span style="color: #000066;">\</span>Top  <span style="color: #000066;">+</span>	<span style="color: #000066;">&#40;</span>typFormRect<span style="color: #000066;">\</span>Bottom <span style="color: #000066;">-</span> typFormRect<span style="color: #000066;">\</span>Top<span style="color: #000066;">&#41;</span> <span style="color: #000066;">/</span> <span style="color: #CC0000;">2</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #000066;">&#40;</span><span style="color: #000066;">&#40;</span>typRectMsg<span style="color: #000066;">\</span>Bottom <span style="color: #000066;">-</span> typRectMsg<span style="color: #000066;">\</span>Top<span style="color: #000066;">&#41;</span> <span style="color: #000066;">/</span> <span style="color: #CC0000;">2</span><span style="color: #000066;">&#41;</span>
&nbsp;
					SetWindowPos_<span style="color: #000066;">&#40;</span> wParam, <span style="color: #CC0000;">0</span>, lxPos, lyPos, <span style="color: #CC0000;">0</span>, <span style="color: #CC0000;">0</span>,	#SWP_NOSIZE <span style="color: #000066;">|</span> #SWP_NOZORDER <span style="color: #000066;">|</span> #SWP_NOACTIVATE <span style="color: #000066;">&#41;</span> 														<span style="color: #ff0000; font-style: italic;">; position the window.</span>
					UnhookWindowsHookEx_<span style="color: #000066;">&#40;</span>plMsgHook<span style="color: #000066;">&#41;</span> 																																													<span style="color: #ff0000; font-style: italic;">; release the hook.</span>
					SetWindowLong_<span style="color: #000066;">&#40;</span> hWnd, #GWL_USERDATA, #Null <span style="color: #000066;">&#41;</span> 																																							<span style="color: #ff0000; font-style: italic;">; unset the user data.</span>
&nbsp;
				<span style="color: #000066; font-weight: bold;">EndIf</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">EndIf</span>
	<span style="color: #000066; font-weight: bold;">EndSelect</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">EndProcedure</span> 
&nbsp;
<span style="color: #000066; font-weight: bold;">Procedure</span>.i CenteredMessageRequester<span style="color: #000066;">&#40;</span> Title.s, Text.s, Flags.i<span style="color: #000066;">=</span>#Null, hWnd.i<span style="color: #000066;">=</span>#Null <span style="color: #000066;">&#41;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">Define</span>.i lInstance, lThreadID, plMsgHook
&nbsp;
	<span style="color: #000066; font-weight: bold;">If</span> <span style="color: #000066; font-weight: bold;">Not</span> hWnd
		hWnd <span style="color: #000066;">=</span> <span style="color: #0000ff;">WindowID</span><span style="color: #000066;">&#40;</span> <span style="color: #0000ff;">GetActiveWindow</span><span style="color: #000066;">&#40;</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">&#41;</span>
	<span style="color: #000066; font-weight: bold;">EndIf</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">If</span> hWnd
&nbsp;
		lInstance <span style="color: #000066;">=</span> GetWindowLong_<span style="color: #000066;">&#40;</span> hWnd, #GWL_HINSTANCE <span style="color: #000066;">&#41;</span>
		lThreadID <span style="color: #000066;">=</span> GetCurrentThreadId_<span style="color: #000066;">&#40;</span><span style="color: #000066;">&#41;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">If</span> lInstance <span style="color: #000066; font-weight: bold;">And</span> lThreadID 																																																			<span style="color: #ff0000; font-style: italic;">; just to make sure, can't hurt.</span>
&nbsp;
			plMsgHook <span style="color: #000066;">=</span> SetWindowsHookEx_<span style="color: #000066;">&#40;</span>#WH_CBT, @CenterMsgCallBack<span style="color: #000066;">&#40;</span><span style="color: #000066;">&#41;</span>, lInstance, lThreadID<span style="color: #000066;">&#41;</span> 																						<span style="color: #ff0000; font-style: italic;">; create the cbt hook.</span>
			SetWindowLong_<span style="color: #000066;">&#40;</span>	hWnd, #GWL_USERDATA, plMsgHook <span style="color: #000066;">&#41;</span> 																																							<span style="color: #ff0000; font-style: italic;">; save the hook address, we'll need it to release it.</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">ProcedureReturn</span> MessageBox_<span style="color: #000066;">&#40;</span> hWnd, Text, Title, Flags <span style="color: #000066;">&#41;</span>																																				<span style="color: #ff0000; font-style: italic;">; finally, create the message box.</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">EndIf</span>
	<span style="color: #000066; font-weight: bold;">EndIf</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">EndProcedure</span></pre></div></div>

<p>And a small example:</p>

<div class="wp_syntax"><div class="code"><pre class="purebasic" style="font-family:monospace;"><span style="color: #0000ff;">OpenWindow</span><span style="color: #000066;">&#40;</span> <span style="color: #CC0000;">0</span>, <span style="color: #CC0000;">500</span>, <span style="color: #CC0000;">200</span>, <span style="color: #CC0000;">400</span>, <span style="color: #CC0000;">200</span>, <span style="color: #009900;">&quot;testing&quot;</span> <span style="color: #000066;">&#41;</span>																																											<span style="color: #ff0000; font-style: italic;">; test window</span>
<span style="color: #0000ff;">MessageRequester</span><span style="color: #000066;">&#40;</span> <span style="color: #009900;">&quot;:(&quot;</span>, <span style="color: #009900;">&quot;I'm a normal messagebox&quot;</span>, #MB_APPLMODAL <span style="color: #000066;">|</span> #MB_ICONERROR <span style="color: #000066;">&#41;</span>																									<span style="color: #ff0000; font-style: italic;">; conventional msgbox</span>
CenteredMessageRequester<span style="color: #000066;">&#40;</span> <span style="color: #009900;">&quot;:)&quot;</span>, <span style="color: #009900;">&quot;I'm a centered messagebox!&quot;</span>, #MB_APPLMODAL <span style="color: #000066;">|</span> #MB_ICONEXCLAMATION <span style="color: #000066;">&#41;</span>																	<span style="color: #ff0000; font-style: italic;">; our centered msgbox.</span></pre></div></div>

<p>The &#8220;Programmer&#8221; can now copy&amp;paste and compile.</p>
<p>Cheers.</p>
<p>PS: You can also find the source in here: <a href="http://gushh.net/dev/?file=pb/centermessagebox.pb">http://gushh.net/dev/?file=pb/centermessagebox.pb</a> As usual, that&#8217;s my code repository for PB.</p>
<g:plusone href='http://gushh.net/blog/pb-centered-messagerequester/'></g:plusone>]]></content:encoded>
			<wfw:commentRss>http://gushh.net/blog/pb-centered-messagerequester/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: gushh.net @ 2012-02-05 16:21:30 by W3 Total Cache -->
