To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.mlcadOpen lugnet.cad.mlcad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / MLCad / 2064
2063  |  2065
Subject: 
Re: Trouble creating building instructions using lpub and mpd file
Newsgroups: 
lugnet.cad, lugnet.cad.mlcad
Date: 
Wed, 6 Apr 2005 16:43:40 GMT
Viewed: 
1094 times
  
In lugnet.cad, Allan Bedford wrote:
   In lugnet.cad, Kevin L. Clague wrote:
   In lugnet.cad, Allan Bedford wrote:
   In lugnet.cad, Kevin L. Clague wrote:

   I’ll work on the blanks in filename problem in LPub.

That will be so nice. Thank you! That one caught me again just this afternoon. And I know better. However, I just forgot at one point, added a space to a file name and.... well you know the rest. :)

Anyway, glad to hear it’s fixable.

Best regards,
Allan B.
The LEGO Builder’s Guide

Hi Allan, In light of this article:

http://news.lugnet.com/cad/?n=12556

I now have a dilema on this topic. Add code that makes me compatible with MLCad but violating the specification, or leave it as is and explain to people that MLCad does allow blanks in file names, but that violates the spec.

I apologize in advance if this is a stupid solution but what about this:

Is there a way for you to check for spaces in the file name as lpub attempts to open it? If so, can you then abort the file open process and throw a pop-up message that says something like:

”You are attempting to open a file that contains spaces in the name. Please rename the file, without spaces, and try opening the file again.“

At the moment the biggest problem (as I see it) is the lack of error handling when lpub tries to handle a file with spaces. It returns all kinds of messages but is the real error listed there? If so, I didn’t see it last time it happened. It was only after manually looking at my filename that I realized what had happened. If lpub could simply be a bit more pro-active, I feel that would be the easiest solution to code and also keep you in line with the spec.

You are right, but the error handling problem is larget than just blanks in file names. All of this boils down to the wimpy method that LPub uses to parse LDraw files. If you type in a meta-command “0 LPUB PIL”, rather than “0 LPUB PLI”, lpub just hapilly ignores it.

If you have an add part line:

1 7 x y z a b c d e f g h i file name with blanks

LPub picks up this part and calls it good:

1 7 x y z a b c d e f g h i file

and ignores the rest. This leads me to my feeling that LPub is user hostile.

I want to improve the parsing to make it give you warnings and such, so you have a clue. LPub should at least check the syntax of the meta-commands it supports, including MLCad.

It will give much quicker feedback to users than them sending and waiting for email.

Expecially with LPub’s plethora of new meta-commands related to placement, syntax checking and feedback has become much more important. I’m finding it annoying, so that raises the priority ;^)

I’m off to study lex and maybe yacc.

Thanks for the feedback. It is very welcome.

Kevin


  
I hope that helps. Again, this is just my own opinion on the matter.

Best regards,
Allan B.



Message has 1 Reply:
  Re: Trouble creating building instructions using lpub and mpd file
 
"Kevin L. Clague" <kevin_clague@yahoo.com> wrote in message [ ... snipped ... ] (...) [ ... snipped ... ] I highly recommend the O'Reilly "lex and yacc" book, I found it very helpful for a project I did at work a number of years ago. The moderated (...) (20 years ago, 11-Apr-05, to lugnet.cad, lugnet.cad.mlcad)

Message is in Reply To:
  Re: Trouble creating building instructions using lpub and mpd file
 
(...) I apologize in advance if this is a stupid solution but what about this: Is there a way for you to check for spaces in the file name as lpub attempts to open it? If so, can you then abort the file open process and throw a pop-up message that (...) (20 years ago, 6-Apr-05, to lugnet.cad, lugnet.cad.mlcad, FTX)

17 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR