ORM Litehttp://www.ormfoundation.org/forums/81.aspxA forum for discussion the ORM Lite tool under development by Brian ChristensenenCommunityServer 2007.1 (Build: 20917.1142)Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3359.aspxTue, 09 Jul 2013 15:24:00 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3359Ken Evans0http://www.ormfoundation.org/forums/thread/3359.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3359<p>&nbsp;&quot;BTW, where can I find the message syntax for this forum?&quot;</p><p>Not sure what you mean by &quot;<b>message syntax</b>&quot;.</p><p>The way the Forum works is explained in the Help file that you can access from the help link at the top right of this page.</p><p>Let me know if you need more.</p><p>&nbsp;Ken <br /></p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3358.aspxTue, 09 Jul 2013 14:18:30 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3358maubrey0http://www.ormfoundation.org/forums/thread/3358.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3358<p>Yep, you were right: it was failing to find the Scripts directory</p>
<p>Here&#39;s a patch that fixes things for me: http://pastie.org/8125563</p>
<p>Again, not sure if it&#39;s the correct fix. I saw where Data.Path was being set in ORMLite.py, and AFAICT it&#39;s supposed to be set to the directory containing the script. With the directory layout in svn, Scripts and ormlite are at the same level, so I just changed GetScriptDirectory() to return ../Scripts rather the Scripts. I verified that it works for me whether I run it from the parent directory or within the ormlite/.</p>
<p>I also modified GetScriptDirectory() to emit a warning if the path doesn&#39;t exist. Currently it only emits that in debug mode... not sure the best way to handle it but it would be nice to raise an exception or something if the Scripts/ directory isn&#39;t found, since that seems like a fatal error.</p>
<p>Best,</p>
<p>Maurice</p>
<p>BTW, where can I find the message syntax for this forum? I&#39;m currently using HTML to structure messages but wondering if it supports bbcode or markdown or somesuch?</p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3357.aspxTue, 09 Jul 2013 01:51:11 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3357BrianC0http://www.ormfoundation.org/forums/thread/3357.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3357<p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>maubrey:</strong></div><div>reportobj appears to be a &quot;NoneType&quot; object and fails when it attempts to call reportobj.ReportType.PanelType</div></BLOCKQUOTE> <BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>maubrey:</strong></div><div> Brian, any tips for additional debugging?</div></BLOCKQUOTE>Every Report object should know its ReportType. The ReportType is what identifies that particular report as being an ORM Diagram. Without a type it is just a mystery diagram that ORM-Lite doesn&#39;t expect.</p><p>ORM-Lite is supposed to find the definition of the ORM Diagram ReportType in a script that it automatically applies whenever it creates a new ORM file. The script could be manually applied to a file if necessary; it is the &quot;Install ORM Diagram&quot; script. The script also defines several other ORM related report types. </p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3356.aspxTue, 09 Jul 2013 01:35:10 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3356BrianC0http://www.ormfoundation.org/forums/thread/3356.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3356<p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>JayD239:</strong></div><div>I can&#39;t open a diagram (by double-clicking it).</div></BLOCKQUOTE> This error might be caused by ORM-Lite not knowing where to find the Scripts folder. It is the only reason I could think of for ReportType being a NoneType object. </p><p>Could you test this work around? (1) After you start ORM-Lite and before you do anything else, select the menu command &quot;Scripts -&gt; Choose Scripts Folder ...&quot; then tell ORM-Lite where you placed the scripts folder. (2) Exit the program and start it up again. (3) Then try double-clicking an ORM diagram to open it. ORM-Lite should save the Scripts location into an options file and reuse that location upon start up.<br /></p><p>In the installer for the Windows version of ORM-Lite, I can place the Scripts folder where ORM-Lite expects to find it. I&#39;m not sure where the Linux version of ORM-Lite would expect to find the folder. </p><p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>JayD239:</strong></div><div>This patch also allowed my to run the application</div></BLOCKQUOTE> This is good news. Thank you for your efforts. </p><p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>JayD239:</strong></div><div>So I suppose it&#39;ll take a bit more effort to have this application properly OS-Independent.</div></BLOCKQUOTE> Unfortunately true, but with your help we are getting closer. <br /></p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3355.aspxTue, 09 Jul 2013 01:09:56 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3355BrianC0http://www.ormfoundation.org/forums/thread/3355.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3355<p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>maubrey:</strong></div><div>Follow-up on this. I installed a debugging version of python and was able to isolate the error.
Here&#39;s a patch that at least got it running on Linux (haven&#39;t actually tried using it yet):</div></BLOCKQUOTE> Thank you Maurice. I am excited that you have found a solution. When I get a chance I&#39;ll review the change and apply it to the repository. </p><p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>maubrey:</strong></div><div>maybe it would be good to support older versions where possible?</div></BLOCKQUOTE> I think it would. I&#39;ve found it isn&#39;t always easy to control which version of a library is available to Linux users.</p><p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>maubrey:</strong></div><div>Dunno if that&#39;s a critical feature or not.</div></BLOCKQUOTE> I don&#39;t know either. I&#39;ll try to verify that before I apply the patch to the repository. </p><p>Thanks again for your efforts. <br /></p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3354.aspxTue, 09 Jul 2013 00:59:33 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3354BrianC0http://www.ormfoundation.org/forums/thread/3354.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3354<p><BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>maubrey:</strong></div><div>Is there a more appropriate place to discuss the code? Didn&#39;t see
anything on pureviolet.net.</div></BLOCKQUOTE></p><p>At present I feel that this is the best place to discuss the code (unless Ken has any objections). It will be useful for the ORM community to see the active interest in ORM-Lite. </p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3353.aspxSat, 06 Jul 2013 01:54:25 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3353maubrey0http://www.ormfoundation.org/forums/thread/3353.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3353<p>Yes, I&#39;m seeing the same thing.<br />
Looks like there&#39;s an issue around line 175 of ReportAids.py</p>
<p> reportobj = Data.DBObject.GetObject(&quot;Report&quot;, id)</p>
<p>reportobj appears to be a &quot;NoneType&quot; object and fails when it attempts to call reportobj.ReportType.PanelType</p>
<p>Brian, any tips for additional debugging?</p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3352.aspxWed, 03 Jul 2013 05:00:12 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3352JayD2390http://www.ormfoundation.org/forums/thread/3352.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3352This patch also allowed my to run the application, but it does not seem to work very well. I can&#39;t open a diagram (by double-clicking it).
<pre>
<font face="Lucida Console" size="2">
(&#39;Report&#39;, 5)
Traceback (most recent call last):
File &quot;/home/jd/ormlite/ormlite/MainORM.py&quot;, line 1621, in OnTreeLeftDClick
Data.OpenReport(key[1])
File &quot;/home/jd/ormlite/ormlite/ReportAids.py&quot;, line 220, in OpenReport
OpenPanel(r)
File &quot;/home/jd/ormlite/ormlite/ReportAids.py&quot;, line 182, in OpenPanel
panel_type = reportobj.ReportType.PanelType
AttributeError: &#39;NoneType&#39; object has no attribute &#39;PanelType&#39;
</font>
</pre>
<pre>
<font face="Lucida Console" size="2">
$ python --version
Python 2.7.3
</font>
</pre>
So I suppose it&#39;ll take a bit more effort to have this application properly OS-Independent.Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3340.aspxTue, 25 Jun 2013 00:32:03 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3340maubrey0http://www.ormfoundation.org/forums/thread/3340.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3340<p>
Follow-up on this. I installed a debugging version of python and was able to isolate the error.
Here&#39;s a patch that at least got it running on Linux (haven&#39;t actually tried using it yet):</p>
<p>
<a href="http://pastie.org/8077519">http://pastie.org/8077519</a>
</p>
<p>
The main problem was around line 1433. For some reason, under Linux, ItemHasChildren() is returning true even when GetFirstChild() is ! IsOk().
I added an IsOk() check and that fixed the seg fault. No idea if that&#39;s the proper fix or not.
</p>
<p>
The other issue I think is probably due to my having an older wx library. My library had no definition for aui.AUI_MINIMIZE_POS_TOOLBAR, so
commented out that section. I may just need to upgrade, but maybe it would be good to support older versions where possible? Dunno if that&#39;s a critical feature or not.
</p>
<p>
Best.,
</p>
MauriceRe: ORM Lite source?http://www.ormfoundation.org/forums/thread/3339.aspxMon, 24 Jun 2013 14:30:20 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3339maubrey0http://www.ormfoundation.org/forums/thread/3339.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3339<p>Thanks, Brian.</p>
<p>
I pulled the svn sources and I am seeing a segmentation fault.</p>
<p>
Using:
<pre>
Python 2.7.2+
python-wxgtk2.8 (recent enough?)
</pre>
</p>
<p>
<pre>
Backtrace:
#0 0x00007ffff5681c5f in wxGenericTreeCtrl::Delete(wxTreeItemId const&amp;) ()
from /usr/lib/libwx_gtk2u_core-2.8.so.0
#1 0x00007fffed6e3b8b in ?? ()
from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_controls_.so
#2 0x00000000004ba179 in PyEval_EvalFrameEx ()
#3 0x00000000004bcdbd in PyEval_EvalCodeEx ()
</pre>
</p>
<p>
Is there a more appropriate place to discuss the code? Didn&#39;t see
anything on pureviolet.net.</p>
<p>
Best,</p>
<p>Maurice</p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3338.aspxMon, 24 Jun 2013 12:31:04 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3338BrianC0http://www.ormfoundation.org/forums/thread/3338.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3338Ken,
<p>
ORM-Lite has multi-platform capability because I developed it using Python and wxPython (a cross platform user interface library). Unfortunately, as good as wxPython is, there are some differences between the MW Windows, Linux, and Macintosh platforms. It is necessary to test and make (usually minor) changes for each platform. The most common problem is that the default font size are different on each platform. Sometimes an option on one platform isn&#39;t supported on another.
</p><p>
For the Linux version of ORM-Lite, I suspect that I have been using an option or parameter on the Windows version that isn&#39;t supported in Linux.
</p><p>
I intend to create a prepackaged version of ORM-Lite for the Macintosh. I would also create one for the common Linux distributions, but it requires specific skills and developer permissions that I don&#39;t have to add an application to the Linux program repositories.
</p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3337.aspxMon, 24 Jun 2013 12:19:55 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3337BrianC0http://www.ormfoundation.org/forums/thread/3337.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3337<p>The source code is available via Subversion. Here are the commands to request a copy.
</p>
svn checkout svn://pureviolet.net/air/trunk/ganttpv ormlite<br />
svn checkout svn://pureviolet.net/air/trunk/scripts Scripts
<p>
I use Python 2.7 in development, but it might work with an earlier version. It requires a recent version of wxPython.
</p><p>
I have received a report that there is an error when run under at least one version of Linux. The person who reported the error was not technical and was not able to identify exactly what was wrong or how to fix it. I have not been able to test this as I don&#39;t have a version of Linux available to me.
</p><p>
If you run into the same problem please let me know.
</p><p>
As a work around, because ORM-Lite shares source code with GanttPV, she was able to create ORM diagrams using GanttPV after running the &quot;Object Role Modling -&gt; Install ORM Diagram&quot; script and then adding an ORM Diagram report.
</p><p>
I have tested ORM-Lite on the Macintosh. It has a problem displaying all of the help text, but otherwise seems to be working properly.
</p><p>
There are some developer hints that you might find useful on the GanttPV web site that also apply to ORM-Lite at http:/pureviolet.net/ganttpv/developer/subversion/
</p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3327.aspxWed, 19 Jun 2013 12:50:10 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3327maubrey0http://www.ormfoundation.org/forums/thread/3327.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3327<BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>Ken Evans:</strong></div><div><p>I have asked Brian Christensen to answer your question.</p><p>It&#39;s my (possibly incorrect) understanding that since ORM Lite is written in Python, it is Python itself that provides the multi-platform capability rather than there being a separate version for each platform. True or False?<br /></p></div></BLOCKQUOTE>
<p>Thank you.</p>
<p>Yes, that&#39;s what I expected; I had expected a single package that would run wherever a python interpreter + required modules would run. But that&#39;s what threw me, since the packages are labeled for Windows and appear to just contain a Windows executable:</p>
<pre>
$ file ORMLite_Win_v0.13b.exe
ORMLite_Win_v0.13b.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit
</pre>
<p>It looks like I can probably run this under the Wine emulator, but I would prefer to run it natively, if possible.</p>
<BLOCKQUOTE><div><img src="/Themes/default/images/icon-quote.gif"> <strong>Ken Evans:</strong></div><div><p>
Also, are you saying that you have been able to look at the source code for ORM Lite? (e.g. from the 13.b download in the library)</p></div></BLOCKQUOTE>
<p>No, I haven&#39;t. I found a project by the same name that I thought was this one on first glance, but it turned out to be a Java-based object-relational mapper:
http://sourceforge.net/projects/ormlite/</p>
<p>Maurice</p>Re: ORM Lite source?http://www.ormfoundation.org/forums/thread/3326.aspxWed, 19 Jun 2013 11:28:20 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3326Ken Evans0http://www.ormfoundation.org/forums/thread/3326.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3326<p>I have asked Brian Christensen to answer your question.</p><p>It&#39;s my (possibly incorrect) understanding that since ORM Lite is written in Python, it is Python itself that provides the multi-platform capability rather than there being a separate version for each platform. True or False?<br /></p>Also, are you saying that you have been able to look at the source code for ORM Lite? (e.g. from the 13.b download in the library)<p>&nbsp;</p><p>Thanks</p><p>Ken <br /></p>ORM Lite source?http://www.ormfoundation.org/forums/thread/3325.aspxWed, 19 Jun 2013 02:00:44 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3325maubrey0http://www.ormfoundation.org/forums/thread/3325.aspxhttp://www.ormfoundation.org/forums/commentrss.aspx?SectionID=81&PostID=3325Hi. Where can I find the source for ORM Lite? All I see is Windows packages on the library section although the notes say it runs on Linux and MacOS as well.
I thought I had found the source code repository on SourceForge, but it looks like that&#39;s a different project.