<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Where is al_create_path() located?</title>
		<link>http://www.allegro.cc/forums/view/612394</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 14 Apr 2013 00:35:02 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am trying to rewrite some of the Allegro source so I can try and get the native dialog to show my filename by default when I call it, and after browsing through the source, I can&#39;t seem to locate where the al_create_path() function is.  It seems to me that if there is a problem, it is probably in that function as that is what is used to pass the path + filename in dialog.c.</p><p>I looked up the Windows command for opening a dialog and there definitely seems to be a fairly simple way to pass the filename to it.  I would hate to have to implement this myself as I am trying to keep my game cross platform compatible, but if I can&#39;t fix the allegro function I may have to.</p><p>Unless of course al_create_native_file_dialog() has been fixed in newer builds and it now shows the filename passed to it by default?  I have a hard time believing this is a difficult thing to fix and am more than willing to try my hand at it, if I don&#39;t drown first in the source. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Thu, 11 Apr 2013 22:38:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>src/path.c:154
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Thu, 11 Apr 2013 23:01:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks.  After looking at this for a while I decided I can more easily write my own dialog from scratch than try and figure this out. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>I miss the days of Allegro 4 when things were simpler.  I may ditch the idea of staying cross platform and just stick to windows.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Fri, 12 Apr 2013 00:00:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/612394/980527#target">NiteHackr</a> said:</div><div class="quote"><p>  I may ditch the idea of staying cross platform and just stick to windows.</p></div></div><p>Isn&#39;t that why you couldn&#39;t find al_create_path()?  Stupid yellow dog.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Fri, 12 Apr 2013 01:11:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you had used <a href="http://gnuwin32.sourceforge.net/packages/grep.htm">grep to find it</a> we wouldnt&#39; be having this discussion. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 12 Apr 2013 06:48:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><pre class="terminal">git grep -n &quot;ALLEGRO_PATH *al_create_path&quot;
src/path.c:154:ALLEGRO_PATH *al_create_path(const char *str)
src/path.c:186:ALLEGRO_PATH *al_create_path_for_directory(const char *str)</pre><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Fri, 12 Apr 2013 06:52:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/612394/980527#target">NiteHackr</a> said:</div><div class="quote"><p>I may ditch the idea of staying cross platform and just stick to windows.</p></div></div><p>Hmm, yeah, the win32 api is so much easier to use and makes a lot more sense than the allegro 5 api.</p><p><img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Fri, 12 Apr 2013 11:10:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Lols <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dizzy Egg)</author>
		<pubDate>Fri, 12 Apr 2013 20:15:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/612394/980602#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p>Hmm, yeah, the win32 api is so much easier to use and makes a lot more sense than the allegro 5 api.</p></div></div><p>

There is no doubt that Allegro 5 is much easier, it&#39;s why I use it.  But the <span class="source-code"><a href="http://www.allegro.cc/manual/al_create_native_file_dialog"><span class="a">al_create_native_file_dialog</span></a><span class="k2">(</span><span class="k2">)</span></span> function won&#39;t show a default filename when you go to choose a file, even though I specify one with it.</p><p>I guess I should have clarified, I will probably use Windows specific code for saving because I really want a default filename in there.  I would rewrite the allegro code myself to fix this, but it is such a confusing mess to look over the Allegro code when you&#39;re not used to it that it would be easier to use a Windows function just for this one thing.  </p><p>Something like <a href="http://msdn.microsoft.com/en-ca/library/windows/desktop/ms646928%28v=vs.85%29.aspx">GetSaveFileName()</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Sat, 13 Apr 2013 20:57:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s a bug likely. Someone just needs to fix it. Probably not a difficult bug to fix. But I loathe the win32 api, so I&#39;m not likely going to be the one to do it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 13 Apr 2013 21:05:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I understand.  I looked at it myself and haven&#39;t seen where the bug is but I figured it was an easy one to fix, but wading through that Allegro file structure when I&#39;m not used to it, and then the thought of compiling Allegro afterwards kind of turned me off.  I have had a difficult time compiling this version due to dependencies.  I DID manage to get it compiled once, but  then came up with a slew of problems I won&#39;t get into here.  I imagine implementing that one Windows function shouldn&#39;t be much of a problem.  I am thinking of just adding in some #ifdef&#39;s to check for Windows/Linux compile perhaps, if I decide to compile it for Linux in  the future. &lt;shrug&gt;</p><p>Edit: I&#39;ll look into grabbing grep.  I&#39;m not used to working on large projects like this, but I suppose it&#39;s time I learned.</p><p>Edit2: Oh, and if the problem with this is in path.c (`al_create_path()`) as I suspect, than this wouldn&#39;t be a problem with programming the Windows API, but more of an Allegro specific problem parsing the path + filename string that is sent to that function.  I would be curious if anyone has noticed the missing filename on other platforms like Linux?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Sat, 13 Apr 2013 21:38:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_create_path"><span class="a">al_create_path</span></a></span> doesn&#39;t remove filenames. Though if you call <span class="source-code"><a href="http://www.allegro.cc/manual/al_create_path_for_directory"><span class="a">al_create_path_for_directory</span></a></span> it&#39;ll treat the last path component as a directory rather than a filename, even if the path doesn&#39;t end with a path separator. Also if the dialog code could be stripping the filename from the path it sends to the dialog function. Not entirely sure why it&#39;d do that, but it could be.</p><p>I took a quick look at the native file dialog code and I couldn&#39;t see anything that screamed wrong at me, but I only took a quick look.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 14 Apr 2013 00:35:02 +0000</pubDate>
	</item>
</rss>
